Skip to content

Commit

Permalink
update: oc mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
codekow committed Oct 28, 2023
1 parent 3f45a31 commit 06b6d8a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/OPERATORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
podman login --authfile scratch/pull-secret.txt registry.redhat.io
# kludge: copy registry key to podman auth
cp scratch/pull-secret.txt ${XDG_RUNTIME_DIR}/containers/auth.json
DOCKER_CONFIG=~/.docker
oc -n openshift-config extract secret/pull-secret --keys=.dockerconfigjson
mkdir -p ~/.docker && mv .dockerconfigjson ~/.docker/config.json
# redhat-operators
INDEX=registry.redhat.io/redhat/redhat-operator-index:v4.12
Expand Down
6 changes: 6 additions & 0 deletions scripts/library/unsorted.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ select_folder(){
popd >/dev/null || return
}

oc_mirror_init(){
export DOCKER_CONFIG="${GIT_ROOT}/scratch"
oc -n openshift-config extract secret/pull-secret --keys=.dockerconfigjson
mkdir -p "${DOCKER_CONFIG}" && mv .dockerconfigjson "${DOCKER_CONFIG}/config.json"
}

operator_list(){
VERSION=4.12
INDEX=${1:-registry.redhat.io/redhat/redhat-operator-index:v${VERSION}}
Expand Down

0 comments on commit 06b6d8a

Please sign in to comment.