Talk:Kubernetes/Upstream Helm charts policy

Rendered with Parsoid
From Wikitech
Latest comment: 5 months ago by JMeybohm in topic Best practices

Best practices

Should we add a something along the lines of best practices for "adopting" upstream charts? I'm thinking of things like:

  • Commit the upstream source in one CR, then make changes in a second (to make reviews and rebasing more easy)
  • Keep track of the upstream version number that was last imported (in Chart.yaml) and don't use "-wmf" suffix in version
  • Wherever possible, just add new template files rather than editing existing ones
  • If editing existing templates, highlight them somehow (comments)

JMeybohm (talk) 09:17, 28 June 2023 (UTC)Reply

OK in the other 3, I 'll add them mostly as is, but I 'd like some more information on this bullet point:
  • Keep track of the upstream version number that was last imported (in Chart.yaml) and don't use "-wmf" suffix in version
Care to elaborate a bit, e.g. with a example regarding how to keep track of the upstream version number? Alexandros Kosiaris (talk) 14:18, 13 July 2023 (UTC)Reply
Currently it's just a free form comment in come Chart.yaml files, see https://gerrit.wikimedia.org/r/plugins/gitiles/operations/deployment-charts/+/refs/heads/master/charts/cert-manager/Chart.yaml#4 or https://gerrit.wikimedia.org/r/plugins/gitiles/operations/deployment-charts/+/refs/heads/master/charts/flink-kubernetes-operator/Chart.yaml#6
I think having this (maybe defining a format even) helps with further updates of the chart because one can easily diff out what was changed in the wmf fork. The appVersion key might not be the best choice as many charts use that in the templates to reference a default container image tag for example. JMeybohm (talk) 12:55, 17 July 2023 (UTC)Reply
I now see that there is an annotations field specified in Chart.yaml (https://helm.sh/docs/topics/charts/#the-chartyaml-file). So we could specify an annotation (wmf/upstreamVersion) to keep track of that in a more standardized fashion. JMeybohm (talk) 13:18, 11 August 2023 (UTC)Reply

I have added the wmf/upstreamVersion annotation to the best practices section.JMeybohm (talk) 10:19, 12 December 2023 (UTC)Reply

Infra vs service charts

I notice that there is no distinction made between the potential use of upstream charts for admin_ng based deployments and those under the services directories.

I recall that it was at some point discussed about there possibly being a greater preference for using the scaffolding for regular services, as opposed to more 'infrastructure-like' deployments in admin_ng. Did we decide against this in the end? Btullis (talk) 10:09, 28 June 2023 (UTC)Reply

Indeed we had that discussion, but we did not explicitly end up saying that admin_ng would have a particularly preferential treatment, even if we kinda hinted at it. Per Stef's comment[1] , despite calling it a policy, it's more of a playbook anyway and we kinda aim to be flexible while still investigating this space. So I 'd say we aren't entirely decided on this yet. Experience will tell, I guess. Alexandros Kosiaris (talk) 14:27, 13 July 2023 (UTC)Reply