File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 116
116
# to be linked with the right pull secret before creating the Pod. This is to prevent race conditions.
117
117
timeout 120 " [[ \$ (oc -n $OLM_NAMESPACE get pods -l olm.catalogSource=serverless-operator --no-headers | wc -l) != 1 ]]"
118
118
index_pod=$( oc -n " $OLM_NAMESPACE " get pods -l olm.catalogSource=serverless-operator -oname)
119
- if ! oc -n " $OLM_NAMESPACE " get " $index_pod " -ojsonpath=' {.spec.imagePullSecrets}' | grep dockercfg & > /dev/null; then
119
+ # shellcheck disable=SC2266
120
+ if oc -n " $OLM_NAMESPACE " get " $index_pod " -ojsonpath=' {.spec.imagePullSecrets}' | [ -t 0 ]; then
121
+ # pull secrets are present, see: https://unix.stackexchange.com/a/388462
122
+ # wait until they have dockercfg one
120
123
timeout 120 " [[ \$ (oc -n $OLM_NAMESPACE get sa serverless-operator -ojsonpath='{.imagePullSecrets}' | grep -c dockercfg) == 0 ]]"
121
124
oc -n " $OLM_NAMESPACE " delete pods -l olm.catalogSource=serverless-operator
122
125
fi
You can’t perform that action at this time.
0 commit comments