Update templates/deployment.yaml to use `apps/v1`
extensions/v1beta1
has been deprecated for a while now.
It is also causing issues such as https://gitlab.com/gitlab-org/gitlab-ce/issues/50186 and also required for gitlab-org&1948 (closed)
Details
- upgrade apiVersion of the deployment to
apps/v1
-
spec.selector
must be a subset of.spec.template.metadata.labels
inapps/v1
Proposal
-
First update to
spec.selector
must be a subset of.spec.template.metadata.labels
inapps/v1
-
Upgrade api version to
apps/v1
without breaking existing installs by checking the kubernetes version and setting them appropriately (see https://github.com/helm/charts/pull/17268/files#diff-612f95a0a93380dd9323d02c0c4c47d8R178)
* Maybe something like https://github.com/helm/charts/commit/2f322ebbaaa9ac984daa5939c1296c507b3ba1e0
* Add
spec.selector.matchLabels.app
and spec.selector.matchLabels.release
- it should be unique enough ?* Test deploying an older deployment on master
then switch to this new branch to see if it will work seamlessly or not.
Links
- Nice to have: Use kubernetes recommended labels https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/ and https://helm.sh/docs/topics/chart_best_practices/labels/