Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: INSTALLATION FAILED: validation: chart.metadata.version "DAPR_VERSION_HELM" is invalid when install dapr with debug mode #4277

Closed
jaredhshuai opened this issue Feb 21, 2022 · 13 comments
Assignees
Labels
kind/bug Something isn't working

Comments

@jaredhshuai
Copy link

jaredhshuai commented Feb 21, 2022

In what area(s)?

/area debug dapr on Kubernetese
https://docs.dapr.io/developing-applications/debugging/debug-k8s/debug-dapr-services/

What version of Dapr?

1.6.0

Expected Behavior

When debug dapr on Kubernetes, after build dapr source code and push image to docker hub, it should be installed successfully through helm.

Actual Behavior

INSTALLATION FAILED: validation: chart.metadata.version "DAPR_VERSION_HELM" is invalid

Environment :

Kubernetes: v1.23.3
Weave Net: v2.8.1
Docker: v20.10.12
Dapr: v1.6.0
Helm: v3.8.0

Steps

  1. Build dapr is ok.
git clone https://github.com/dapr/dapr.git
cd dapr
make release GOOS=linux GOARCH=amd64 DEBUG=1
  1. Push image is ok.
export DAPR_TAG=dev
export DAPR_REGISTRY=docker.io/k8schina
docker login
make docker-push DEBUG=1
  1. Helm install.
cd dapr
helm install dapr charts/dapr \
--namespace dapr-system \
--create-namespace \
--values values.yaml \
--wait
  • Values.yaml
global:
  registry: docker.io/k8schina
  tag: "dev-linux-amd64"
  logAsJson: true
dapr_operator:
  debug:
    enabled: true
dapr_sidecar_injector:
  hostNetwork: true
  debug:
    enabled: true
dapr_placement:
  debug:
    enabled: true
dapr_sentry:
  debug:
    enabled: true
  1. Return error.
INSTALLATION FAILED: validation: chart.metadata.version "DAPR_VERSION_HELM" is invalid
@jaredhshuai jaredhshuai added the kind/bug Something isn't working label Feb 21, 2022
@jaredhshuai
Copy link
Author

jaredhshuai commented Feb 21, 2022

Transfer from dapr/helm-charts#16

@jaredhshuai
Copy link
Author

jaredhshuai commented Feb 21, 2022

I found this bug report from helm repo, this issue only exists in helm versions 3.5.2 and above:
helm/helm#9342

@daixiang0
Copy link
Member

@jaredhshuai we can do a version check and document it, are you interested in adding it?

@jaredhshuai
Copy link
Author

@daixiang0 How can I do it?

@daixiang0
Copy link
Member

https://docs.dapr.io/operations/troubleshooting/ seems a good place to comment this.

@jaredhshuai
Copy link
Author

jaredhshuai commented Feb 21, 2022

Sure, after you confirm the version check, I'd like to update the page. If it's a bug, it may need to be fixed.

@daixiang0
Copy link
Member

I see you use charts/dapr, but official is dapr/dapr, below codes work:

$ helm install dapr dapr/dapr --namespace dapr-system --create-namespace  --wait
NAME: dapr
LAST DEPLOYED: Mon Feb 21 10:41:15 2022
NAMESPACE: dapr-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Thank you for installing Dapr: High-performance, lightweight serverless runtime for cloud and edge

Your release is named dapr.

To get started with Dapr, we recommend using our quickstarts:
https://github.com/dapr/quickstarts

For more information on running Dapr, visit:
https://dapr.io
$ helm version
version.BuildInfo{Version:"v3.6.3", GitCommit:"d506314abfb5d21419df8c7e7e68012379db2354", GitTreeState:"clean", GoVersion:"go1.16.5"}

@jaredhshuai
Copy link
Author

jaredhshuai commented Feb 21, 2022

  • If the installation is based on the debug source code mode, you need to use
cd dapr # Enter into dapr source folder

helm install dapr charts/dapr \
--namespace dapr-system \
--create-namespace \
--values values.yaml \
--wait
  • values.yaml
    • Using private docker image based on debug mode
global:
  registry: docker.io/k8schina
  tag: "dev-linux-amd64"
  logAsJson: true  
dapr_operator:
  debug:
    enabled: true
dapr_sidecar_injector:
  hostNetwork: true
  debug:
    enabled: true
dapr_placement:
  debug:
    enabled: true
dapr_sentry:
  debug:
    enabled: true

https://docs.dapr.io/developing-applications/debugging/debug-k8s/debug-dapr-services/

@artursouza artursouza self-assigned this Feb 21, 2022
@artursouza
Copy link
Member

There is an extra step if you need to use the chart from local folder.

REL_VERSION=edge bash .github/scripts/set_helm_dapr_version.sh

@artursouza
Copy link
Member

In this case, the tag must also be changed to edge in your build.

The action item for this bug is to update the docs to reflect the latest instructions. This step is needed to simplify our release process.

@jaredhshuai
Copy link
Author

jaredhshuai commented Feb 21, 2022

hi @artursouza Did you mean:

export DAPR_TAG=edge
export DAPR_REGISTRY=docker.io/k8schina
docker login
make docker-push DEBUG=1

Whether I need to change the command:

make release GOOS=linux GOARCH=amd64 DEBUG=1

@jaredhshuai
Copy link
Author

hi @artursouza Any updates?

@artursouza
Copy link
Member

@ItalyPaleAle have fixed it in master branch. Please, try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants