Skip to content

Commit 24f3968

Browse files
mck 1.3.0 release (#497)
* mck 1.3.0 release * Fix lint issue, by removing trailing space * Fix lint issues, too few spaces before comment
1 parent 34baf34 commit 24f3968

18 files changed

+423
-124
lines changed

charts/mongodb-kubernetes/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: mongodb-kubernetes
33
description: MongoDB Controllers for Kubernetes translate the human knowledge of
44
creating a MongoDB instance into a scalable, repeatable, and standardized
55
method.
6-
version: 1.2.0
6+
version: 1.3.0
77
kubeVersion: '>=1.16-0'
88
type: application
99
keywords:

charts/mongodb-kubernetes/crds/mongodb.com_clustermongodbroles.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: clustermongodbroles.mongodb.com
88
spec:
99
group: mongodb.com

charts/mongodb-kubernetes/crds/mongodb.com_mongodb.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: mongodb.mongodb.com
88
spec:
99
group: mongodb.com
@@ -1423,9 +1423,7 @@ spec:
14231423
This field is effectively required, but due to backwards compatibility is
14241424
allowed to be empty. Instances of this type with an empty value here are
14251425
almost certainly wrong.
1426-
TODO: Add other useful fields. apiVersion, kind, uid?
14271426
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1428-
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
14291427
type: string
14301428
optional:
14311429
description: Specify whether the Secret or its key
@@ -1482,9 +1480,7 @@ spec:
14821480
This field is effectively required, but due to backwards compatibility is
14831481
allowed to be empty. Instances of this type with an empty value here are
14841482
almost certainly wrong.
1485-
TODO: Add other useful fields. apiVersion, kind, uid?
14861483
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1487-
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
14881484
type: string
14891485
optional:
14901486
description: Specify whether the ConfigMap or its

charts/mongodb-kubernetes/crds/mongodb.com_mongodbmulticluster.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: mongodbmulticluster.mongodb.com
88
spec:
99
group: mongodb.com
@@ -683,9 +683,7 @@ spec:
683683
This field is effectively required, but due to backwards compatibility is
684684
allowed to be empty. Instances of this type with an empty value here are
685685
almost certainly wrong.
686-
TODO: Add other useful fields. apiVersion, kind, uid?
687686
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
688-
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
689687
type: string
690688
optional:
691689
description: Specify whether the Secret or its key
@@ -742,9 +740,7 @@ spec:
742740
This field is effectively required, but due to backwards compatibility is
743741
allowed to be empty. Instances of this type with an empty value here are
744742
almost certainly wrong.
745-
TODO: Add other useful fields. apiVersion, kind, uid?
746743
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
747-
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
748744
type: string
749745
optional:
750746
description: Specify whether the ConfigMap or its

charts/mongodb-kubernetes/crds/mongodb.com_mongodbsearch.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: mongodbsearch.mongodb.com
88
spec:
99
group: mongodb.com
@@ -102,11 +102,9 @@ spec:
102102
Claims lists the names of resources, defined in spec.resourceClaims,
103103
that are used by this container.
104104
105-
106105
This is an alpha field and requires enabling the
107106
DynamicResourceAllocation feature gate.
108107
109-
110108
This field is immutable. It can only be set for containers.
111109
items:
112110
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
@@ -117,6 +115,12 @@ spec:
117115
the Pod where this field is used. It makes that resource available
118116
inside a container.
119117
type: string
118+
request:
119+
description: |-
120+
Request is the name chosen for a request in the referenced claim.
121+
If empty, everything from the claim is made available, otherwise
122+
only the result of this request.
123+
type: string
120124
required:
121125
- name
122126
type: object

charts/mongodb-kubernetes/crds/mongodb.com_mongodbusers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: mongodbusers.mongodb.com
88
spec:
99
group: mongodb.com

charts/mongodb-kubernetes/crds/mongodb.com_opsmanagers.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: opsmanagers.mongodb.com
88
spec:
99
group: mongodb.com
@@ -744,9 +744,7 @@ spec:
744744
This field is effectively required, but due to backwards compatibility is
745745
allowed to be empty. Instances of this type with an empty value here are
746746
almost certainly wrong.
747-
TODO: Add other useful fields. apiVersion, kind, uid?
748747
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
749-
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
750748
type: string
751749
optional:
752750
description: Specify whether the Secret or its
@@ -804,9 +802,7 @@ spec:
804802
This field is effectively required, but due to backwards compatibility is
805803
allowed to be empty. Instances of this type with an empty value here are
806804
almost certainly wrong.
807-
TODO: Add other useful fields. apiVersion, kind, uid?
808805
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
809-
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
810806
type: string
811807
optional:
812808
description: Specify whether the ConfigMap or
@@ -1253,9 +1249,7 @@ spec:
12531249
This field is effectively required, but due to backwards compatibility is
12541250
allowed to be empty. Instances of this type with an empty value here are
12551251
almost certainly wrong.
1256-
TODO: Add other useful fields. apiVersion, kind, uid?
12571252
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1258-
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
12591253
type: string
12601254
optional:
12611255
description: Specify whether the Secret or its key
@@ -1347,9 +1341,7 @@ spec:
13471341
This field is effectively required, but due to backwards compatibility is
13481342
allowed to be empty. Instances of this type with an empty value here are
13491343
almost certainly wrong.
1350-
TODO: Add other useful fields. apiVersion, kind, uid?
13511344
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1352-
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
13531345
type: string
13541346
optional:
13551347
description: Specify whether the Secret or its key
@@ -1503,6 +1495,8 @@ spec:
15031495
required:
15041496
- spec
15051497
type: object
1498+
required:
1499+
- members
15061500
type: object
15071501
clusterDomain:
15081502
description: Cluster domain to override the default *.svc.cluster.local
@@ -1606,6 +1600,7 @@ spec:
16061600
- spec
16071601
type: object
16081602
required:
1603+
- clusterName
16091604
- members
16101605
type: object
16111606
type: array

charts/mongodb-kubernetes/crds/mongodbcommunity.mongodb.com_mongodbcommunity.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
service.binding: path={.metadata.name}-{.spec.users[0].db}-{.spec.users[0].name},objectType=Secret
88
service.binding/connectionString: path={.metadata.name}-{.spec.users[0].db}-{.spec.users[0].name},objectType=Secret,sourceKey=connectionString.standardSrv
99
service.binding/password: path={.metadata.name}-{.spec.users[0].db}-{.spec.users[0].name},objectType=Secret,sourceKey=password
@@ -344,9 +344,7 @@ spec:
344344
This field is effectively required, but due to backwards compatibility is
345345
allowed to be empty. Instances of this type with an empty value here are
346346
almost certainly wrong.
347-
TODO: Add other useful fields. apiVersion, kind, uid?
348347
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
349-
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
350348
type: string
351349
type: object
352350
x-kubernetes-map-type: atomic
@@ -479,9 +477,7 @@ spec:
479477
This field is effectively required, but due to backwards compatibility is
480478
allowed to be empty. Instances of this type with an empty value here are
481479
almost certainly wrong.
482-
TODO: Add other useful fields. apiVersion, kind, uid?
483480
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
484-
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
485481
type: string
486482
type: object
487483
x-kubernetes-map-type: atomic
@@ -498,9 +494,7 @@ spec:
498494
This field is effectively required, but due to backwards compatibility is
499495
allowed to be empty. Instances of this type with an empty value here are
500496
almost certainly wrong.
501-
TODO: Add other useful fields. apiVersion, kind, uid?
502497
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
503-
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
504498
type: string
505499
type: object
506500
x-kubernetes-map-type: atomic
@@ -519,9 +513,7 @@ spec:
519513
This field is effectively required, but due to backwards compatibility is
520514
allowed to be empty. Instances of this type with an empty value here are
521515
almost certainly wrong.
522-
TODO: Add other useful fields. apiVersion, kind, uid?
523516
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
524-
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
525517
type: string
526518
type: object
527519
x-kubernetes-map-type: atomic
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
{{ if .Values.operator.createOperatorServiceAccount }}
2+
{{- $watchNamespace := include "mongodb-kubernetes-operator.namespace" . | list }}
3+
{{- if .Values.operator.watchNamespace }}
4+
{{- $watchNamespace = regexSplit "," .Values.operator.watchNamespace -1 }}
5+
{{- $watchNamespace = concat $watchNamespace (include "mongodb-kubernetes-operator.namespace" . | list) | uniq }}
6+
{{- end }}
7+
8+
{{- $roleScope := "Role" -}}
9+
{{- if or (gt (len $watchNamespace) 1) (eq (first $watchNamespace) "*") }}
10+
{{- $roleScope = "ClusterRole" }}
11+
{{- end }}
12+
---
13+
kind: {{ $roleScope }}
14+
apiVersion: rbac.authorization.k8s.io/v1
15+
metadata:
16+
name: {{ .Values.operator.name }}
17+
{{- if eq $roleScope "Role" }}
18+
namespace: {{ include "mongodb-kubernetes-operator.namespace" . }}
19+
{{- end }}
20+
rules:
21+
- apiGroups:
22+
- ''
23+
resources:
24+
- services
25+
verbs:
26+
- get
27+
- list
28+
- watch
29+
- create
30+
- update
31+
- delete
32+
- apiGroups:
33+
- ''
34+
resources:
35+
- secrets
36+
- configmaps
37+
verbs:
38+
- get
39+
- list
40+
- create
41+
- update
42+
- delete
43+
- watch
44+
- apiGroups:
45+
- apps
46+
resources:
47+
- statefulsets
48+
verbs:
49+
- create
50+
- get
51+
- list
52+
- watch
53+
- delete
54+
- update
55+
- apiGroups:
56+
- ''
57+
resources:
58+
- pods
59+
verbs:
60+
- get
61+
- list
62+
- watch
63+
- delete
64+
- deletecollection
65+
- apiGroups:
66+
- mongodbcommunity.mongodb.com
67+
resources:
68+
- mongodbcommunity
69+
- mongodbcommunity/status
70+
- mongodbcommunity/spec
71+
- mongodbcommunity/finalizers
72+
verbs:
73+
- '*'
74+
- apiGroups:
75+
- mongodb.com
76+
verbs:
77+
- '*'
78+
resources:
79+
- mongodb
80+
- mongodb/finalizers
81+
- mongodbusers
82+
- mongodbusers/finalizers
83+
- opsmanagers
84+
- opsmanagers/finalizers
85+
- mongodbmulticluster
86+
- mongodbmulticluster/finalizers
87+
- mongodbsearch
88+
- mongodbsearch/finalizers
89+
- mongodb/status
90+
- mongodbusers/status
91+
- opsmanagers/status
92+
- mongodbmulticluster/status
93+
- mongodbsearch/status
94+
{{- if eq $roleScope "ClusterRole" }}
95+
- apiGroups:
96+
- ''
97+
resources:
98+
- namespaces
99+
verbs:
100+
- list
101+
- watch
102+
{{- end}}
103+
{{- range $idx, $namespace := $watchNamespace }}
104+
105+
{{- $namespaceBlock := "" }}
106+
{{- if not (eq $namespace "*") }}
107+
{{- $namespaceBlock = printf "namespace: %s" $namespace }}
108+
{{- end }}
109+
110+
---
111+
{{- if eq $namespace "*" }}
112+
kind: ClusterRoleBinding
113+
{{- else }}
114+
kind: RoleBinding
115+
{{- end }}
116+
apiVersion: rbac.authorization.k8s.io/v1
117+
metadata:
118+
name: {{ $.Values.operator.name }}
119+
{{ $namespaceBlock }}
120+
roleRef:
121+
apiGroup: rbac.authorization.k8s.io
122+
kind: {{ $roleScope }}
123+
name: {{ $.Values.operator.name }}
124+
subjects:
125+
- kind: ServiceAccount
126+
name: {{ $.Values.operator.name }}
127+
namespace: {{ include "mongodb-kubernetes-operator.namespace" $ }}
128+
{{- end }}
129+
130+
{{- end }}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{{ if .Values.operator.createOperatorServiceAccount }}
2+
{{- if .Values.operator.enableClusterMongoDBRoles }}
3+
---
4+
kind: ClusterRole
5+
apiVersion: rbac.authorization.k8s.io/v1
6+
metadata:
7+
name: {{ .Values.operator.name }}-{{ include "mongodb-kubernetes-operator.namespace" . }}-cluster-mongodb-role
8+
rules:
9+
- apiGroups:
10+
- mongodb.com
11+
verbs:
12+
- '*'
13+
resources:
14+
- clustermongodbroles
15+
---
16+
kind: ClusterRoleBinding
17+
apiVersion: rbac.authorization.k8s.io/v1
18+
metadata:
19+
name: {{ .Values.operator.name }}-{{ include "mongodb-kubernetes-operator.namespace" . }}-cluster-mongodb-role-binding
20+
roleRef:
21+
apiGroup: rbac.authorization.k8s.io
22+
kind: ClusterRole
23+
name: {{ .Values.operator.name }}-{{ include "mongodb-kubernetes-operator.namespace" . }}-cluster-mongodb-role
24+
subjects:
25+
- kind: ServiceAccount
26+
name: {{ .Values.operator.name }}
27+
namespace: {{ include "mongodb-kubernetes-operator.namespace" . }}
28+
29+
{{- end }}{{/* if .Values.operator.enableClusterMongoDBRoles */}}
30+
{{- end }}{{/* if .Values.operator.createOperatorServiceAccount */}}

0 commit comments

Comments
 (0)