Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RBAC version] update to rbac.authorization.k8s.io/v1 #353

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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