add .gitignore, .editorconfig, and clean up

This commit is contained in:
2025-09-30 13:19:15 +02:00
parent 9e07471746
commit 1c8fa4b52e
6 changed files with 65 additions and 54 deletions

10
.editorconfig Normal file
View File

@@ -0,0 +1,10 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 1024
tab_width = 2

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.idea/

View File

@@ -8,9 +8,9 @@ spec:
clusterIP: None
publishNotReadyAddresses: true
ports:
- port: {{ .Values.service.port }}
targetPort: {{ .Values.service.port }}
protocol: TCP
name: mongodb
- port: {{ .Values.service.port }}
targetPort: {{ .Values.service.port }}
protocol: TCP
name: mongodb
selector:
app.kubernetes.io/name: {{ include "mongo.name" . }}
app.kubernetes.io/name: {{ include "mongo.name" . }}

View File

@@ -10,9 +10,9 @@ spec:
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
ports:
- port: {{ .Values.service.port }}
targetPort: {{ .Values.service.port }}
protocol: TCP
name: mongodb
- port: {{ .Values.service.port }}
targetPort: {{ .Values.service.port }}
protocol: TCP
name: mongodb
selector:
app.kubernetes.io/name: {{ include "mongo.name" . }}
app.kubernetes.io/name: {{ include "mongo.name" . }}

View File

@@ -26,53 +26,53 @@ spec:
runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }}
{{- end }}
containers:
- name: mongo
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- name: mongo
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
{{- if .Values.extraCommandLineArgs }}
- "{{ .Values.extraCommandLineArgs }}"
- "{{ .Values.extraCommandLineArgs }}"
{{- end }}
ports:
- containerPort: {{ .Values.service.port }}
name: mongodb
envFrom:
- secretRef:
name: {{ include "mongo.name.secret" . }}
volumeMounts:
- name: data
mountPath: /data/db
ports:
- containerPort: {{ .Values.service.port }}
name: mongodb
envFrom:
- secretRef:
name: {{ include "mongo.name.secret" . }}
volumeMounts:
- name: data
mountPath: /data/db
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
exec:
command: {{ toJson .Values.healthCheck.command }}
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
readinessProbe:
exec:
command: {{ toJson .Values.healthCheck.command }}
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
{{- end }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
exec:
command: {{ toJson .Values.healthCheck.command }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
livenessProbe:
exec:
command: {{ toJson .Values.healthCheck.command }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 10 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes:
{{- toYaml .Values.persistence.accessModes | nindent 10 }}
resources:
requests:
storage: {{ .Values.persistence.size }}
- metadata:
name: data
spec:
accessModes:
{{- toYaml .Values.persistence.accessModes | nindent 10 }}
resources:
requests:
storage: {{ .Values.persistence.size }}
{{- if .Values.persistence.storageClass }}
storageClassName: {{ .Values.persistence.storageClass }}
{{- end }}
storageClassName: {{ .Values.persistence.storageClass }}
{{- end }}

View File

@@ -19,7 +19,7 @@ auth:
persistence:
storageClass:
accessModes:
- ReadWriteOnce
- ReadWriteOnce
size: 8Gi
@@ -68,4 +68,4 @@ extraCommandLineArgs: ""
healthCheck:
command: ["/bin/sh", "-c", "mongosh --quiet --eval 'db.runCommand({ ping: 1 })' --username ${MONGO_INITDB_ROOT_USERNAME} --password ${MONGO_INITDB_ROOT_PASSWORD} --authenticationDatabase admin || exit 1" ]
command: [ "/bin/sh", "-c", "mongosh --quiet --eval 'db.runCommand({ ping: 1 })' --username ${MONGO_INITDB_ROOT_USERNAME} --password ${MONGO_INITDB_ROOT_PASSWORD} --authenticationDatabase admin || exit 1" ]