commit 1f5e3ad8c76ba158217631b85caf92e1e2b17de4 Author: Phil Sphicas Date: Sun Oct 4 23:54:50 2020 +0000 Fix disappearing metacontroller CRDs on upgrade The existing metacontroller chart conditionally only renders the CRDs if the metacontroller does not exist. This creates an oscillatory effect every time the chart is upgraded - if CRDs are present, then they will be removed, and if they are absent, they will be installed. This change removes the metacontroller.k8s.io/v1alpha1 capabilities check, and relies on the values.yaml option 'manifests.crds' only to decide whether or not to render the CRDs. In an upgrade, tiller should do the right thing based on whether the CRDs need updating. Change-Id: I683c9e5695b7fcdddc8b6ef8622cddb96797111c diff --git a/metacontroller/Chart.yaml b/metacontroller/Chart.yaml index b9cc536..4d7078b 100644 --- a/metacontroller/Chart.yaml +++ b/metacontroller/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v0.4.2 description: A Helm chart for Metacontroller name: metacontroller -version: 0.1.1 +version: 0.1.2 home: https://metacontroller.app/ keywords: - CRDs diff --git a/metacontroller/templates/crds.yaml b/metacontroller/templates/crds.yaml index 0b89ec7..0355dbc 100644 --- a/metacontroller/templates/crds.yaml +++ b/metacontroller/templates/crds.yaml @@ -13,7 +13,6 @@ limitations under the License. */}} {{- if .Values.manifests.crds }} -{{- if not (.Capabilities.APIVersions.Has "metacontroller.k8s.io/v1alpha1") }} apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -332,4 +331,3 @@ spec: singular: controllerrevision kind: ControllerRevision {{- end }} -{{- end }}