Skip to content

Commit

Permalink
Improve output iam-rucio-sync output (#291)
Browse files Browse the repository at this point in the history
* trigger build of image for debug iam-sync

* trigger creation of the image via the branch

* return to normal CI behavious and add the new image for the cronjob
  • Loading branch information
garciagenrique authored Nov 13, 2024
1 parent 6024d9c commit 9764040
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
1 change: 1 addition & 0 deletions containers/iam-rucio-sync/sync_iam_rucio.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ def make_gridmap_compatible(self, certificate):

# get all users from IAM
iam_users = syncer.get_list_of_users(access_token)
logging.info(f"Syncing {len(iam_users)} users retrieved from IAM.")

# DEBUG user output to file
if debug:
Expand Down
20 changes: 5 additions & 15 deletions infrastructure/cluster/flux/rucio/rucio-cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@ spec:
restartPolicy: OnFailure
containers:
- name: iam-sync
image: ghcr.io/vre-hub/vre-iam-rucio-sync:v1.0.0-rc.2
volumeMounts:
- name: rucio-cfg
mountPath: /opt/rucio/etc/
- name: daemons-rucio-x509up
mountPath: /tmp/
image: ghcr.io/vre-hub/vre-iam-rucio-sync:v1.0.0-rc.2-82-aea1b65
env:
- name: IAM_SERVER
value: "https://iam-escape.cloud.cnaf.infn.it/"
Expand All @@ -34,22 +29,17 @@ spec:
secretKeyRef:
name: rucio-admin-iam-client
key: admin-client_id
# For clarity/completeness the client_id value is can be passed via a secret/env var,
# but it is already passed as a value within the `iam-sync.conf` file.
tty: true
imagePullPolicy: Always
command:
- /bin/sh
- -c
- date; echo Hello from iam-rucio-sync container;
pwd; ls;rucio whoami;
- date; echo '* Hello from iam-rucio-sync container *';
pwd; ls;
echo $IAM_SERVER; echo $IAM_CLIENT_ID; echo $IAM_CLIENT_SECRET; python3 /home/sync_iam_rucio.py;
echo '* Sync to IAM * Done!'
volumes:
- name: rucio-cfg
secret:
secretName: escape-service-account
- name: daemons-rucio-x509up
secret:
secretName: daemons-rucio-x509up
# ---
# apiVersion: batch/v1
# kind: CronJob
Expand Down

0 comments on commit 9764040

Please sign in to comment.