Skip to content

Commit

Permalink
single replica mongodb example (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
igorchyts authored Nov 7, 2024
1 parent 87dc761 commit 6a5adf3
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 1 deletion.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Supported MongoDB versions for the chart: 4.4.29, 5, 6, 7

The [Helm CLI](https://helm.sh/docs/intro/install/#through-package-managers) and [Control Plane CLI](https://docs.controlplane.com/reference/cli#install-npm) must be installed.

1. Clone this repo and update the [values.yaml](./values.yaml) file as needed.
1. Clone this repo and update the [values.yaml](helm/values.yaml) file as needed.

2. If advanced replica-set configuration is required, make sure to edit [mongodb-config.yaml](./templates/mongodb-config.yaml) file in templates directory. Please refer to [MongoDB documentation](https://www.mongodb.com/docs/v7.0/reference/replica-configuration/#replica-set-configuration-document) for further instructions.

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
101 changes: 101 additions & 0 deletions examples/mongodb/single-replica/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
kind: secret
name: mongodb-development-secret
description: mongodb-development-secret
tags: {}
type: dictionary
data:
password: mongodbsecret1
username: mongodb
---
kind: identity
name: mongodb
description: mongodb
tags: {}
---
kind: policy
name: mongodb-development-policy
description: mongodb-development-policy
tags: {}
bindings:
- permissions:
- reveal
principalLinks:
- //gvc/development/identity/mongodb
targetKind: secret
targetLinks:
- //secret/mongodb-development-secret
---
kind: volumeset
name: mongodb
description: mongodb
tags: {}
spec:
fileSystemType: ext4
initialCapacity: 50
performanceClass: general-purpose-ssd
snapshots:
createFinalSnapshot: true
retentionDuration: 7d
---
kind: workload
name: mongodb
description: mongodb
tags: {}
spec:
type: stateful
containers:
- name: mongo
cpu: 200m
env:
- name: MONGO_INITDB_DATABASE
value: exampledb1
- name: MONGO_INITDB_PWD
value: cpln://secret/mongodb-development-secret.password
- name: MONGO_INITDB_ROOT_PASSWORD
value: cpln://secret/mongodb-development-secret.password
- name: MONGO_INITDB_ROOT_USERNAME
value: cpln://secret/mongodb-development-secret.username
- name: MONGO_INITDB_USER
value: cpln://secret/mongodb-development-secret.username
image: mongo:6.0
inheritEnv: false
memory: 250Mi
ports:
- number: 27017
protocol: tcp
volumes:
- path: /data/db
recoveryPolicy: retain
uri: cpln://volumeset/mongodb
defaultOptions:
autoscaling:
maxConcurrency: 0
maxScale: 3
metric: cpu
minScale: 1
scaleToZeroDelay: 300
target: 100
capacityAI: false
debug: false
suspend: false
timeoutSeconds: 60
firewallConfig:
external:
inboundAllowCIDR: []
outboundAllowCIDR:
- 0.0.0.0/0
outboundAllowHostname: []
outboundAllowPort: []
internal:
inboundAllowType: same-gvc
inboundAllowWorkload: []
identityLink: //gvc/development/identity/mongodb
loadBalancer:
direct:
enabled: true
ports:
- containerPort: 27017
externalPort: 27017
protocol: TCP
scheme: tcp
supportDynamicTags: false

0 comments on commit 6a5adf3

Please sign in to comment.