Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion charts/community-operator/templates/database_roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ kind: ServiceAccount
metadata:
name: {{ .Values.database.name }}
namespace: {{ if .Values.database.namespace }} {{ .Values.database.namespace }} {{ else }} {{ .Release.Namespace }} {{ end }}

{{- with .Values.database.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand Down
4 changes: 4 additions & 0 deletions charts/community-operator/templates/extraObjects.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ range .Values.extraObjects }}
---
{{ tpl (toYaml .) $ }}
{{ end }}
5 changes: 4 additions & 1 deletion charts/community-operator/templates/operator_roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ kind: ServiceAccount
metadata:
name: {{ .Values.operator.name }}
namespace: {{ .Release.Namespace }}

{{- with .Values.operator.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: {{ if eq (.Values.operator.watchNamespace | default "") "*" }} ClusterRole {{ else }} Role {{ end }}
Expand Down
54 changes: 52 additions & 2 deletions charts/community-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ operator:
# Deployment, ServiceAccount, Role etc.
name: mongodb-kubernetes-operator

# serviceAccount annotations, if any to add
serviceAccount:
annotations: {}

# Name of the operator image
operatorImageName: mongodb-kubernetes-operator

Expand Down Expand Up @@ -46,7 +50,13 @@ operator:

## Operator's database
database:
# Name that will be assigned to most of internal Kubernetes objects like
# ServiceAccount, Role etc.
name: mongodb-database
# serviceAccount annotations, if any to add
serviceAccount:
annotations: {}

# set this to the namespace where you would like
# to deploy the MongoDB database,
# Note if the database namespace is not same
Expand Down Expand Up @@ -90,7 +100,26 @@ resource:
members: 3
tls:
enabled: false

# overwrite MDBC resource statefulset defaults
# statefulSet:
# spec:
# template:
# spec:
# imagePullSecrets:
# - name: my-secret
# volumes:
# - name: secretmanager-secretproviderclass
# csi:
# driver: secrets-store.csi.k8s.io
# readOnly: true
# volumeAttributes:
# secretProviderClass: mysecretclass
# containers:
# - name: mongodb-agent
# volumeMounts:
# - name: secretmanager-secretproviderclass
# mountPath: "/mnt/secrets-store"
# readOnly: true
# Installs Cert-Manager in this cluster.
useX509: false
sampleX509User: false
Expand All @@ -100,7 +129,6 @@ resource:
certManager:
certDuration: 8760h # 365 days
renewCertBefore: 720h # 30 days

users: []
# if using the MongoDBCommunity Resource, list any users to be added to the resource
# users:
Expand All @@ -118,3 +146,25 @@ resource:
# - name: dbAdminAnyDatabase
# db: admin
# scramCredentialsSecretName: my-scram

# -- Array of extra K8s manifests to deploy
extraObjects: []
# - apiVersion: secrets-store.csi.x-k8s.io/v1
# kind: SecretProviderClass
# metadata:
# name: mongodb-secrets-store
# spec:
# provider: aws
# parameters:
# objects: |
# - objectName: "mongodb"
# objectType: "secretsmanager"
# jmesPath:
# - path: "password"
# objectAlias: "password"
# secretObjects:
# - data:
# - key: password
# objectName: password
# secretName: my-user-password
# type: Opaque