Helmfile: How to create K8s objects like PriorityClass alongside charts?

Created on 3 May 2019  路  3Comments  路  Source: roboll/helmfile

We're using the "official" gcloud-sqlproxy chart, but node upgrades right now are quite painful as other charts get scheduled before the proxy and start throwing errors due to the missing database connection.

After doing a bit of reading it sounds like setting pod priority using a PriorityClass and the priorityClassName annotation could solve the issue, but after doing a fair bit of reserach I couldn't find any obvious way to create the PriorityClass Kubernetes object alongside the proxy chart.

Is there a way to make this use case work in particular or Kubernetes objects created outside of charts in general?

Now thinking of it, is the solution to set up a chart for these global objects? If so, is there a way to guarantee that chart would be created before other charts to ensure the K8s object exists?

question

Most helpful comment

Thanks a lot for your replies @mumoshu, really appreciated!

I have been working on other priorities (pun not intended 馃樄) so couldn't try the approaches you suggested, but I must say I particularly like the idea of helm-x integration as it would make the chart extension the most obvious! I'll report back once I got a solution working.

As an aside weaveworks/flagger referenced in #649 looks really useful too!

All 3 comments

@daaain Hey!

incubator/raw chart can be used to turn a set of k8s resource definitions into a helm chart. For more information, I'd suggest reading https://github.com/roboll/helmfile/issues/494#issuecomment-474697430.

You can use sub-helmfiles(helmfiles: in your helmfile.yaml) for ordering. https://github.com/roboll/helmfile/issues/137 would help getting more context on this. Let me also add that there's no guaranteed ordering in releases: though, as one of helmfile's ability is parallelize those by setting --concurrency=N.

649 would allow you to add any K8s resources into your helm release, without modifying or forking the chart at all. I hope either that or the standard usage og incubator/chart solves your issue 馃槂

Thanks a lot for your replies @mumoshu, really appreciated!

I have been working on other priorities (pun not intended 馃樄) so couldn't try the approaches you suggested, but I must say I particularly like the idea of helm-x integration as it would make the chart extension the most obvious! I'll report back once I got a solution working.

As an aside weaveworks/flagger referenced in #649 looks really useful too!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RafalMaleska picture RafalMaleska  路  3Comments

maver1ck picture maver1ck  路  3Comments

aslafy-z picture aslafy-z  路  4Comments

mumoshu picture mumoshu  路  4Comments

ivandardi picture ivandardi  路  3Comments