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
This commit is contained in:
Phil Sphicas 2020-10-04 23:54:50 +00:00
parent 9d5b9a9e42
commit 1f5e3ad8c7
2 changed files with 1 additions and 3 deletions

View File

@ -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

View File

@ -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 }}