mongodb community operator deployment
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
---
|
||||
apiVersion: mongodbcommunity.mongodb.com/v1
|
||||
kind: MongoDBCommunity
|
||||
metadata:
|
||||
name: example-mongodb
|
||||
spec:
|
||||
members: 1
|
||||
type: ReplicaSet
|
||||
version: "6.0.5"
|
||||
security:
|
||||
authentication:
|
||||
modes: ["SCRAM"]
|
||||
users:
|
||||
- name: my-user
|
||||
db: admin
|
||||
passwordSecretRef: # a reference to the secret that will be used to generate the user's password
|
||||
name: my-user-password
|
||||
roles:
|
||||
- name: clusterAdmin
|
||||
db: admin
|
||||
- name: userAdminAnyDatabase
|
||||
db: admin
|
||||
scramCredentialsSecretName: my-scram
|
||||
additionalMongodConfig:
|
||||
storage.wiredTiger.engineConfig.journalCompressor: zlib
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
## Reference to one or more secrets to be used when pulling images
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
imagePullSecrets: []
|
||||
# - name: "image-pull-secret"
|
||||
## Operator
|
||||
operator:
|
||||
# Name that will be assigned to most of internal Kubernetes objects like
|
||||
# Deployment, ServiceAccount, Role etc.
|
||||
name: mongodb-kubernetes-operator
|
||||
|
||||
# Name of the operator image
|
||||
operatorImageName: mongodb-kubernetes-operator
|
||||
|
||||
# Name of the deployment of the operator pod
|
||||
deploymentName: mongodb-kubernetes-operator
|
||||
|
||||
# Version of mongodb-kubernetes-operator
|
||||
version: 0.9.0
|
||||
|
||||
# Uncomment this line to watch all namespaces
|
||||
# watchNamespace: "*"
|
||||
|
||||
# Resources allocated to Operator Pod
|
||||
resources:
|
||||
limits:
|
||||
cpu:
|
||||
memory:
|
||||
requests:
|
||||
cpu:
|
||||
memory:
|
||||
|
||||
# replicas deployed for the operator pod. Running 1 is optimal and suggested.
|
||||
replicas: 1
|
||||
|
||||
# Additional environment variables
|
||||
extraEnvs: []
|
||||
# environment:
|
||||
# - name: CLUSTER_DOMAIN
|
||||
# value: my-cluster.domain
|
||||
|
||||
podSecurityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 2000
|
||||
|
||||
securityContext: {}
|
||||
|
||||
## Operator's database
|
||||
database:
|
||||
name: mongodb-database
|
||||
# set this to the namespace where you would like
|
||||
# to deploy the MongoDB database,
|
||||
# Note if the database namespace is not same
|
||||
# as the operator namespace,
|
||||
# make sure to set "watchNamespace" to "*"
|
||||
# to ensure that the operator has the
|
||||
# permission to reconcile resources in other namespaces
|
||||
# namespace: mongodb-database
|
||||
|
||||
agent:
|
||||
name: mongodb-agent
|
||||
version: 107.0.0.8465-1
|
||||
versionUpgradeHook:
|
||||
name: mongodb-kubernetes-operator-version-upgrade-post-start-hook
|
||||
version: 1.0.8
|
||||
readinessProbe:
|
||||
name: mongodb-kubernetes-readinessprobe
|
||||
version: 1.0.17
|
||||
mongodb:
|
||||
name: mongo
|
||||
repo: docker.io
|
||||
|
||||
registry:
|
||||
agent: quay.io/mongodb
|
||||
versionUpgradeHook: quay.io/mongodb
|
||||
readinessProbe: quay.io/mongodb
|
||||
operator: quay.io/mongodb
|
||||
pullPolicy: Always
|
||||
|
||||
# Set to false if CRDs have been installed already. The CRDs can be installed
|
||||
# manually from the code repo: github.com/mongodb/mongodb-kubernetes-operator or
|
||||
# using the `community-operator-crds` Helm chart.
|
||||
community-operator-crds:
|
||||
enabled: true
|
||||
|
||||
# Deploys MongoDB with `resource` attributes.
|
||||
createResource: false
|
||||
resource:
|
||||
name: mongodb-replica-set
|
||||
version: 4.4.0
|
||||
members: 3
|
||||
tls:
|
||||
enabled: false
|
||||
|
||||
# Installs Cert-Manager in this cluster.
|
||||
useX509: false
|
||||
sampleX509User: false
|
||||
useCertManager: true
|
||||
certificateKeySecretRef: tls-certificate
|
||||
caCertificateSecretRef: tls-ca-key-pair
|
||||
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:
|
||||
- name: my-user
|
||||
db: admin
|
||||
passwordSecretRef: # a reference to the secret that will be used to generate the user's password
|
||||
name: admin-credential
|
||||
roles:
|
||||
- name: clusterAdmin
|
||||
db: admin
|
||||
- name: userAdminAnyDatabase
|
||||
db: admin
|
||||
- name: readWriteAnyDatabase
|
||||
db: admin
|
||||
- name: dbAdminAnyDatabase
|
||||
db: admin
|
||||
scramCredentialsSecretName: my-scram
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: my-user-password
|
||||
type: Opaque
|
||||
stringData:
|
||||
password: admin
|
||||
Reference in New Issue
Block a user