Skip to content

Commit

Permalink
Issue 329: CRD apiVersion check (#330)
Browse files Browse the repository at this point in the history
* CRD apiVersion check

* change apiVersion from rbac.authorization.k8s.io/v1beta to rbac.authorization.k8s.io/v1 on the pre-delete-hooks
  • Loading branch information
lspecian-olx authored May 24, 2021
1 parent a99c93b commit fd714b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/zookeeper-operator/templates/pre-delete-hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if .Values.hooks.delete }}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ template "zookeeper-operator.fullname" . }}-pre-delete
annotations:
Expand All @@ -18,7 +18,7 @@ rules:
---

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ template "zookeeper-operator.fullname" . }}-pre-delete
annotations:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{- if .Values.crd.create }}
{{- if .Capabilities.APIVersions.Has "apiextensions.k8s.io/v1" }}
apiVersion: apiextensions.k8s.io/v1
{{- else }}
apiVersion: apiextensions.k8s.io/v1beta1
{{- end }}
kind: CustomResourceDefinition
metadata:
name: zookeeperclusters.zookeeper.pravega.io
Expand Down

0 comments on commit fd714b4

Please sign in to comment.