Skip to content

Commit dac8c2a

Browse files
author
Rodrigo Valin
committed
99e93bc: update public repo contents
1 parent 99e93bc commit dac8c2a

13 files changed

+253
-145
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ You can discuss this integration in our new [Community Forum](https://community.
2626

2727
[Troubleshooting Kubernetes Operator](https://docs.opsmanager.mongodb.com/current/reference/troubleshooting/k8s/)
2828

29-
[Known Issues for Kubernetes Operator](https://docs.opsmanager.mongodb.com/current/reference/known-issues-k8s-beta)
29+
[Known Issues for Kubernetes Operator](https://docs.mongodb.com/kubernetes-operator/stable/reference/known-issues/)
3030

3131
## Requirements ##
3232

crds.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
22
# Source: mongodb-enterprise-operator/templates/crds.yaml
3-
4-
---
53
apiVersion: apiextensions.k8s.io/v1beta1
64
kind: CustomResourceDefinition
75
metadata:
@@ -412,9 +410,8 @@ spec:
412410
shardCount:
413411
minimum: 1
414412
type: integer
415-
416-
417413
---
414+
# Source: mongodb-enterprise-operator/templates/crds.yaml
418415
apiVersion: apiextensions.k8s.io/v1beta1
419416
kind: CustomResourceDefinition
420417
metadata:
@@ -495,6 +492,7 @@ spec:
495492
- username
496493
- db
497494
---
495+
# Source: mongodb-enterprise-operator/templates/crds.yaml
498496
apiVersion: apiextensions.k8s.io/v1beta1
499497
kind: CustomResourceDefinition
500498
metadata:
@@ -830,10 +828,12 @@ spec:
830828
- version
831829
- applicationDatabase
832830

831+
833832
# This ClusterRole is necessary in order to use validating webhooks—these will
834833
# prevent you from applying a variety of invalid resource definitions. The
835834
# validating webhooks are optional so this can be removed if necessary.
836835
---
836+
# Source: mongodb-enterprise-operator/templates/crds.yaml
837837
kind: ClusterRole
838838
apiVersion: rbac.authorization.k8s.io/v1
839839
metadata:
@@ -848,5 +848,3 @@ rules:
848848
- create
849849
- update
850850
- delete
851-
852-

helm_chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: mongodb-enterprise-operator
22
description: MongoDB Kubernetes Enterprise Operator
3-
version: 1.5.1
3+
version: 1.5.2
44
kubeVersion: '>=1.13'
55
keywords:
66
- mongodb

helm_chart/templates/crds.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{{ if eq .Values.createCrds true }}
1+
{{- if .Values.createCrds }}
2+
{{- if has "mongodb" (.Values.operator.watchedResources | default (tuple "mongodb")) }}
23
---
34
apiVersion: apiextensions.k8s.io/v1beta1
45
kind: CustomResourceDefinition
@@ -31,8 +32,10 @@ spec:
3132
type: date
3233
description: The time since the MongoDB resource was created.
3334
JSONPath: .metadata.creationTimestamp
35+
{{- if .Values.subresourceEnabled }}
3436
subresources:
3537
status: {}
38+
{{- end }}
3639
validation:
3740
openAPIV3Schema:
3841
type: object
@@ -410,7 +413,8 @@ spec:
410413
shardCount:
411414
minimum: 1
412415
type: integer
413-
416+
{{- end }}
417+
{{- if has "mongodbusers" (.Values.operator.watchedResources | default (tuple "mongodbusers")) }}
414418

415419
---
416420
apiVersion: apiextensions.k8s.io/v1beta1
@@ -436,8 +440,10 @@ spec:
436440
type: date
437441
description: The time since the MongoDB User resource was created
438442
JSONPath: .metadata.creationTimestamp
443+
{{- if .Values.subresourceEnabled }}
439444
subresources:
440445
status: {}
446+
{{- end }}
441447
validation:
442448
openAPIV3Schema:
443449
type: object
@@ -492,6 +498,9 @@ spec:
492498
required:
493499
- username
494500
- db
501+
{{- end }}
502+
{{- if has "opsmanagers" (.Values.operator.watchedResources | default (tuple "opsmanagers")) }}
503+
495504
---
496505
apiVersion: apiextensions.k8s.io/v1beta1
497506
kind: CustomResourceDefinition
@@ -536,8 +545,10 @@ spec:
536545
type: string
537546
description: Warnings
538547
JSONPath: .status.warnings
548+
{{- if .Values.subresourceEnabled }}
539549
subresources:
540550
status: {}
551+
{{- end }}
541552
validation:
542553
openAPIV3Schema:
543554
type: object
@@ -827,6 +838,9 @@ spec:
827838
required:
828839
- version
829840
- applicationDatabase
841+
{{- end }}
842+
{{- end }}
843+
830844

831845
# This ClusterRole is necessary in order to use validating webhooks—these will
832846
# prevent you from applying a variety of invalid resource definitions. The
@@ -846,5 +860,3 @@ rules:
846860
- create
847861
- update
848862
- delete
849-
850-
{{ end }}

helm_chart/templates/database-roles.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ metadata:
2020
namespace: {{ .Values.namespace }}
2121
{{- end }}
2222

23+
---
24+
apiVersion: v1
25+
kind: ServiceAccount
26+
metadata:
27+
name: mongodb-enterprise-ops-manager
28+
{{- if not (eq (.Values.operator.watchNamespace | default "*") "*") }}
29+
namespace: {{ .Values.operator.watchNamespace }}
30+
{{- else }}
31+
namespace: {{ .Values.namespace }}
32+
{{- end }}
33+
2334
---
2435
kind: Role
2536
apiVersion: rbac.authorization.k8s.io/v1

helm_chart/templates/operator-roles.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,17 @@ rules:
4747
- mongodb.com
4848
resources:
4949
- mongodb
50-
- mongodb/status
5150
- mongodb/finalizers
5251
- mongodbusers
53-
- mongodbusers/status
5452
- opsmanagers
5553
- opsmanagers/finalizers
54+
{{- if .Values.subresourceEnabled }}
55+
- mongodb/status
56+
- mongodbusers/status
5657
- opsmanagers/status
58+
{{- end }}
5759
verbs:
5860
- "*"
59-
6061
# This ClusterRoleBinding is necessary in order to use validating
6162
# webhooks—these will prevent you from applying a variety of invalid resource
6263
# definitions. The validating webhooks are optional so this can be removed if

helm_chart/templates/operator.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,18 @@ spec:
2626
imagePullSecrets:
2727
- name: {{ .Values.registry.imagePullSecrets }}
2828
{{- end }}
29-
3029
containers:
3130
- name: {{ .Values.operator.name }}
3231
image: {{ .Values.registry.operator }}/{{ .Values.operator.name }}:{{ .Values.operator.version }}
3332
imagePullPolicy: {{ .Values.registry.pullPolicy }}
33+
{{- if .Values.operator.watchedResources }}
3434
args:
35-
- "-watch-resource=mongodb"
36-
- "-watch-resource=opsmanagers"
37-
- "-watch-resource=mongodbusers"
35+
{{- range .Values.operator.watchedResources }}
36+
- "-watch-resource={{ . }}"
37+
{{- end }}
3838
command:
3939
- "/usr/local/bin/mongodb-enterprise-operator"
40+
{{- end }}
4041
env:
4142
- name: OPERATOR_ENV
4243
value: {{ .Values.operator.env }}
@@ -74,7 +75,6 @@ spec:
7475
value: {{ .Values.registry.pullPolicy }}
7576
- name: APPDB_IMAGE_REPOSITORY
7677
value: {{ .Values.registry.appDb }}/{{ .Values.appDb.name }}
77-
7878
{{- if .Values.registry.imagePullSecrets }}
7979
- name: IMAGE_PULL_SECRETS
8080
value: {{ .Values.registry.imagePullSecrets }}

helm_chart/values-openshift.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ operator:
1515
name: enterprise-operator
1616

1717
# Version of mongodb-enterprise-operator and mongodb-enterprise-database images
18-
version: 1.5.1
18+
version: 1.5.2
19+
20+
# The Custom Resources that will be watched by the Operator. Needs to be changed if only some of the CRDs are installed
21+
watchedResources:
22+
- mongodb
23+
- opsmanagers
24+
- mongodbusers
1925

2026
database:
2127
name: enterprise-database
@@ -47,3 +53,7 @@ registry:
4753
# Set this to true if the operator will require Kubernetes CA
4854
# infrastructure to generate TLS certificates.
4955
needsCAInfrastructure: true
56+
57+
# Set this to false to disable subresource utilization
58+
# It might be required on some versions of Openshift
59+
subresourceEnabled: true

helm_chart/values.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ operator:
1616
name: mongodb-enterprise-operator
1717

1818
# Version of mongodb-enterprise-operator and mongodb-enterprise-database images
19-
version: 1.5.1
19+
version: 1.5.2
20+
21+
# The Custom Resources that will be watched by the Operator. Needs to be changed if only some of the CRDs are installed
22+
watchedResources:
23+
- mongodb
24+
- opsmanagers
25+
- mongodbusers
2026

2127
database:
2228
name: mongodb-enterprise-database
@@ -46,7 +52,10 @@ registry:
4652
initAppDb: quay.io/mongodb
4753
appDb: quay.io/mongodb
4854

49-
5055
# Set this to true if the operator will require Kubernetes CA
5156
# infrastructure to generate TLS certificates.
5257
needsCAInfrastructure: true
58+
59+
# Set this to false to disable subresource utilization
60+
# It might be required on some versions of Openshift
61+
subresourceEnabled: true

0 commit comments

Comments
 (0)