add .gitignore, .editorconfig, and clean up
This commit is contained in:
10
.editorconfig
Normal file
10
.editorconfig
Normal 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
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.idea/
|
||||||
@@ -8,9 +8,9 @@ spec:
|
|||||||
clusterIP: None
|
clusterIP: None
|
||||||
publishNotReadyAddresses: true
|
publishNotReadyAddresses: true
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.service.port }}
|
- port: {{ .Values.service.port }}
|
||||||
targetPort: {{ .Values.service.port }}
|
targetPort: {{ .Values.service.port }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: mongodb
|
name: mongodb
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/name: {{ include "mongo.name" . }}
|
app.kubernetes.io/name: {{ include "mongo.name" . }}
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ spec:
|
|||||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.service.port }}
|
- port: {{ .Values.service.port }}
|
||||||
targetPort: {{ .Values.service.port }}
|
targetPort: {{ .Values.service.port }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: mongodb
|
name: mongodb
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/name: {{ include "mongo.name" . }}
|
app.kubernetes.io/name: {{ include "mongo.name" . }}
|
||||||
|
|||||||
@@ -26,53 +26,53 @@ spec:
|
|||||||
runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }}
|
runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: mongo
|
- name: mongo
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
args:
|
args:
|
||||||
{{- if .Values.extraCommandLineArgs }}
|
{{- if .Values.extraCommandLineArgs }}
|
||||||
- "{{ .Values.extraCommandLineArgs }}"
|
- "{{ .Values.extraCommandLineArgs }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: {{ .Values.service.port }}
|
- containerPort: {{ .Values.service.port }}
|
||||||
name: mongodb
|
name: mongodb
|
||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: {{ include "mongo.name.secret" . }}
|
name: {{ include "mongo.name.secret" . }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /data/db
|
mountPath: /data/db
|
||||||
{{- if .Values.readinessProbe.enabled }}
|
{{- if .Values.readinessProbe.enabled }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
exec:
|
exec:
|
||||||
command: {{ toJson .Values.healthCheck.command }}
|
command: {{ toJson .Values.healthCheck.command }}
|
||||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.livenessProbe.enabled }}
|
{{- if .Values.livenessProbe.enabled }}
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
exec:
|
exec:
|
||||||
command: {{ toJson .Values.healthCheck.command }}
|
command: {{ toJson .Values.healthCheck.command }}
|
||||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 10 }}
|
{{- toYaml .Values.resources | nindent 10 }}
|
||||||
volumeClaimTemplates:
|
volumeClaimTemplates:
|
||||||
- metadata:
|
- metadata:
|
||||||
name: data
|
name: data
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
{{- toYaml .Values.persistence.accessModes | nindent 10 }}
|
{{- toYaml .Values.persistence.accessModes | nindent 10 }}
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: {{ .Values.persistence.size }}
|
storage: {{ .Values.persistence.size }}
|
||||||
{{- if .Values.persistence.storageClass }}
|
{{- if .Values.persistence.storageClass }}
|
||||||
storageClassName: {{ .Values.persistence.storageClass }}
|
storageClassName: {{ .Values.persistence.storageClass }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ auth:
|
|||||||
persistence:
|
persistence:
|
||||||
storageClass:
|
storageClass:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
size: 8Gi
|
size: 8Gi
|
||||||
|
|
||||||
|
|
||||||
@@ -68,4 +68,4 @@ extraCommandLineArgs: ""
|
|||||||
|
|
||||||
|
|
||||||
healthCheck:
|
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" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user