Skip to content

Commit bc8429b

Browse files
authored
Upgrade Operator to 3.0.1 (#201)
1 parent 3ac64b3 commit bc8429b

34 files changed

+833
-826
lines changed

cluster/cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package cluster
1818

1919
import (
20-
operator "github.com/minio/minio-operator/pkg/client/clientset/versioned"
20+
operator "github.com/minio/operator/pkg/client/clientset/versioned"
2121
"k8s.io/client-go/kubernetes"
2222
"k8s.io/client-go/rest"
2323
certutil "k8s.io/client-go/util/cert"

docs/mcs_operator_mode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ you can override this using `MCS_K8S_API_SERVER`, ie use the k8s cluster from `k
2525

2626
## Extract the Service account token and use it with MCS
2727

28-
For local development you can use the jwt associated to the `m3-sa` service account, you can get the token running
28+
For local development you can use the jwt associated to the `mcs-sa` service account, you can get the token running
2929
the following command in your terminal:
3030

3131
```

go.mod

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ require (
1717
github.com/jessevdk/go-flags v1.4.0
1818
github.com/json-iterator/go v1.1.10
1919
github.com/minio/cli v1.22.0
20-
github.com/minio/mc v0.0.0-20200719194630-c8a3b7bff08c
21-
github.com/minio/minio v0.0.0-20200714163805-778e9c864f67
22-
github.com/minio/minio-go/v6 v6.0.58-0.20200612001654-a57fec8037ec
23-
github.com/minio/minio-go/v7 v7.0.2-0.20200718235721-f0e2f3ae3678
24-
github.com/minio/minio-operator v0.0.0-20200713191021-de7c5283f7e5
20+
github.com/minio/mc v0.0.0-20200725183142-90d22b271f60
21+
github.com/minio/minio v0.0.0-20200725154241-abbf6ce6ccf8
22+
github.com/minio/minio-go/v7 v7.0.2-0.20200722162308-e0105ca08252
23+
github.com/minio/operator v0.0.0-20200725185636-4a625e4fbb31
2524
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
2625
github.com/satori/go.uuid v1.2.0
2726
github.com/stretchr/testify v1.6.1

go.sum

Lines changed: 45 additions & 156 deletions
Large diffs are not rendered by default.

k8s/console/base/mcs-cluster-role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ rules:
6464
- create
6565
- get
6666
- apiGroups:
67-
- operator.min.io
67+
- minio.min.io
6868
resources:
6969
- "*"
7070
verbs:

k8s/console/base/mcs-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spec:
1212
labels:
1313
app: mcs
1414
spec:
15-
serviceAccountName: m3-sa
15+
serviceAccountName: mcs-sa
1616
containers:
1717
- name: mcs
1818
image: minio/mcs:latest

k8s/console/base/minio-operator.yaml

Lines changed: 116 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: minio-operator
5+
---
16
apiVersion: apiextensions.k8s.io/v1
27
kind: CustomResourceDefinition
38
metadata:
4-
name: minioinstances.operator.min.io
9+
name: tenants.minio.min.io
510
spec:
6-
group: operator.min.io
11+
group: minio.min.io
712
scope: Namespaced
813
names:
9-
kind: MinIOInstance
10-
singular: minioinstance
11-
plural: minioinstances
14+
kind: Tenant
15+
singular: tenant
16+
plural: tenants
1217
versions:
1318
- name: v1
1419
served: true
@@ -24,49 +29,109 @@ spec:
2429
type: object
2530
x-kubernetes-preserve-unknown-fields: true
2631
properties:
27-
replicas:
28-
type: integer
29-
minimum: 1
30-
maximum: 32
32+
metadata:
33+
type: object
34+
x-kubernetes-preserve-unknown-fields: true
3135
image:
3236
type: string
3337
serviceName:
3438
type: string
35-
volumesPerServer:
36-
type: integer
39+
serviceAccountName:
40+
type: string
41+
zones:
42+
type: array
43+
items:
44+
type: object
45+
x-kubernetes-preserve-unknown-fields: true
46+
properties:
47+
name:
48+
type: string
49+
servers:
50+
type: integer
51+
volumesPerServer:
52+
type: integer
53+
volumeClaimTemplate:
54+
type: object
55+
x-kubernetes-preserve-unknown-fields: true
56+
resources:
57+
type: object
58+
x-kubernetes-preserve-unknown-fields: true
59+
nodeSelector:
60+
type: object
61+
x-kubernetes-preserve-unknown-fields: true
62+
affinity:
63+
type: object
64+
x-kubernetes-preserve-unknown-fields: true
65+
tolerations:
66+
type: object
67+
x-kubernetes-preserve-unknown-fields: true
3768
mountPath:
3869
type: string
3970
podManagementPolicy:
4071
type: string
41-
enum: [Parallel, OrderedReady]
72+
enum: [Parallel,OrderedReady]
4273
default: Parallel
4374
requestAutoCert:
4475
type: boolean
4576
default: false
77+
certConfig:
78+
type: object
79+
properties:
80+
commonName:
81+
type: string
82+
organizationName:
83+
type: array
84+
items:
85+
type: string
86+
dnsNames:
87+
type: array
88+
items:
89+
type: string
4690
version:
4791
type: string
4892
mountpath:
4993
type: string
5094
subpath:
5195
type: string
52-
mcs:
96+
nodeSelector:
97+
type: object
98+
x-kubernetes-preserve-unknown-fields: true
99+
credsSecret:
100+
type: object
101+
x-kubernetes-preserve-unknown-fields: true
102+
env:
103+
type: object
104+
x-kubernetes-preserve-unknown-fields: true
105+
console:
53106
type: object
54107
x-kubernetes-preserve-unknown-fields: true
55108
properties:
109+
metadata:
110+
type: object
111+
x-kubernetes-preserve-unknown-fields: true
56112
image:
57113
type: string
58114
replicas:
59115
type: integer
60116
default: 2
61-
mcsSecret:
117+
consoleSecret:
62118
type: object
63119
properties:
64120
name:
65121
type: string
122+
resources:
123+
type: object
124+
x-kubernetes-preserve-unknown-fields: true
125+
env:
126+
type: object
127+
x-kubernetes-preserve-unknown-fields: true
66128
kes:
67129
type: object
68130
x-kubernetes-preserve-unknown-fields: true
69131
properties:
132+
metadata:
133+
type: object
134+
x-kubernetes-preserve-unknown-fields: true
70135
image:
71136
type: string
72137
replicas:
@@ -77,6 +142,15 @@ spec:
77142
properties:
78143
name:
79144
type: string
145+
liveness:
146+
type: object
147+
properties:
148+
initialDelaySeconds:
149+
type: integer
150+
periodSeconds:
151+
type: integer
152+
timeoutSeconds:
153+
type: integer
80154
status:
81155
type: object
82156
properties:
@@ -90,6 +164,12 @@ spec:
90164
type: string
91165
jsonPath: ".status.currentState"
92166
---
167+
apiVersion: v1
168+
kind: ServiceAccount
169+
metadata:
170+
name: minio-operator
171+
namespace: default
172+
---
93173
apiVersion: rbac.authorization.k8s.io/v1beta1
94174
kind: ClusterRole
95175
metadata:
@@ -135,37 +215,40 @@ rules:
135215
- update
136216
- delete
137217
- apiGroups:
138-
- "certificates.k8s.io"
218+
- certificates.k8s.io
139219
resources:
140-
- "certificatesigningrequests"
141-
- "certificatesigningrequests/approval"
142-
- "certificatesigningrequests/status"
220+
- certificatesigningrequests
221+
- certificatesigningrequests/approval
222+
- certificatesigningrequests/status
143223
verbs:
144224
- update
145225
- create
146226
- get
147227
- delete
148228
- apiGroups:
149-
- operator.min.io
229+
- certificates.k8s.io
230+
resourceNames:
231+
- kubernetes.io/legacy-unknown
232+
resources:
233+
- signers
234+
verbs:
235+
- approve
236+
- sign
237+
- apiGroups:
238+
- minio.min.io
150239
resources:
151-
- "*"
240+
- '*'
152241
verbs:
153-
- "*"
242+
- '*'
154243
- apiGroups:
155244
- min.io
156245
resources:
157-
- "*"
246+
- '*'
158247
verbs:
159-
- "*"
248+
- '*'
160249
---
161-
apiVersion: v1
162-
kind: ServiceAccount
163-
metadata:
164-
name: minio-operator
165-
namespace: default
166-
---
167-
kind: ClusterRoleBinding
168250
apiVersion: rbac.authorization.k8s.io/v1beta1
251+
kind: ClusterRoleBinding
169252
metadata:
170253
name: minio-operator-binding
171254
roleRef:
@@ -192,12 +275,8 @@ spec:
192275
labels:
193276
name: minio-operator
194277
spec:
195-
serviceAccountName: minio-operator
196278
containers:
197-
- name: minio-operator
198-
image: minio/k8s-operator:2.0.9
279+
- image: minio/k8s-operator:v3.0.1
199280
imagePullPolicy: IfNotPresent
200-
# To specify cluster domain, un comment the following:
201-
# env:
202-
# - name: CLUSTER_DOMAIN
203-
# value: mycluster.mydomain
281+
name: minio-operator
282+
serviceAccountName: minio-operator

k8s/getoperator.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22
# Get's the latest deployment file from MinIO Operator
3-
curl https://raw.githubusercontent.com/minio/minio-operator/master/minio-operator.yaml > operator-console/base/minio-operator.yaml
3+
curl https://raw.githubusercontent.com/minio/operator/master/minio-operator.yaml > operator-console/base/minio-operator.yaml

k8s/operator-console/base/mcs-cluster-role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ rules:
6464
- create
6565
- get
6666
- apiGroups:
67-
- operator.min.io
67+
- minio.min.io
6868
resources:
6969
- "*"
7070
verbs:

k8s/operator-console/base/mcs-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spec:
1212
labels:
1313
app: mcs
1414
spec:
15-
serviceAccountName: m3-sa
15+
serviceAccountName: mcs-sa
1616
containers:
1717
- name: mcs
1818
image: minio/mcs:latest

0 commit comments

Comments
 (0)