forked from RedisLabs/redis-enterprise-k8s-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openshift.bundle.yaml
142 lines (141 loc) · 3.42 KB
/
openshift.bundle.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: redis-enterprise-operator-sb
rules:
- apiGroups: ["servicecatalog.k8s.io"]
resources: ["clusterservicebrokers"]
verbs: ["*"]
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: redis-enterprise-operator
rules:
- apiGroups: ["rbac.authorization.k8s.io", ""]
resources: ["roles", "serviceaccounts", "rolebindings"]
verbs: ["*"]
- apiGroups:
- app.redislabs.com
resources:
- "*"
verbs:
- "*"
- apiGroups: [""]
resources: ["secrets"]
verbs: ["*"]
- apiGroups: [""]
resources: ["endpoints"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create"]
- apiGroups: ["apps"]
resources: ["deployments", "statefulsets"]
verbs: ["*"]
- apiGroups: ["policy"]
resources: ["poddisruptionbudgets"]
verbs: ["create", "delete", "get"]
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["create", "delete", "get" , "update", "list", "watch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["create", "delete", "get" , "update"]
# needed rbac rules for services controller
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list", "update", "patch"]
- apiGroups: [""]
resources: ["services"]
verbs: ["get", "watch", "list", "update", "patch", "create", "delete"]
- apiGroups:
- route.openshift.io
resources: ["routes", "routes/custom-host"]
verbs: ["*"]
- apiGroups: ["extensions"]
resources: ["podsecuritypolicies"]
resourceNames:
- redis-enterprise-psp
verbs:
- use
- apiGroups: ["extensions"]
resources: ["ingresses"]
verbs: ["*"]
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: redis-enterprise-operator
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: redis-enterprise-operator
subjects:
- kind: ServiceAccount
name: redis-enterprise-operator
roleRef:
kind: Role
name: redis-enterprise-operator
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: redisenterpriseclusters.app.redislabs.com
spec:
group: app.redislabs.com
names:
kind: RedisEnterpriseCluster
listKind: RedisEnterpriseClusterList
plural: redisenterpriseclusters
singular: redisenterprisecluster
shortNames:
- rec
subresources:
status: {}
scope: Namespaced
version: v1
versions:
- name: v1
served: true
storage: false
- name: v1alpha1
served: true
storage: true
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: redis-enterprise-operator
spec:
replicas: 1
selector:
matchLabels:
name: redis-enterprise-operator
template:
metadata:
labels:
name: redis-enterprise-operator
spec:
serviceAccount: redis-enterprise-operator
containers:
- name: redis-enterprise-operator
image: redislabs/operator:5.4.10-8.rhel7
securityContext:
runAsUser: 1001
command:
- redis-enterprise-operator
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
---