From e4d9d99c13c7b530ee2816e661438634aaa3aea3 Mon Sep 17 00:00:00 2001 From: Phil Sphicas Date: Fri, 15 Oct 2021 11:44:06 -0700 Subject: [PATCH] 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 --- charts/apiserver/templates/job-key-rotate.yaml | 8 ++++---- charts/etcd/templates/cron-job-etcd-backup.yaml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/apiserver/templates/job-key-rotate.yaml b/charts/apiserver/templates/job-key-rotate.yaml index 0d614c95..f008c096 100644 --- a/charts/apiserver/templates/job-key-rotate.yaml +++ b/charts/apiserver/templates/job-key-rotate.yaml @@ -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 }} diff --git a/charts/etcd/templates/cron-job-etcd-backup.yaml b/charts/etcd/templates/cron-job-etcd-backup.yaml index 79354815..c064599b 100644 --- a/charts/etcd/templates/cron-job-etcd-backup.yaml +++ b/charts/etcd/templates/cron-job-etcd-backup.yaml @@ -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 }}