Skip to content

Commit

Permalink
Merge pull request #833 from dynamic-entropy/update_cron_helm_chart
Browse files Browse the repository at this point in the history
Make usercert and userkey file name configurable in helm charts and s…
  • Loading branch information
dynamic-entropy authored Aug 1, 2024
2 parents fbc1c4a + 999e8b0 commit 82be278
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docker/rucio_client/scripts/k8s_sync_sites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

# We have to copy the certificates because we cannot change permissions on them as mounted secrets and voms-proxy is particular about permissions

cp /opt/rucio/certs/usercert.pem /tmp/cert.pem
cp /opt/rucio/keys/new_userkey.pem /tmp/key.pem
cp /opt/rucio/certs/$USERCERT_NAME /tmp/cert.pem
cp /opt/rucio/keys/$USERKEY_NAME /tmp/key.pem
chmod 400 /tmp/key.pem

# Generate a proxy with the voms extension if requested
Expand Down
4 changes: 2 additions & 2 deletions docker/rucio_client/scripts/k8s_sync_users_links.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

# We have to copy the certificates because we cannot change permissions on them as mounted secrets and voms-proxy is particular about permissions

cp /opt/rucio/certs/usercert.pem /tmp/cert.pem
cp /opt/rucio/keys/new_userkey.pem /tmp/key.pem
cp /opt/rucio/certs/$USERCERT_NAME /tmp/cert.pem
cp /opt/rucio/keys/$USERKEY_NAME /tmp/key.pem
chmod 400 /tmp/key.pem

# Generate a proxy with the voms extension if requested
Expand Down
2 changes: 1 addition & 1 deletion helm/rucio-cron-jobs/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: 2.2.0
version: 2.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
Expand Down
6 changes: 6 additions & 0 deletions helm/rucio-cron-jobs/templates/cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ spec:
secretKeyRef:
name: "rucio-secrets"
key: monit_token
{{- with .Values.cronjobSettings.additionalEnvs }}
{{ toYaml . | indent 16 }}
{{- end }}
command: ['/root/CMSRucio/docker/rucio_client/scripts/k8s_sync_sites.sh']
restartPolicy: Never
---
Expand Down Expand Up @@ -115,5 +118,8 @@ spec:
name: "rucio-secrets"
key: oidc_iam_client_secret
optional: true
{{- with .Values.cronjobSettings.additionalEnvs }}
{{ toYaml . | indent 16 }}
{{- end }}
command: ['/root/CMSRucio/docker/rucio_client/scripts/k8s_sync_users_links.sh']
restartPolicy: Never
5 changes: 5 additions & 0 deletions helm/rucio-cron-jobs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ fullnameOverride: ""
cronjobSettings:
daemonName: "cms-ruciod-prod"
instance: "prod"
additionalEnvs:
- name: USERCERT_NAME
value: "rootcert.pem"
- name: USERKEY_NAME
value: "rootkey.pem"

oidc:
iamServer: https://cms-auth.web.cern.ch/
Expand Down

0 comments on commit 82be278

Please sign in to comment.