1
+ {{- $RBACAPIVersion := ternary "rbac.authorization.k8s.io/v1" "rbac.authorization.k8s.io/v1beta1" (.Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1") -}}
1
2
apiVersion : v1
2
3
kind : ServiceAccount
3
4
metadata :
@@ -11,7 +12,7 @@ metadata:
11
12
# Grant the webhook permission to read the ConfigMap containing the Kubernetes
12
13
# apiserver's requestheader-ca-certificate.
13
14
# This ConfigMap is automatically created by the Kubernetes apiserver.
14
- apiVersion : rbac.authorization.k8s.io/v1beta1
15
+ apiVersion : {{ $RBACAPIVersion }}
15
16
kind : RoleBinding
16
17
metadata :
17
18
name : {{ include "dnsimple-webhook.fullname" . }}:webhook-authentication-reader
@@ -33,7 +34,7 @@ subjects:
33
34
---
34
35
# apiserver gets the auth-delegator role to delegate auth decisions to
35
36
# the core apiserver
36
- apiVersion : rbac.authorization.k8s.io/v1beta1
37
+ apiVersion : {{ $RBACAPIVersion }}
37
38
kind : ClusterRoleBinding
38
39
metadata :
39
40
name : {{ include "dnsimple-webhook.fullname" . }}:auth-delegator
@@ -53,7 +54,7 @@ subjects:
53
54
namespace : {{ .Release.Namespace }}
54
55
---
55
56
# Grant cert-manager permission to validate using our apiserver
56
- apiVersion : rbac.authorization.k8s.io/v1beta1
57
+ apiVersion : {{ $RBACAPIVersion }}
57
58
kind : ClusterRole
58
59
metadata :
59
60
name : {{ include "dnsimple-webhook.fullname" . }}:domain-solver
70
71
verbs :
71
72
- ' create'
72
73
---
73
- apiVersion : rbac.authorization.k8s.io/v1beta1
74
+ apiVersion : {{ $RBACAPIVersion }}
74
75
kind : ClusterRoleBinding
75
76
metadata :
76
77
name : {{ include "dnsimple-webhook.fullname" . }}:domain-solver
0 commit comments