blob: 3b9910eb7e3999054e0232013ac2b11003397245 [file] [log] [blame]
giolekvab0b7f002020-04-16 16:05:40 +04001apiVersion: v1
2kind: Namespace
3metadata:
4 name: minio-operator-ns
5---
6apiVersion: apiextensions.k8s.io/v1beta1
7kind: CustomResourceDefinition
8metadata:
9 name: minioinstances.miniocontroller.min.io
10spec:
11 group: miniocontroller.min.io
12 version: v1beta1
13 scope: Namespaced
14 names:
15 kind: MinIOInstance
16 singular: minioinstance
17 plural: minioinstances
18 preserveUnknownFields: true
19 validation:
20 # openAPIV3Schema is the schema for validating custom objects.
21 # Refer https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#specifying-a-structural-schema
22 # for more details
23 openAPIV3Schema:
24 type: object
25 properties:
26 spec:
27 type: object
28 properties:
29 replicas:
30 type: integer
31 minimum: 1
32 maximum: 32
33 version:
34 type: string
35 mountpath:
36 type: string
37 subpath:
38 type: string
39 additionalPrinterColumns:
40 - name: Replicas
41 type: integer
42 JSONPath: ".spec.replicas"
43---
44apiVersion: rbac.authorization.k8s.io/v1beta1
45kind: ClusterRole
46metadata:
47 name: minio-operator-role
48rules:
49- apiGroups:
50 - ""
51 resources:
52 - namespaces
53 - secrets
54 - pods
55 - services
56 - events
57 verbs:
58 - get
59 - watch
60 - create
61 - list
62 - patch
63- apiGroups:
64 - apps
65 resources:
66 - statefulsets
67 verbs:
68 - get
69 - create
70 - list
71 - patch
72 - watch
73 - update
74- apiGroups:
75 - "certificates.k8s.io"
76 resources:
77 - "certificatesigningrequests"
78 - "certificatesigningrequests/approval"
79 - "certificatesigningrequests/status"
80 verbs:
81 - update
82 - create
83 - get
84- apiGroups:
85 - miniocontroller.min.io
86 resources:
87 - "*"
88 verbs:
89 - "*"
90- apiGroups:
91 - min.io
92 resources:
93 - "*"
94 verbs:
95 - "*"
96---
97apiVersion: v1
98kind: ServiceAccount
99metadata:
100 name: minio-operator-sa
101 namespace: minio-operator-ns
102---
103kind: ClusterRoleBinding
104apiVersion: rbac.authorization.k8s.io/v1beta1
105metadata:
106 name: minio-operator-binding
107 namespace: minio-operator-ns
108roleRef:
109 apiGroup: rbac.authorization.k8s.io
110 kind: ClusterRole
111 name: minio-operator-role
112subjects:
113- kind: ServiceAccount
114 name: minio-operator-sa
115 namespace: minio-operator-ns
116---
117apiVersion: apps/v1
118kind: Deployment
119metadata:
120 name: minio-operator
121 namespace: minio-operator-ns
122spec:
123 replicas: 1
124 selector:
125 matchLabels:
126 name: minio-operator
127 template:
128 metadata:
129 labels:
130 name: minio-operator
131 spec:
132 serviceAccountName: minio-operator-sa
133 containers:
134 - name: minio-operator
135 image: minio/k8s-operator:1.0.7
136 imagePullPolicy: IfNotPresent