Skip to content
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

updating userdb job to work with new al images #2665

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kube/services/jobs/indexd-userdb-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
# Script always succeeds if it runs (echo exits with 0)
# indexd image does not include jq, so use python
- |
eval $(python 2> /dev/null <<EOM
eval $( (python 2> /dev/null || poetry run python 2> /dev/null) <<EOM
import json

sheepdog_data = json.load(open('/var/www/indexd/sheepdog_creds.json', 'r'))
Expand All @@ -90,7 +90,7 @@ spec:
EOM
)
for user in "${!user_db[@]}"; do
python /indexd/bin/index_admin.py create --username "$user" --password "${user_db[$user]}"
(python /indexd/bin/index_admin.py create --username "$user" --password "${user_db[$user]}" 2> /dev/null || poetry run python /indexd/bin/index_admin.py create --username "$user" --password "${user_db[$user]}")
done
echo "Exit code: $?"
restartPolicy: Never
Loading