Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
Helm charts for swh packages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Platform
Infrastructure
CI CD
Helm charts for swh packages
Commits
c83de8fc
Verified
Commit
c83de8fc
authored
1 year ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
Install new dsn configuration pattern for listers
Refs.
swh/meta#4949
parent
589fad02
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
swh/templates/listers/configmap.yaml
+19
-3
19 additions, 3 deletions
swh/templates/listers/configmap.yaml
swh/templates/listers/deployment.yaml
+7
-9
7 additions, 9 deletions
swh/templates/listers/deployment.yaml
with
26 additions
and
12 deletions
swh/templates/listers/configmap.yaml
+
19
−
3
View file @
c83de8fc
...
@@ -57,22 +57,38 @@ data:
...
@@ -57,22 +57,38 @@ data:
task_queues:
task_queues:
{{- range $queue := get $deployment_config "queues" }}
{{- range $queue := get $deployment_config "queues" }}
- {{ $queue }}
- {{ $queue }}
sentry_settings_for_celery_tasks:
__sentry-settings-for-celery-tasks__
{{- end }}
{{- end }}
credentials:
credentials:
__lister-credentials__
init-container-entrypoint.sh
:
|
init-container-entrypoint.sh
:
|
#!/bin/bash
#!/bin/bash
set -e
set -e
CONFIG_FILE=/etc/swh/config.yml
CONFIG_FILE=/etc/swh/config.yml
CONFIG_FILE_WIP=/tmp/wip-config.yml
# substitute environment variables when creating the default config.yml
# substitute environment variables when creating the default config.yml
eval echo \""$(</etc/swh/configuration-template/config.yml.template)"\" \
eval echo \""$(</etc/swh/configuration-template/config.yml.template)"\" \
> $CONFIG_FILE
> $CONFIG_FILE
CREDS_LISTER_PATH=/etc/credentials/listers/credentials
SENTRY_SETTINGS_PATH=/etc/credentials/sentry-settings/sentry_settings_for_celery_tasks
[ -f $CREDS_LISTER_PATH ] && \
if [ -f $SENTRY_SETTINGS_PATH ]; then
sed 's/^/ /g' $CREDS_LISTER_PATH >> $CONFIG_FILE
awk "/__sentry-settings-for-celery-tasks__/{system(\"sed 's/^/ /g' $SENTRY_SETTINGS_PATH\");next}1" $CONFIG_FILE > $CONFIG_FILE_WIP
mv $CONFIG_FILE_WIP $CONFIG_FILE
else
sed -i '/__sentry-settings-for-celery-tasks__//g' $CONFIG_FILE
fi
if [ -f $CREDS_LISTER_PATH ]; then
awk "/__lister-credentials__/{system(\"sed 's/^/ /g' $CREDS_LISTER_PATH\");next}1" $CONFIG_FILE > $CONFIG_FILE_WIP
mv $CONFIG_FILE_WIP $CONFIG_FILE
else
sed -i '/__lister-credentials__//g' $CONFIG_FILE
fi
exit 0
exit 0
{{
end
}}
{{
end
}}
...
...
This diff is collapsed.
Click to expand it.
swh/templates/listers/deployment.yaml
+
7
−
9
View file @
c83de8fc
...
@@ -64,6 +64,9 @@ spec:
...
@@ -64,6 +64,9 @@ spec:
-
name
:
lister-credentials-secrets
-
name
:
lister-credentials-secrets
mountPath
:
/etc/credentials/listers
mountPath
:
/etc/credentials/listers
readOnly
:
true
readOnly
:
true
-
name
:
sentry-settings-for-celery-tasks
mountPath
:
/etc/credentials/sentry-settings
readOnly
:
true
containers
:
containers
:
-
name
:
listers
-
name
:
listers
resources
:
resources
:
...
@@ -94,15 +97,6 @@ spec:
...
@@ -94,15 +97,6 @@ spec:
value
:
/etc/swh/config.yml
value
:
/etc/swh/config.yml
-
name
:
SWH_SENTRY_ENVIRONMENT
-
name
:
SWH_SENTRY_ENVIRONMENT
value
:
{{
$.Values.sentry.environment
}}
value
:
{{
$.Values.sentry.environment
}}
-
name
:
SWH_MAIN_PACKAGE
value
:
{{
$.Values.listers.sentrySwhPackage
}}
-
name
:
SWH_SENTRY_DSN
valueFrom
:
secretKeyRef
:
name
:
common-secrets
key
:
lister-sentry-dsn
# 'name' secret must exist & include key "host"
optional
:
false
volumeMounts
:
volumeMounts
:
-
name
:
lister-utils
-
name
:
lister-utils
mountPath
:
/pre-stop.sh
mountPath
:
/pre-stop.sh
...
@@ -132,5 +126,9 @@ spec:
...
@@ -132,5 +126,9 @@ spec:
secret
:
secret
:
secretName
:
lister-credentials-secrets
secretName
:
lister-credentials-secrets
optional
:
true
optional
:
true
-
name
:
sentry-settings-for-celery-tasks
secret
:
secretName
:
sentry-settings-for-celery-tasks
optional
:
true
{{
end
}}
{{
end
}}
{{
- end -
}}
{{
- end -
}}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment