-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an initContainer to register the gpg keys
fixes: #1001
- Loading branch information
Showing
8 changed files
with
140 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
set -xe | ||
|
||
# get pulp admin password | ||
PULP_ADM_PWD=$(kubectl get secret/example-pulp-admin-password -ojsonpath='{.data.password}'|base64 -d) | ||
|
||
# verify the list of signing services (keeping it in a different variable to make troubleshooting/debug easier) | ||
SIGNING_SVC=$(kubectl exec deployment/example-pulp-api -- curl -u admin:$PULP_ADM_PWD -sL localhost:24817/pulp/api/v3/signing-services/) | ||
|
||
# get only the count of services found | ||
SVC_COUNT=$(echo $SIGNING_SVC | jq .count) | ||
|
||
# check if the 2 services were found | ||
if [[ $SVC_COUNT != 2 ]] ; then | ||
echo "Could not find all signing services!" | ||
exit 1 | ||
fi | ||
|
||
# check if the the gpg key is in the api's keyring | ||
kubectl exec deployment/example-pulp-api -- gpg -k joe@foo.bar 2>/dev/null | ||
|
||
# check if the the gpg key is in the worker's keyring | ||
kubectl exec deployment/example-pulp-worker -- gpg -k joe@foo.bar 2>/dev/null | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixed a bug where the gpg keys were not available in all API and worker pods. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters