Start registry using administrative credentials
If a user has not exposed the `$ADMIN_KUBECONFIG` as the default
`$KUBECONFIG` to use for the `oc` client, `os::start::registry` will
need to pass the configuration file for all of the client calls, not
only the first one.
@@ -649,7 +649,7 @@ function os::start::registry() {
# For testing purposes, ensure the quota objects are always up to date in the registry by
# disabling project cache.
openshift admin registry --config="${ADMIN_KUBECONFIG}" --images="${USE_IMAGES}" --enforce-quota -o json | \
- oc env -f - --output json "REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_PROJECTCACHETTL=0" | \
- oc create -f -
+ oc env --config="${ADMIN_KUBECONFIG}" -f - --output json "REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_PROJECTCACHETTL=0" | \
+ oc create --config="${ADMIN_KUBECONFIG}" -f -
}
readonly -f os::start::registry
