Skip to content

Commit

Permalink
Updates the check for the IBM CR pull secret
Browse files Browse the repository at this point in the history
- Replaces check for specific `default-icr-io` name with a pattern match

Addresses draios#110
  • Loading branch information
seansund committed Apr 22, 2020
1 parent 874f7e4 commit 61231ce
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ function install_k8s_agent {
# Use IBM Cloud Container Registry instead of docker.io
sed -i.bak -e "s|\( *image: \)sysdig/${AGENT_STRING}|\1icr.io/ext/sysdig/${AGENT_STRING}:${AGENT_VERSION}|g" $DAEMONSET_FILE

ICR_SECRET_EXIST=$(kubectl -n default get secret default-icr-io >/dev/null 2>&1 || echo 1)
ICR_SECRET_EXIST=$(kubectl -n default get secret -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' | grep -q icr-io || echo 1)
if [ "$ICR_SECRET_EXIST" = 1 ]; then
# Throw an error instead of running the command for them because it could
# take a long time for the secrets to become populated
Expand Down

0 comments on commit 61231ce

Please sign in to comment.