helmsman icon indicating copy to clipboard operation
helmsman copied to clipboard

[v1.13.1] A New Chart Is Detected Each Time When Local File-System Chart Is Used

Open Xtigyro opened this issue 5 years ago • 9 comments

When the chart is hosted in the local file-system, each time helmsman is run - the release gets deleted and redeployed.

Logs:

2020/01/03 17:46:57 INFO: Plan generated at: Fri Jan  3 2020 17:46:56
2020/01/03 17:46:57 DECISION: release [ testing-puppetserver ] is desired to use a new Chart [ /repos/xtigyro/puppetserver-helm-chart.tgz ]. I am planning a purge delete of the current release and will install it with the new chart in namespace [[ testing ]] -- priority: 0
2020/01/03 17:46:57 INFO: sorting the commands in the plan based on priorities (order flags) ...
2020/01/03 17:46:57 INFO: Executing the plan ...
2020/01/03 17:46:57 INFO: deleting release [ testing-puppetserver ] in namespace [[ testing ]] using Tiller in [ kube-system ]
2020/01/03 17:46:57 INFO: deleting release [ testing-puppetserver ] in namespace [[ testing ]] using Tiller in [ kube-system ]
2020/01/03 17:46:57 VERBOSE: helm delete --purge testing-puppetserver --tiller-namespace kube-system
2020/01/03 17:46:57 release "testing-puppetserver" deleted

Tested with Helmsman v1.13.1.

Xtigyro avatar Jan 03 '20 17:01 Xtigyro

Hi @Xtigyro what version of helmsman are you using?

luisdavim avatar Jan 03 '20 18:01 luisdavim

Hi @Xtigyro what version of helmsman are you using?

Hey @luisdavim Tested with Helmsman v1.13.1.

My .toml:

[settings]
kubeContext = "kubernetes-admin@kind-one" # the name of the context to be created
eyamlEnabled = true
eyamlPrivateKeyPath = "./config/keys/private_key.pkcs7.pem"
eyamlPublicKeyPath = "./config/keys/public_key.pkcs7.pem"

[namespaces]
  [namespaces.testing]
  protected = false
  [namespaces.production]
  protected = true

[helmRepos]
stable = "https://kubernetes-charts.storage.googleapis.com"
incubator = "http://storage.googleapis.com/kubernetes-charts-incubator"

[apps]
  [apps.testing-puppetserver]
  description = "TESTING Puppetserver"
  namespace = "testing"
  enabled = true
  chart = "../../puppetserver-helm-chart.tgz"
  version = "1.6.5" # chart version
  valuesFiles = [
      "../apps/puppetserver/common-values.yaml",
  ]
  secretsFiles = [
      "../apps/puppetserver/testing-values.yaml",
  ]

Xtigyro avatar Jan 03 '20 18:01 Xtigyro

The Helm chart can be cloned from here: https://github.com/Xtigyro/puppetserver-helm-chart/tree/v1.6.3

Xtigyro avatar Jan 03 '20 18:01 Xtigyro

I think the problem here is that the chart name in Chart.yaml is not matching the tarball name the name for the tarball should follow the convention <name>-<version>.tgz how are you producing the tarball? with the tar command directly for using helm package?

luisdavim avatar Jan 04 '20 12:01 luisdavim

@luisdavim Ah - okay, fixed that (https://github.com/Xtigyro/puppetserver-helm-chart/tree/v165). Thank you!

It was packaged with helm package and Chart.yalm now matches the archive.

/repos/xtigyro # helm package puppetserver-helm-chart 
Successfully packaged chart and saved it to: /repos/xtigyro/puppetserver-helm-chart-1.6.5.tgz

Still the same issue occurs though:

2020/01/04 16:13:32 INFO: Plan generated at: Sat Jan  4 2020 16:13:32
2020/01/04 16:13:32 DECISION: release [ testing-puppetserver ] is desired to use a new Chart [ /repos/xtigyro/puppetserver-helm-chart-1.6.5.tgz ]. I am planning a purge delete of the current release and will install it with the new chart in namespace [[ testing ]] -- priority: 0
2020/01/04 16:13:32 DECISION: release [ development-puppetserver ] is desired to use a new Chart [ /repos/xtigyro/puppetserver-helm-chart-1.6.5.tgz ]. I am planning a purge delete of the current release and will install it with the new chart in namespace [[ development ]] -- priority: 0
2020/01/04 16:13:32 INFO: sorting the commands in the plan based on priorities (order flags) ...
2020/01/04 16:13:32 INFO: Executing the plan ...
2020/01/04 16:13:32 INFO: deleting release [ testing-puppetserver ] in namespace [[ testing ]] using Tiller in [ kube-system ]
2020/01/04 16:13:32 INFO: deleting release [ testing-puppetserver ] in namespace [[ testing ]] using Tiller in [ kube-system ]
2020/01/04 16:13:32 VERBOSE: helm delete --purge testing-puppetserver --tiller-namespace kube-system
2020/01/04 16:13:33 release "testing-puppetserver" deleted

Xtigyro avatar Jan 04 '20 16:01 Xtigyro

Yes, the package name matches the name in chart.yaml now but since you changed the name in chart.yaml it doesn't match the release you have in your cluster. Try running twice and on the second time it should detect it is the same chart.

luisdavim avatar Jan 04 '20 23:01 luisdavim

Yes, the package name matches the name in chart.yaml now but since you changed the name in chart.yaml it doesn't match the release you have in your cluster. Try running twice and on the second time it should detect it is the same chart.

Yes - that's the result after multiple runs. Between each set of two runs a purge (purge: true, enabled: false) was done to make sure the test was valid.

Xtigyro avatar Jan 04 '20 23:01 Xtigyro

@luisdavim And to be even more sure about it:

  1. tested with stable/tomcat - worked perfectly;
  2. packaged it:
/repos/xtigyro/helmsman-poc # helm package ../../helm/charts/stable/tomcat/
Successfully packaged chart and saved it to: /repos/xtigyro/helmsman-poc/tomcat-0.4.0.tgz
  1. purged and then tested 3 times with chart: "../../tomcat-0.4.0.tgz" - same issue.
2020/01/04 23:44:20 DECISION: release [ testing-tomcat ] is desired to use a new Chart [ /repos/xtigyro/tomcat-0.4.0.tgz ]. I am planning a purge delete of the current release and will install it with the new chart in namespace [[ testing ]] -- priority: -2
2020/01/04 23:44:20 INFO: sorting the commands in the plan based on priorities (order flags) ...
2020/01/04 23:44:20 INFO: Executing the plan ...
2020/01/04 23:44:20 INFO: deleting release [ testing-tomcat ] in namespace [[ testing ]] using Tiller in [ kube-system ]
2020/01/04 23:44:21 release "testing-tomcat" deleted

Xtigyro avatar Jan 04 '20 23:01 Xtigyro

This issue has been marked stale due to an inactivity.

github-actions[bot] avatar Aug 10 '22 05:08 github-actions[bot]