-
Notifications
You must be signed in to change notification settings - Fork 3
chore: implement init containers for dynamic configuration generation… #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
xiangyisss
wants to merge
23
commits into
main
Choose a base branch
from
EXVT-6034
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
a2b8237
chore: implement init containers for dynamic configuration generation…
xiangyisss dc141d3
chore: adjust indentation for initPermissionsContainer in multiple de…
xiangyisss dfe0598
update licence mountPath in deployment templates
xiangyisss 99d65d5
chore: implement config generation scripts and update RabbitMQ config…
xiangyisss c4fd6fd
chore: revert dummy-data ConfigMap to use dynamic appname label
xiangyisss e040891
Merge main into EXVT-6034
xiangyisss 1a1c201
Merge remote-tracking branch 'origin/main' into EXVT-6034
xiangyisss 65f6104
chore: enhance config generation for Postgres and RabbitMQ; remove un…
xiangyisss cfd2e5d
chore: simplify config generation by embedding non-sensitive values d…
xiangyisss ea43831
chore: update config generation to include chronos and griffon TTL va…
xiangyisss 5ffb4c2
chore: removing config generator script and apply internal jq image
xiangyisss bfec645
chore: update PostgreSQL and RabbitMQ configurations to set default v…
xiangyisss e0125e5
chore: refactor volume and mount definitions for consistency across d…
xiangyisss 449368a
chore: update deployment templates to include checksum annotations fo…
xiangyisss 1466666
chore: fix indentation for probes inclusion in chronos deployment tem…
xiangyisss bc4b8f1
chore: update image configuration defaults in init config templates a…
xiangyisss 8adcca2
chore: refactor
xiangyisss e3e4d48
chore: update checksum annotations for configmaps in deployment templ…
xiangyisss 7df761f
chore: remove database and message queue credentials from deployment …
xiangyisss ec08569
chore: remove unused config references in deployment templates
xiangyisss a5db63d
chore: update initConfigInjector to use jq for secret injection and a…
xiangyisss 3cbbc1f
chore: increase HELM_TIMEOUT from 10m to 15m for better deployment st…
xiangyisss 7bc9251
chore: update rabbitmq secret references in deployment templates and …
xiangyisss File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| {{/* | ||
| Simple init container that injects secrets into config.json | ||
| Replaces placeholders {{DB_USER}}, {{DB_PASSWORD}}, {{MQ_USER}}, {{MQ_PASSWORD}} | ||
| Can be used by all deployments | ||
| */}} | ||
| {{- define "exivity.initConfigInjector" }} | ||
| - name: inject-secrets | ||
| image: {{ include "exivity.image" (set $ "name" "configGenerator") }} | ||
| imagePullPolicy: {{ .Values.service.configGenerator.pullPolicy | default .Values.service.pullPolicy | default "IfNotPresent" }} | ||
| command: ["/bin/sh", "-c"] | ||
| args: | ||
| - | | ||
| set -e | ||
| echo "Injecting secrets into config.json..." | ||
|
|
||
| jq --arg db_user "$DB_USER" \ | ||
| --arg db_password "$DB_PASSWORD" \ | ||
| --arg mq_user "$MQ_USER" \ | ||
| --arg mq_password "$MQ_PASSWORD" \ | ||
| '.db.parameters.user = $db_user | | ||
| .db.parameters.password = $db_password | | ||
| .mq.user = $mq_user | | ||
| .mq.password = $mq_password' \ | ||
| /config-template/config.json > /config/config.json | ||
|
|
||
| echo "Config generated successfully" | ||
| env: | ||
| - name: DB_USER | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ include "exivity.fullname" . }}-postgres-secret | ||
| key: POSTGRES_USER | ||
| - name: DB_PASSWORD | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ include "exivity.fullname" . }}-postgres-secret | ||
| key: POSTGRES_PASSWORD | ||
| - name: MQ_USER | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ include "exivity.fullname" . }}-rabbitmq-secret | ||
| key: RABBITMQ_USERNAME | ||
| - name: MQ_PASSWORD | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ include "exivity.fullname" . }}-rabbitmq-secret | ||
| key: RABBITMQ_PASSWORD | ||
| volumeMounts: | ||
| - name: config-template | ||
| mountPath: /config-template | ||
| readOnly: true | ||
| - name: config-generated | ||
| mountPath: /config | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Volume for the config template (ConfigMap with placeholders) | ||
| */}} | ||
| {{- define "exivity.configTemplateVolume" }} | ||
| - name: config-template | ||
| configMap: | ||
| name: {{ .configMapName }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Volume for the generated config (emptyDir) | ||
| */}} | ||
| {{- define "exivity.configGeneratedVolume" }} | ||
| - name: config-generated | ||
| emptyDir: {} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Volume mount for the generated config.json | ||
| */}} | ||
| {{- define "exivity.configVolumeMount" }} | ||
| - name: config-generated | ||
| mountPath: /exivity/home/system/config.json | ||
| subPath: config.json | ||
xiangyisss marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| {{- end }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.