Skip to content

Commit

Permalink
Merge pull request #132 from Cryptophobia/kingdonb-k8s-1-16-chart-update
Browse files Browse the repository at this point in the history
chore(controller): permit umbrella override api group #2
  • Loading branch information
Cryptophobia authored Oct 1, 2020
2 parents 20506f4 + 49286c9 commit 5b37960
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
9 changes: 9 additions & 0 deletions charts/controller/templates/_helpers.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ rbac.authorization.k8s.io/v1alpha1
rbac.authorization.k8s.io/v1
{{- end -}}
{{- end -}}
{{- define "APIVersion" -}}
{{- if .Capabilities.APIVersions.Has "apps/v1" -}}
apps/v1
{{- else if .Capabilities.APIVersions.Has "extensions/v1beta1" -}}
extensions/v1beta1
{{- else -}}
apps/v1
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/controller/templates/controller-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ rules:
- apiGroups: [""]
resources: ["resourcequotas"]
verbs: ["get", "create"]
- apiGroups: ["extensions"]
- apiGroups: ["extensions", "apps"]
resources: ["replicasets"]
verbs: ["get", "list", "delete", "update"]
- apiGroups: ["extensions", "apps"]
Expand Down
8 changes: 1 addition & 7 deletions charts/controller/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
{{- if .Capabilities.APIVersions.Has "apps/v1" }}
apiVersion: apps/v1
{{- else if .Capabilities.APIVersions.Has "extensions/v1beta1" }}
apiVersion: extensions/v1beta1
{{- else }}
apiVersion: apps/v1
{{- end }}
apiVersion: {{ template "APIVersion" . }}
kind: Deployment
metadata:
name: deis-controller
Expand Down

0 comments on commit 5b37960

Please sign in to comment.