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

Helm 3.0.3. --set ignored together with --reuse-values #7509

Closed
Anshelen opened this issue Feb 1, 2020 · 12 comments
Closed

Helm 3.0.3. --set ignored together with --reuse-values #7509

Anshelen opened this issue Feb 1, 2020 · 12 comments
Labels
bug Categorizes issue or PR as related to a bug. Stale

Comments

@Anshelen
Copy link

Anshelen commented Feb 1, 2020

Output of helm version:

version.BuildInfo{Version:"v3.0.3", GitCommit:"ac925eb7279f4a6955df663a0128044a8a6b7593", GitTreeState:"clean", GoVersion:"go1.13.6"}

Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:18:23Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:09:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider/Platform (AKS, GKE, Minikube etc.): reproduced on GKE and Minikube.

Problem

  1. Create default chart: helm create test-chart
  2. Install chart: helm install test-chart test-chart/
  3. Try to update replicas count: helm upgrade test-chart test-chart/ --reuse-values --set replicaCount=2
  4. Check values: helm get values test-chart -> USER-SUPPLIED VALUES: null -> expected USER-SUPPLIED VALUES: replicaCount: 2

Walkaround

  1. Omit --reuse-values for the FIRST time: helm upgrade test-chart test-chart/ --set replicaCount=2
  2. Return to initial state: helm upgrade test-chart test-chart/ --set replicaCount=1
  3. Then broken command works: helm upgrade test-chart test-chart/ --reuse-values --set replicaCount=2. And now it works for all values in an expected way

Please, give opportunity to use --set and --reuse-values together without walkarounds

Upd: It is possible to walkaround a problem, if we install chart with at least one --set option.

@bacongobbler bacongobbler added the bug Categorizes issue or PR as related to a bug. label Feb 14, 2020
@furkanmustafa
Copy link

furkanmustafa commented Mar 2, 2020

I'm hitting the same bug. I can see that the problem is around here;

$ helm -n dev get values myapp1
USER-SUPPLIED VALUES:
null

if the original chart is installed with no overrides at all, helm stores overrides as null apparently. (Not {}).. which is probably causing problems for any additional overrides....

Only option left for automation is; (not tested)

NAMESPACE=dev
DEPLOY=myapp
PREVIOUS_VALUES=$(helm -n ${NAMESPACE} get values ${DEPLOY} -o=yaml)
OPT="--reuse-values"
if [ "${PREVIOUS_VALUES}" = "null" ]; then
  OPT="--reset-values"
fi

helm upgrade -n ${NAMESPACE} ${DEPLOY} ${OPT} --set my.over.ridden.field=newvalue1

@muscovitebob
Copy link

I'm not completely sure, but I think I was hitting this bug all the way back in helm 2.14. Once I switched my pipelines to fetching previous values explicitly, and then setting based on those without using the --reuse-values flag, I no longer had weird inconsistencies in my deployed values.

@github-actions
Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Sep 21, 2020
@furkanmustafa
Copy link

@github-actions please unmark as stale.

@hickeyma hickeyma removed the Stale label Sep 21, 2020
@hickeyma
Copy link
Contributor

This looks like a bug. It can be reproduced simply from scaffold chart install:

$ helm3 create issue-7509
Creating issue-7509

$ helm3 install issue-7509 issue-7509/
NAME: issue-7509
LAST DEPLOYED: Mon Sep 21 09:22:44 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:
1. Get the application URL by running these commands:
  export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=issue-7509,app.kubernetes.io/instance=issue-7509" -o jsonpath="{.items[0].metadata.name}")
  export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
  echo "Visit http://127.0.0.1:8080 to use your application"
  kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT

$ helm3 get values issue-7509
USER-SUPPLIED VALUES:
null

@github-actions
Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Dec 21, 2020
@furkanmustafa
Copy link

it's quite stupid to auto-close an issue. and it's insulting for the people who put up effort to report bugs.
Besides being insulting, it kills the incentive for reporting ("it will be ignored and auto closed anyway, why should I care to report")

@github-actions github-actions bot removed the Stale label Dec 22, 2020
@github-actions
Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Mar 23, 2021
@furkanmustafa
Copy link

Still watching @github-actions-kun, and still have my workarounds in place for this specific bug

@github-actions github-actions bot removed the Stale label Mar 24, 2021
@asardaes
Copy link

See #6899, same symptoms, supposedly fixed back then.

@furkanmustafa
Copy link

@asardaes thanks for the link!
the MR content actually looks like it should be fixing the issue. I will re-do my tests and report back here.
Well, this issue is pretty much duplicate of #6899.

@github-actions
Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug. Stale
Projects
None yet
Development

No branches or pull requests

6 participants