Skip to content

Commit

Permalink
feat(chart/playground): adds mongodb service
Browse files Browse the repository at this point in the history
  • Loading branch information
nxtcoder17 committed Nov 27, 2024
1 parent c44e243 commit 52c01b3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/playground/templates/_constants.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
{{- define "code-server.secret.name" -}} code-creds {{- end -}}
{{- define "code-server.pvc.name" -}} code-storage {{- end -}}
{{- define "code-server.ingress.host" -}} {{.Release.Name}}.{{required "A valid DNS Hostname must be provided, when ingress is enabled" .Values.codeServer.ingress.hostSuffix }} {{- end -}}

{{- define "mongodb.name" -}} mongodb {{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ spec:
matchLabels:
mongodb: mongodb
replicas: 1
strategy:
type: Recreate
template:
metadata:
labels:
Expand All @@ -47,3 +49,20 @@ spec:
volumeMounts:
- name: mongodb
mountPath: /data/db
---

apiVersion: v1
kind: Service
metadata:
name: mongodb
namespace: {{.Release.Namespace}}
spec:
selector:
mongodb: {{ include "mongodb.name" . }}
ports:
- name: mongodb
protocol: TCP
port: 27017
targetPort: 27017

---

0 comments on commit 52c01b3

Please sign in to comment.