Skip to content

Instantly share code, notes, and snippets.

@pedjak
Last active May 13, 2020 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedjak/0509e2fb9aa3b2b2a599bd61875f0936 to your computer and use it in GitHub Desktop.
Save pedjak/0509e2fb9aa3b2b2a599bd61875f0936 to your computer and use it in GitHub Desktop.
Update chart repo proxy to point on a given chart repository
#!/bin/bash
[ -z "$1" ] && echo "Need to specify chart repo url" && exit 1
kubectl patch consoles.operator.openshift.io cluster --patch '{ "spec": { "managementState": "Unmanaged" } }' --type=merge
kubectl patch deploy console -n openshift-console --patch "$(
cat <<EOF
spec:
template:
spec:
containers:
- name: console
command:
- /opt/bridge/bin/bridge
- --public-dir=/opt/bridge/static
- --config=/var/console-config/console-config.yaml
- --helm-chart-repo-url=$1
- --service-ca-file=/var/service-ca/service-ca.crt
EOF
)"
@rohitkrai03
Copy link

This doesn't seem to work now without running below command. The console operator needs to be in Unmanaged state.

oc patch consoles.operator.openshift.io cluster --patch '{ "spec": { "managementState": "Unmanaged" } }' --type=merge

@pedjak
Copy link
Author

pedjak commented May 13, 2020

thanks @rohitkrai03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment