Skip to content

Commit

Permalink
Avoid patching hypershift operator deployment
Browse files Browse the repository at this point in the history
Let's try killing the hypershift operator to force it to
reload the ICSP/IDMS configuration on its startup.

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
  • Loading branch information
tiraboschi committed Jan 24, 2024
1 parent 403fe95 commit d91f2d2
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,11 @@ chain:
PULL_SECRET_PATH="/tmp/.dockerconfigjson"
TRUST="--additional-trust-bundle /etc/pki/ca-trust/source/anchors/registry.2.crt "
# TODO: can we avoid this?
ROVERRIDES=\$(oc get imagecontentsourcepolicy image-policy -o=json | jq -r '.spec.repositoryDigestMirrors[] | select (.source | test("registry.ci.openshift.org/ocp/") ) | .source+"="+.mirrors[0]')
oc patch deploy -n hypershift operator --type=json -p="[{\"op\": \"add\", \"path\": \"/spec/template/spec/containers/0/args/-\", \"value\": \"--registry-overrides=\${ROVERRIDES}\"}]"
sleep 30
# TODO: can we avoid this? is this a bug?
# kill the hypershift operator pod to force it reloading ICSP/IDMS from the management cluster
oc delete pod -n hypershift -l name=operator
# TODO: Do we really need 3 minutes here???
sleep 180
###
# Enable wildcard routes on the management cluster
Expand Down

0 comments on commit d91f2d2

Please sign in to comment.