diff --git a/containers/iam-rucio-sync/sync_iam_rucio.py b/containers/iam-rucio-sync/sync_iam_rucio.py index 2443bf7..c93aae6 100644 --- a/containers/iam-rucio-sync/sync_iam_rucio.py +++ b/containers/iam-rucio-sync/sync_iam_rucio.py @@ -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: diff --git a/infrastructure/cluster/flux/rucio/rucio-cronjobs.yaml b/infrastructure/cluster/flux/rucio/rucio-cronjobs.yaml index 21b1a82..f79e819 100644 --- a/infrastructure/cluster/flux/rucio/rucio-cronjobs.yaml +++ b/infrastructure/cluster/flux/rucio/rucio-cronjobs.yaml @@ -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/" @@ -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