Skip to content
Closed
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 deletions hack/cluster-push-prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@

set -xeuo pipefail

oc -n openshift-cluster-version scale --replicas=0 deploy/cluster-version-operator
# XXX: --type merge completely overrides any previous "overrides" array
# find a way to just append? json op: add isn't working at all
# if there's not an overrides array already, that's why we use merge
oc patch clusterversions.config.openshift.io/version --type merge -p '{"spec":{"overrides": [{"kind": "Deployment","name": "machine-config-operator", "namespace": "openshift-machine-config-operator", "unmanaged": true}, {"kind": "ConfigMap","name": "machine-config-operator-images", "namespace": "openshift-machine-config-operator", "unmanaged": true}]}}'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we don't need to add the Deployment for the operator here or we're going to miss the wiring with the CVO (status report and whatnot). @cgwalters is this your understanding as well?


if ! oc get -n openshift-image-registry route/image-registry &>/dev/null; then
oc expose -n openshift-image-registry svc/image-registry
fi
oc patch -n openshift-image-registry route/image-registry -p '{"spec": {"tls": {"insecureEdgeTerminationPolicy": "Redirect", "termination": "reencrypt"}}}'
registry=$(oc get -n openshift-image-registry -o json route/image-registry | jq -r ".spec.host")
if ! curl -k --head https://"${registry}" >/dev/null; then
if ! curl -k -s --head https://"${registry}" >/dev/null; then
if ! grep -q "${registry}" /etc/hosts; then
set +x
echo "error: Failed to contact the registry"
Expand Down
2 changes: 1 addition & 1 deletion hack/cluster-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if [ "${1:-}" = "-n" ]; then
fi

registry=$(oc get -n openshift-image-registry -o json route/image-registry | jq -r ".spec.host")
curl -k --head https://"${registry}" >/dev/null
curl -k -s --head https://"${registry}" >/dev/null

WHAT=${WHAT:-machine-config-daemon}
LOCAL_IMGNAME=localhost/${WHAT}
Expand Down