-
Notifications
You must be signed in to change notification settings - Fork 20
/
00-operator.yml
88 lines (88 loc) · 1.99 KB
/
00-operator.yml
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
apiVersion: v1
kind: Namespace
metadata:
name: rook-minio-system
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: objectstores.minio.rook.io
spec:
group: minio.rook.io
names:
kind: ObjectStore
listKind: ObjectStoreList
plural: objectstores
singular: objectstore
scope: Namespaced
version: v1alpha1
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: rook-minio-operator
rules:
- apiGroups: [""]
resources: ["namespaces", "secrets", "pods", "services"]
verbs: ["get", "watch", "create", "update"]
- apiGroups: ["apps"]
resources: ["statefulsets"]
verbs: ["get", "create", "update"]
- apiGroups: ["minio.rook.io"]
resources: ["*"]
verbs: ["*"]
- apiGroups: ["rook.io"]
resources: ["*"]
verbs: ["*"]
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: rook-minio-operator
namespace: rook-minio-system
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-minio-operator
namespace: rook-minio-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: rook-minio-operator
subjects:
- kind: ServiceAccount
name: rook-minio-operator
namespace: rook-minio-system
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: rook-minio-operator
namespace: rook-minio-system
labels:
app: rook-minio-operator
spec:
selector:
matchLabels:
app: rook-minio-operator
replicas: 1
template:
metadata:
labels:
app: rook-minio-operator
spec:
serviceAccountName: rook-minio-operator
containers:
- name: rook-minio-operator
image: rook/minio:v1.1.2
args: ["minio", "operator"]
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace