Skip to content

Commit

Permalink
fixing identation + add keepConfigFromKubernetes
Browse files Browse the repository at this point in the history
  • Loading branch information
edevosc2c committed Oct 29, 2024
1 parent 4746f1d commit b64f9ad
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 32 deletions.
2 changes: 1 addition & 1 deletion mviewer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.5.0
version: 0.6.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
31 changes: 16 additions & 15 deletions mviewer/ci/all-optional-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ mviewer:
podAnnotations:
myapp: mviewer
lifecycle:
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo"]
postStart:
exec:
command: ["/bin/sh", "-c", "echo"]
extraVolumes: []
extraVolumeMounts: []
extraEnv:
FOO: "BAR"
- name: FOO
value: BAR
persistence:
mviewer_conf:
annotations:
Expand Down Expand Up @@ -75,12 +75,12 @@ elasticsearch:
podAnnotations:
myapp: mviewer
extraEnv:
FOO: "BAR"
- name: FOO
value: BAR
lifecycle:
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo"]
postStart:
exec:
command: ["/bin/sh", "-c", "echo"]

ingress:
enabled: true
Expand Down Expand Up @@ -112,12 +112,13 @@ mviewerstudio:
- linux
podAnnotations:
myapp: mviewer
keepConfigFromKubernetes: true
extraEnv:
FOO: "BAR"
- name: FOO
value: BAR
lifecycle:
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo"]
postStart:
exec:
command: ["/bin/sh", "-c", "echo"]
extraVolumes: []
extraVolumeMounts: []
14 changes: 7 additions & 7 deletions mviewer/templates/elasticsearch-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ spec:
containerPort: 9200
protocol: TCP
env:
- name: ES_JAVA_OPTS
value: "-Dlog4j2.formatMsgNoLookups=true -Dlog4j2.disable.jmx=true"
- name: discovery.type
value: "single-node"
{{- with $webapp.extraEnv }}
{{- toYaml . | nindent 10 }}
{{- end }}
- name: ES_JAVA_OPTS
value: "-Dlog4j2.formatMsgNoLookups=true -Dlog4j2.disable.jmx=true"
- name: discovery.type
value: "single-node"
{{- with $webapp.extraEnv }}
{{- toYaml . | nindent 8 }}
{{- end }}
volumeMounts:
- name: elasticsearch-data
mountPath: /usr/share/elasticsearch/data
Expand Down
4 changes: 2 additions & 2 deletions mviewer/templates/mviewer-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
imagePullPolicy: {{ $webapp.image.imagePullPolicy }}
{{- with $webapp.extraEnv }}
env:
{{- toYaml . | nindent 10 }}
{{- toYaml . | nindent 8 }}
{{- end }}
resources:
{{- toYaml $webapp.resources | nindent 10 }}
Expand All @@ -73,7 +73,7 @@ spec:
mountPath: /usr/share/nginx/html/apps
readOnly: true
{{- if $webapp.extraVolumeMounts }}
{{- $webapp.extraVolumeMounts | toYaml | nindent 10 }}
{{- $webapp.extraVolumeMounts | toYaml | nindent 8 }}
{{- end }}
volumes:
- name: mviewer-conf
Expand Down
14 changes: 7 additions & 7 deletions mviewer/templates/mviewerstudio-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ spec:
initContainers:
- name: copy-starter-configmap
image: busybox:latest
{{- if $webapp.resetConfig }}
command: ["sh", "-c", "cp /cm/config.json /mnt/mviewerstudio_conf/;"]
{{- if $webapp.keepConfigFromKubernetes }}
command: ["sh", "-c", "cp /cm/config.json /mnt/mviewerstudio/static/apps/;"]
{{- else }}
command: ["sh", "-c", "if ! [ -f /mnt/mviewerstudio_conf/config.json ]; then cp /cm/config.json /mnt/mviewerstudio_conf/; fi ;"]
command: ["sh", "-c", "if ! [ -f /mnt/mviewerstudio/static/apps/config.json ]; then cp /cm/config.json /mnt/mviewerstudio/static/apps/; fi ;"]
{{- end }}
volumeMounts:
- name: mviewerstudio-conf
mountPath: /mnt/mviewerstudio_conf
- name: mviewerstudio-static-apps
mountPath: /mnt/mviewerstudio/static/apps
- name: mviewerstudio-conf-json
mountPath: /cm
containers:
Expand All @@ -75,7 +75,7 @@ spec:
- name: DEFAULT_ORG
value: no_org
{{- with $webapp.extraEnv }}
{{- toYaml . | nindent 10 }}
{{- toYaml . | nindent 8 }}
{{- end }}
resources:
{{- toYaml $webapp.resources | nindent 10 }}
Expand All @@ -91,7 +91,7 @@ spec:
- name: mviewerstudio-static-apps
mountPath: /home/apprunner/mviewerstudio_backend/static/apps
{{- if $webapp.extraVolumeMounts }}
{{- $webapp.extraVolumeMounts | toYaml | nindent 10 }}
{{- $webapp.extraVolumeMounts | toYaml | nindent 8 }}
{{- end }}
volumes:
- name: mviewer-conf
Expand Down
2 changes: 2 additions & 0 deletions mviewer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ mviewerstudio:
# storageClass: "-"
accessModes:
- ReadWriteOnce
# This will overwrite the config.json from the helm value "configMap" everytime the pod is launched
keepConfigFromKubernetes: false
configMap:
configJson: |
{
Expand Down

0 comments on commit b64f9ad

Please sign in to comment.