Patching process for Grafana that is deployed using helm chart - kubernetes-helm

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.

Related

How to modify Kubeflow source code before deploying it with Kubernetes?

I encountered the same issue as in https://github.com/kubeflow/kubeflow/issues/6014 with my Kubeflow app. The fix is very simple (just a type casting), then I would like to fix it myself and redeploy Kubeflow.
The problem is that I am running a k3s cluster on my local machine where I have installed Kubeflow bundle via Juju. Then, I cannot change the source code.
How to modify Kubeflow source code before deploying it with Kubernetes?
Should I use the manifest installation https://github.com/kubeflow/manifests#installation ? or a totally different method?
Thank you.
The bug was fixed in the last version of the manifests, then I have finally installed kubeflow directly from the manifests.
But still I am in touch with one Kubeflow developer, I will post here the right way to do modify/deploy if interested.
You got to check out their Github repo. Make changes and use kustomize to install like explained in their wiki. If you check the example folder you can see that it points to all other component folders.
https://github.com/kubeflow/manifests#install-with-a-single-command
One another hack could be, just look for the controllers in Kubernetes eg., deployments created for kubeflow, then modify them; works only if your changes are only related to Kubernetes resource definitions. I suggest going with the first option above for a clean development experience, and hey, that way can you contribute back to the kubeflow project as well, if you changes will benefit others.

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

Generate docker-compose.yaml from Helm charts

I am interested in generating docker-compose.yaml files from Helm charts. Is there a good way or tool to do this?
I realize that this is in the opposite direction from what most people are doing. Why I want to do this:
Our production systems run Kubernetes via Helm charts. We've got a full blown k8s and Helm setup already; no need to use a tool like Kompose to get us there. The question is how to convert Helm to docker-compose, not the other way around.
We want our Helm charts to be the single authoritative source of container configuration. They are able to describe a superset of what docker-compose can.
Running a set of services using Helm on a development machine is more time and resource consuming than running the same set of services via docker-compose. We do not want to slow development down by having engineers run using Helm/k8s.
We do not want to maintain two sets of configurations.
Can anybody recommend how to do this, or suggest a different solution to the time/resources issue encountered on development machines?

How to expose helm to kubernetes deployment which is with golang application

I am writing a Golang application which is more like automating the helm install, so I would like to know how to expose helm to your Kubernetes deployment or any API that creates helm object which can communicate with the tiller directly for the instruction, please describe the answer with a piece of code. thanks
I have been trying with the package https://godoc.org/k8s.io/helm/pkg/helm but does not really know what are the parameters that we need to pass when creating helm client
Not to discourage you, but I thought I should point out that Helm is nearing a v3 release, which will entirely remove tiller, and hence the client will likely change also.
Here are some relevant links:
Helm v3.0.0-beta.3 release notes
Helm v3 Beta 1 Released blog post
Hope this helps.

How to deploy kubernetes 1.6 without kubeadm?

I'm a bit confused about what version of kubernetes I need and what method to use to deploy it.
I have deployed 1.5 the manual way. But there is a fix we need (PR-41597). This fix doesn't seem to have been merge in 1.5 but it is in 1.6.
But I can't find any way to install 1.6 without kubeadm. The documentation clearly states that kubeadm should not be used in production. And the kubeadm way does not allow for upgrades anyway. So I would prefer to stay away from kubeadm.
So I either have to get that fix merged in 1.5 or find a way to install 1.6 without kubeadm. Am I missing something here? Any help would be much appreciated. Thanks.
There are plenty of ways to install Kubernetes 1.6:
https://kubernetes.io/docs/getting-started-guides
For example, CoreOS's CloudFormation installer supports 1.6: https://coreos.com/kubernetes/docs/latest/kubernetes-on-aws.html#announcement-to-regular-users-of-kube-aws
As does Canonical's Juju templates: https://jujucharms.com/canonical-kubernetes/
If you need more specific assistance, please share more about your target environment (cloud/bare metal, OS, etc.).
A fairly low-level set of instructions can be found in https://github.com/kelseyhightower/kubernetes-the-hard-way; this may help you to tailor your own setup process.
For CentOS specifically, your best bet might be Kargo. This doesn't yet support 1.6, but it is active, so it should receive a 1.6 patch soon.