Skip to content

Commit

Permalink
WIP; chart update
Browse files Browse the repository at this point in the history
  • Loading branch information
sadok-f committed Sep 15, 2024
1 parent f57b363 commit 5236718
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 3 deletions.
4 changes: 2 additions & 2 deletions charts/flyimg/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ 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.2.0
version: 0.2.1

# 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
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 1.4.9
appVersion: 1.4.12
7 changes: 7 additions & 0 deletions charts/flyimg/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: flyimg-override-config
data:
override-parameters.yml: |
{{- .Values.parameters | toYaml | nindent 4 }}
35 changes: 34 additions & 1 deletion charts/flyimg/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,28 @@ spec:
serviceAccountName: {{ include "flyimg.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
- name: copy-original-config
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
command: ["/bin/sh", "-c"]
args:
- |
cp /var/www/html/config/parameters.yml /config/parameters.yml
volumeMounts:
- name: shared-config
mountPath: /config
- name: update-config
image: mikefarah/yq:4
command: ["/bin/sh", "-c"]
args:
- |
yq eval-all 'select(fileIndex == 0) * select(fileIndex == 1)' /config/parameters.yml /override/override-parameters.yml > /config/merged-parameters.yml
mv /config/merged-parameters.yml /config/parameters.yml
volumeMounts:
- name: shared-config
mountPath: /config
- name: override-config
mountPath: /override
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand All @@ -45,8 +67,19 @@ spec:
httpGet:
path: /
port: http
volumeMounts:
- name: shared-config
mountPath: /var/www/html/config
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: shared-config
emptyDir: {}
- name: override-config
configMap:
name: flyimg-override-config
# optional: true

{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/flyimg/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,6 @@ nodeSelector: {}
tolerations: []

affinity: {}

# configuration values for Flyimg application
parameters:

Check failure on line 82 in charts/flyimg/values.yaml

View workflow job for this annotation

GitHub Actions / lint-test

82:12 [new-line-at-end-of-file] no new line character at the end of file

0 comments on commit 5236718

Please sign in to comment.