Skip to content
Open
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
10 changes: 6 additions & 4 deletions chart/redis-cluster/templates/rbac.yaml
Original file line number Diff line number Diff line change
@@ -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" . }}
Expand All @@ -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" . }}
Expand All @@ -26,4 +28,4 @@ items:
- kind: ServiceAccount
name: {{ template "serviceaccount" . }}
namespace: {{ .Release.Namespace }}
{{ end }}
{{ end }}
8 changes: 7 additions & 1 deletion chart/redis-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -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" . }}
Expand All @@ -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 }}
Expand Down
10 changes: 6 additions & 4 deletions chart/redis-operator/templates/rbac.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -41,4 +43,4 @@ items:
- kind: ServiceAccount
name: {{ .Values.serviceAccount }}
namespace: {{ .Release.Namespace }}
{{ end }}
{{ end }}
6 changes: 3 additions & 3 deletions examples/RedisCluster_RBAC.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -29,4 +29,4 @@ items:
- apiVersion: v1
kind: ServiceAccount
metadata:
name: "redis-node"
name: "redis-node"