Skip to content

Commit

Permalink
[RBAC version] update manifests to rbac.authorization.k8s.io/v1
Browse files Browse the repository at this point in the history
Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
  • Loading branch information
surajssd committed Sep 7, 2018
1 parent 9eae1e5 commit b460488
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 34 deletions.
6 changes: 3 additions & 3 deletions examples/rbac-restricted/minikube.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Wide open access to the cluster (mostly for kubelet)
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-writer
rules:
Expand All @@ -12,7 +12,7 @@ rules:
---
# Full read access to the api and resources
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-reader
rules:
Expand All @@ -24,7 +24,7 @@ rules:
---
# Give admin, kubelet, kube-system, kube-proxy god access
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-write
subjects:
Expand Down
6 changes: 3 additions & 3 deletions examples/rbac/minikube.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Wide open access to the cluster (mostly for kubelet)
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-writer
rules:
Expand All @@ -12,7 +12,7 @@ rules:
---
# Full read access to the api and resources
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-reader
rules:
Expand All @@ -24,7 +24,7 @@ rules:
---
# Give admin, kubelet, kube-system, kube-proxy god access
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-write
subjects:
Expand Down
4 changes: 2 additions & 2 deletions examples/rbac/rbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: ServiceAccount
metadata:
name: habitat-operator
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: habitat-operator
Expand All @@ -16,7 +16,7 @@ subjects:
name: habitat-operator
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: habitat-operator
Expand Down
6 changes: 0 additions & 6 deletions helm/habitat-operator/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
{{- if not .Values.operatorNamespaced }}
# Create this file only when the operator is meant to run clusterwide
{{- if .Values.rbacEnable }}
{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1beta1" }}
apiVersion: rbac.authorization.k8s.io/v1beta1
{{- else if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1alpha1" }}
apiVersion: rbac.authorization.k8s.io/v1alpha1
{{- else if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }}
apiVersion: rbac.authorization.k8s.io/v1
{{- end }}
kind: ClusterRole
metadata:
labels:
Expand Down
6 changes: 0 additions & 6 deletions helm/habitat-operator/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
{{- if not .Values.operatorNamespaced }}
# Create this file only when the operator is meant to run clusterwide
{{- if .Values.rbacEnable }}
{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1beta1" }}
apiVersion: rbac.authorization.k8s.io/v1beta1
{{- else if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1alpha1" }}
apiVersion: rbac.authorization.k8s.io/v1alpha1
{{- else if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }}
apiVersion: rbac.authorization.k8s.io/v1
{{- end }}
kind: ClusterRoleBinding
metadata:
labels:
Expand Down
6 changes: 0 additions & 6 deletions helm/habitat-operator/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{{- if .Values.operatorNamespaced }}
{{- if .Values.rbacEnable }}
{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1beta1" }}
apiVersion: rbac.authorization.k8s.io/v1beta1
{{- else if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1alpha1" }}
apiVersion: rbac.authorization.k8s.io/v1alpha1
{{- else if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }}
apiVersion: rbac.authorization.k8s.io/v1
{{- end }}
kind: Role
metadata:
labels:
Expand Down
6 changes: 0 additions & 6 deletions helm/habitat-operator/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{{- if .Values.operatorNamespaced }}
{{- if .Values.rbacEnable }}
{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1beta1" }}
apiVersion: rbac.authorization.k8s.io/v1beta1
{{- else if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1alpha1" }}
apiVersion: rbac.authorization.k8s.io/v1alpha1
{{- else if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }}
apiVersion: rbac.authorization.k8s.io/v1
{{- end }}
kind: RoleBinding
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: habitat-operator-v1beta1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: habitat-operator-v1beta1
Expand Down

0 comments on commit b460488

Please sign in to comment.