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 }} 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 }} 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 }} 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"