How to update a db without overwriting it using Helm chart - kubernetes-helm

Let's say that I'm using a db management system version v1.0, and I need to update it to v2.0 without overriding the db file.
How can I do this properly using helm chart?
I'm trying to avoid to do it manually and using helm, and unfortunately I can't figure it out.

Related

Automatically increment Datadog version tag

I want to use Datadog's Deployment Tracking but to do so I need to dynamically set the version tag. Right now my backend tag is set in the Dockerfile ENV and LABEL and on the frontend it is just in datadogRum.init(). They are currently hardcoded.
I usually do one deployment per day, I would like these version tags to be auto-incremented but haven't found a good way to do it.
I tried using an environment variable from build tools to update these, but could not find a reliable way to do that. I use CodeFresh for backend building and AWS Amplify for frontend.

Patching process for Grafana that is deployed using helm chart

I have deployed Grafana using helm chart and Terraform. We have exposed version as a input property so, we can run same script to update the version. I also have to support patching(any patch security etc.) similarly but I have no knowledge on how patches are released and how to apply them using Helm for Grafana..
Can someone please let me know ?
Thanks.
Thanks for taking a look at this. I am able to get solution for this, patches are released as minor versions and it is no different from version upgrade.
Thanks.

Spring Data Flow Helm chart: Is there a way to declare creation of applications and tasks within the helm charts?

The only way I am running into is using curl command as per the docs: https://docs.spring.io/spring-cloud-dataflow/docs/2.7.1/reference/htmlsingle/#resources-app-registry-post
This uses a curl command to hit the api. Which I can develop a script for, but I would like to set this up within the helm charts so that these tasks and applications are created when the helm chart is deployed. Any ideas?
Please check Spring Cloud Data Flow, Helm Installation, Register prebuilt applications, it says:
Applications can be registered individually using the app register functionality or as a group using the app import functionality.
So, I guess you always need to start the app using Helm Chart and only later register the applications using app or REST Endpoint.

How do I change cassandra.yaml when building an environment with Terraform?

I will build the environment using the following Terraform.
https://github.com/scalar-labs/scalar-terraform
I want to fix the cassandra.yaml placed in a Cassandra instance with Terraform.
How do I change the Terraform?
You need to actually update the cassandra.yaml.j2 of the Cassandra module.
provision/ansible/playbooks/roles/cassandra/templates/cassandra.yaml.j2
It is not very recommended since you need to maintain the module itself if you do this.

How to access helm programmatically

I'd like to access cluster deployed Helm charts programmatically to make web interface which will allow manual chart manipulation.
I found pyhelm but it supports only Helm 2. I looked on npm, but nothing there. I wrote a bash script but if I try to use it's output I get just a string really so it's not really useful.
I'd like to access cluster deployed Helm charts programmatically to make web interface which will allow manual chart manipulation.
Helm 3 is different than previous versions in that it is a client only tool, similar to e.g. Kustomize. This means that helm charts only exists on the client (and in chart repositories) but is then transformed to a kubernetes manifest during deployment. So only Kubernetes objects exists in the cluster.
Kubernetes API is a REST API so you can access and get Kubernetes objects using a http client. Kubernetes object manifests is available in JSON and Yaml formats.
If you are OK to use Go then you can use the Helm 3 Go API.
If you want to use Python, I guess you'll have to wait for the Helm v3 support of pyhelm, there is already an issue addressing this.
reached this as we also need an npm package to deploy helm3 charts programmatically (sorta whitelabel app with a gui to manage the instances).
Only thing I could find was an old discontinued package from microsoft for helm v2 https://github.com/microsoft/helm-web-api/tree/master/on-demand-micro-services-deployment-k8s
I dont think using k8s API would work, as some charts can get fairly complex in terms of k8s resources, so I got some inspiration and I think I will develop my own package as a wrapper to the helm cli commands, using -o json param for easier handling of the CLI output