From 1f5e3ad8c76ba158217631b85caf92e1e2b17de4 Mon Sep 17 00:00:00 2001 From: Phil Sphicas Date: Sun, 4 Oct 2020 23:54:50 +0000 Subject: [PATCH] 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 --- metacontroller/Chart.yaml | 2 +- metacontroller/templates/crds.yaml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/metacontroller/Chart.yaml b/metacontroller/Chart.yaml index b9cc5366c..4d7078b5f 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 0b89ec744..0355dbc7d 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 }}