Update charts to use stable Kubernetes APIs

Update applicable charts to use non-deprecated APIs [0], specifically
addressing the following resource types:
* ClusterRole
* ClusterRoleBinding
* Role
* Rolebinding

The APIs being migrated to are available in v1.19 or earlier. As of this
change, v1.19 is the oldest supported Kubernetes version, slated for EOL
on 2021-10-28. [1]

0: https://kubernetes.io/docs/reference/using-api/deprecation-guide/
1: https://kubernetes.io/releases/
Change-Id: I134b201d9ae01a8d74e34ee14f3bfe3b960cb5aa
This commit is contained in:
Phil Sphicas 2021-10-15 11:44:06 -07:00
parent e14854bb3e
commit e4d9d99c13
2 changed files with 6 additions and 6 deletions

View File

@ -23,7 +23,7 @@ kind: ServiceAccount
metadata:
name: {{ $serviceAccountName }}
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ $serviceAccountName }}-cluster
@ -40,7 +40,7 @@ rules:
- update
- patch
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ $serviceAccountName }}-cluster
@ -53,7 +53,7 @@ subjects:
name: {{ $serviceAccountName }}
namespace: {{ $envAll.Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ $serviceAccountName }}-{{ $envAll.Release.Namespace }}
@ -66,7 +66,7 @@ rules:
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ $serviceAccountName }}-{{ $envAll.Release.Namespace }}

View File

@ -18,7 +18,7 @@ limitations under the License.
{{- $serviceAccountName := "etcd-backup" }}
{{- $applicationName := "etcd-backup" }}
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Values.service.name }}-{{ $serviceAccountName }}
@ -49,7 +49,7 @@ metadata:
name: {{ .Values.service.name }}-{{ $serviceAccountName }}
namespace: {{ $envAll.Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ .Values.service.name }}-{{ $serviceAccountName }}