From ec041b7562d4e116f4cf6d665216930fc8b3d98d Mon Sep 17 00:00:00 2001 From: Zeeshan Haider Date: Thu, 25 Mar 2021 10:23:08 +0400 Subject: [PATCH 1/4] Updated [apiVersion] and [spec:selector] Updated [apiVersion] and [spec:selector] --- chart/redis-operator/templates/deployment.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chart/redis-operator/templates/deployment.yaml b/chart/redis-operator/templates/deployment.yaml index 37446097..d55b9c0e 100644 --- a/chart/redis-operator/templates/deployment.yaml +++ b/chart/redis-operator/templates/deployment.yaml @@ -1,4 +1,6 @@ -apiVersion: extensions/v1beta1 +# changed: `extensions/v1beta1` -> `apps/v1` +# reason: Deployment is part of apps/v1 api now not extensions +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "fullname" . }} @@ -8,6 +10,10 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: + # added: `selector` + selector: + matchLabels: + app: {{ template "name" . }} replicas: {{ .Values.replicaCount }} strategy: type: {{ .Values.strategy }} From 340eeeb7f590de26cbbd64fad34312289a83829d Mon Sep 17 00:00:00 2001 From: Zeeshan Haider Date: Thu, 25 Mar 2021 10:29:07 +0400 Subject: [PATCH 2/4] Updated [apiVersion] Updated [apiVersion] --- chart/redis-operator/templates/rbac.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/chart/redis-operator/templates/rbac.yaml b/chart/redis-operator/templates/rbac.yaml index 1ceaac69..28e1ae42 100644 --- a/chart/redis-operator/templates/rbac.yaml +++ b/chart/redis-operator/templates/rbac.yaml @@ -1,8 +1,10 @@ -{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1beta1" }} +# changed: "rbac.authorization.k8s.io/v1beta1" -> "rbac.authorization.k8s.io/v1" +# reason: receiving warnings +{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }} apiVersion: v1 kind: List items: -- apiVersion: rbac.authorization.k8s.io/v1beta1 +- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: redis-operator @@ -29,7 +31,7 @@ items: resources: - poddisruptionbudgets verbs: ["*"] -- apiVersion: rbac.authorization.k8s.io/v1beta1 +- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: redis-operator @@ -41,4 +43,4 @@ items: - kind: ServiceAccount name: {{ .Values.serviceAccount }} namespace: {{ .Release.Namespace }} -{{ end }} \ No newline at end of file +{{ end }} From 6c3ebe2a8854de6704f92b48f76afe9d2938ee36 Mon Sep 17 00:00:00 2001 From: Zeeshan Haider Date: Thu, 25 Mar 2021 10:30:15 +0400 Subject: [PATCH 3/4] Updated [apiVersion] Updated [apiVersion] --- chart/redis-cluster/templates/rbac.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/chart/redis-cluster/templates/rbac.yaml b/chart/redis-cluster/templates/rbac.yaml index e26aa940..b95ce8dc 100644 --- a/chart/redis-cluster/templates/rbac.yaml +++ b/chart/redis-cluster/templates/rbac.yaml @@ -1,8 +1,10 @@ -{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1beta1" }} +# changed: "rbac.authorization.k8s.io/v1beta1" -> "rbac.authorization.k8s.io/v1" +# reason: receiving warnings +{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }} apiVersion: v1 kind: List items: -- apiVersion: rbac.authorization.k8s.io/v1beta1 +- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: {{ template "serviceaccount" . }} @@ -14,7 +16,7 @@ items: - endpoints - pods verbs: ["list", "get"] -- apiVersion: rbac.authorization.k8s.io/v1beta1 +- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: {{ template "serviceaccount" . }} @@ -26,4 +28,4 @@ items: - kind: ServiceAccount name: {{ template "serviceaccount" . }} namespace: {{ .Release.Namespace }} -{{ end }} \ No newline at end of file +{{ end }} From 09bd3a085376c65a06d5993731f842cb816ade59 Mon Sep 17 00:00:00 2001 From: Zeeshan Haider Date: Thu, 25 Mar 2021 10:31:12 +0400 Subject: [PATCH 4/4] Updated [apiVersion] Updated [apiVersion] --- examples/RedisCluster_RBAC.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/RedisCluster_RBAC.yaml b/examples/RedisCluster_RBAC.yaml index 9298d1ad..3f2e6e68 100644 --- a/examples/RedisCluster_RBAC.yaml +++ b/examples/RedisCluster_RBAC.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: List items: -- apiVersion: rbac.authorization.k8s.io/v1beta1 +- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: redis-node @@ -13,7 +13,7 @@ items: - endpoints - pods verbs: ["list", "get"] -- apiVersion: rbac.authorization.k8s.io/v1beta1 +- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: redis-node-default @@ -29,4 +29,4 @@ items: - apiVersion: v1 kind: ServiceAccount metadata: - name: "redis-node" \ No newline at end of file + name: "redis-node"