profile
viewpoint

Ask questionsUpgrade only subchart

<!-- If you need help or think you have found a bug, please help us with your issue by entering the following information (otherwise you can delete this text): -->

Output of helm version: version.BuildInfo{Version:"v3.0.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}

Output of kubectl version: Client Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.7-eks-1861c5", GitCommit:"1861c597586f84f1498a9f2151c78d8a6bf47814", GitTreeState:"clean", BuildDate:"2019-09-24T22:12:08Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.9-eks-f459c0", GitCommit:"f459c0672169dd35e77af56c24556530a05e9ab1", GitTreeState:"clean", BuildDate:"2020-03-18T04:24:17Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider/Platform (AKS, GKE, Minikube etc.): EKS

Hello, recently I started using helm, and I'm a little bit confused about subcharts. My initial idea was to have everything related to application I need in one chart, in it's subcharts. And after that doing CI/CD for applications referencing only to subcharts.

What I did so far. I created chart with subcharts like this.

$ tree
.
├── charts
│   ├── adminapi
│   │   ├── Chart.yaml
│   │   ├── templates
│   │   │   └── adminapi.yaml
│   │   └── values.yaml
│   ├── backendapi
│   │   ├── Chart.yaml
│   │   ├── templates
│   │   │   └── backendapi.yaml
│   │   └── values.yaml
│   ├── ingress
│   │   ├── Chart.yaml
│   │   ├── templates
│   │   │   └── ingress.yaml
│   │   └── values.yaml
│   ├── mongo
│   │   ├── Chart.yaml
│   │   ├── templates
│   │   │   └── mongodb.yaml
│   │   └── values.yaml
│   ├── secrets
│   │   ├── Chart.yaml
│   │   ├── templates
│   │   │   └── secrets.yaml
│   │   └── values.yaml
│   └── frontend
│       ├── Chart.yaml
│       ├── templates
│       │   └── frontend.yaml
│       └── values.yaml
├── Chart.yaml
├── templates
│   └── namespace.yaml
└── values.dev.yaml

I deployed this with helm install my-app . --values values.dev.yaml

after this I have everything up and running, and I just wanted to update image tag of my frontend application. I tried with this helm upgrade my-app charts/frontend/ --values values.dev.yaml --set global.Frontend.Docker.Tag="latest" But this does not works. It's deleting complete namespace.

I see that there is some "umbrella" way, and dependencies but I don't get it.

So... My initial idea was to have everything on one place just in case of disaster recovery, and when I want to update only my application, secrets, or ingress, I just wanted explicitly to run only subchart.

Can someone direct me how to do this, with referencing some live example?

Thx

helm/helm

Answer questions technosophos

An upgrade should not be deleting a namespace. So something is wrong there.

The usual way Helm works during upgrade is by reading your current Helm installation, and then generating the updated version, comparing them, and only installing the changes. So, in a nutshell, Helm does by default what you are asking for.

Probably the best way to fix this is to try to find out why it is deleting things on upgrade.

useful!

Related questions

Error: open .helm\repository\cache\local-index.yaml hot 2
Helm upgrade fails the release after adding a new resource hot 2
Error: validation: chart.metadata is required when using --repo - helm hot 2
Error: could not find a ready tiller pod hot 2
Upgrading releases with immutable resources (e.g. persitentVolume) hot 2
"Error: Transport is closing" message when attempting to install hot 1
helm 3: Not able to push chart to docker hub hot 1
Helm3: No 'init', doesn't use existing ~/.helm hot 1
No kind Job is registered for version batch/v1 hot 1
error calling eq: invalid type for comparison hot 1
upgrade apiVersion in k8s from 1.14 to 1.16 FAILED hot 1
Helm v 2.9.1 Error: Can&#39;t get a valid version for repositories even when the chart is available - helm hot 1
Upgrades fails with: grpc: received message larger than max hot 1
Helm init fails on Kubernetes 1.16.0 hot 1
Helm error with forwarding ports hot 1
Github User Rank List