Skip to content
Merged
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
4 changes: 4 additions & 0 deletions charts/clickstack/templates/mongodb-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ spec:
matchLabels:
{{- include "clickstack.selectorLabels" . | nindent 6 }}
app: mongodb
{{- if .Values.mongodb.strategy }}
strategy:
{{- toYaml .Values.mongodb.strategy | nindent 4 }}
{{- end }}
template:
metadata:
labels:
Expand Down
19 changes: 17 additions & 2 deletions charts/clickstack/tests/mongodb-deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ tests:
of: Deployment
- documentSelector: *service-selector
isKind:
of: Service
of: Service

- it: should not render any documents when disabled
set:
mongodb:
Expand Down Expand Up @@ -302,3 +302,18 @@ tests:
equal:
path: spec.template.spec.imagePullSecrets[0].name
value: regcred

- it: should include strategy when configured
set:
mongodb:
enabled: true
strategy:
type: Recreate
asserts:
- documentIndex: 1
isNotNull:
path: spec.strategy
- documentIndex: 1
equal:
path: spec.strategy.type
value: Recreate
6 changes: 6 additions & 0 deletions charts/clickstack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@ mongodb:
image: "mongo:5.0.32-focal"
port: 27017
enabled: true
# Optionally override rollout strategy with type=Recreate
# to avoid mongodb image update issues
# when newer instance cannot start
# because older one holds /data/db/mongod.lock
# at a cost of short mongodb downtime.
strategy: null
# Add nodeSelector and tolerations for mongodb service
nodeSelector:
{}
Expand Down