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 install --set fails with 2.5.1 but working fine with 2.4.2 #2739

Closed
sbezverk opened this issue Jul 28, 2017 · 5 comments
Closed

helm install --set fails with 2.5.1 but working fine with 2.4.2 #2739

sbezverk opened this issue Jul 28, 2017 · 5 comments

Comments

@sbezverk
Copy link
Contributor

Right after switching to 2.5.1 this command started failing:

  • 2.5.1
[root@kube-1 kolla-kubernetes]# helm install helm/service/mariadb --namespace storage --name mariadb-storage_2 --values ../cloud.yaml  --debug --set element_name=mariadb-storage --set global.kolla.mariadb.statefulset.dependencies.jobs.[0]="mariadb-storage-init-element" --set global.kolla.mariadb.statefulset.dependencies.jobs.[1]="mariadb-storage-init-element-2" --dry-run 
[debug] Created tunnel using local port: '36476'

[debug] SERVER: "localhost:36476"

[debug] Original chart version: ""
[debug] CHART PATH: /root/version-07-28-2017/kolla-kubernetes/helm/service/mariadb

Error: failed parsing --set data: key map "statefulset" has no value
  • 2.4.2
root@kube-1 kolla-kubernetes]# helm install helm/service/mariadb --namespace storage --name mariadb-storage_2 --values ../cloud.yaml  --debug --set element_name=mariadb-storage --set global.kolla.mariadb.statefulset.dependencies.jobs.[0]="mariadb-storage-init-element" --set global.kolla.mariadb.statefulset.dependencies.jobs.[1]="mariadb-storage-init-element-2" --dry-run 
[debug] Created tunnel using local port: '41436'

[debug] SERVER: "localhost:41436"

[debug] Original chart version: ""
[debug] CHART PATH: /root/version-07-28-2017/kolla-kubernetes/helm/service/mariadb

2017/07/28 15:03:08 warning: destination for jobs is a table. Ignoring non-table value [mariadb-init-element]
2017/07/28 15:03:09 warning: destination for jobs is a table. Ignoring non-table value [mariadb-init-element]
NAME:   mariadb-storage_2
REVISION: 1
RELEASED: Fri Jul 28 15:03:09 2017
@jascott1
Copy link
Contributor

@sbeverk Was this something in the template or do you still believe this to be a Helm version dependent problem?

@jascott1
Copy link
Contributor

@sbezverk 2.4.2 does not work with list value indexes that you are setting with --set. In my test 2.4.2 does not throw error on that chart but does not correctly create the list and instead shows items with literal '[0]' and '[1]'

test[0]: abc
test[1]: def

@sbezverk
Copy link
Contributor Author

@jascott1 we can still parse it, but with 2.5.1 it just fails. Here is the output generate with 2.4.2:

             "name": "DEPENDENCY_JOBS",
             "value": "map[[0]:mariadb-storage-init-element]\n\n,mariadb-storage-init-element"

I do not get why 2.5.1 is failing..

@jascott1
Copy link
Contributor

jascott1 commented Jul 31, 2017

@sbezverk So it looks like in 2.4.2 (as mentioned above) it wasnt working but wasnt complaining. In 2.5.1 you need to remove the periods before the index opening brackets [ so previous command

--set global.kolla.mariadb.statefulset.dependencies.jobs.[0]="mariadb-storage-init-element" 
--set global.kolla.mariadb.statefulset.dependencies.jobs.[1]="mariadb-storage-init-element-2" 

becomes

--set global.kolla.mariadb.statefulset.dependencies.jobs[0]="mariadb-storage-init-element" 
--set global.kolla.mariadb.statefulset.dependencies.jobs[1]="mariadb-storage-init-element-2" 

It appears to be working after that change as I see your list elements in the DEPENDENCY_JOBS structure.

@sbezverk
Copy link
Contributor Author

sbezverk commented Aug 6, 2017

with changed command line syntax, no error seen, the case can be closed, thank you.

@sbezverk sbezverk closed this as completed Aug 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants