Skip to content

Commit

Permalink
openshift disconnected_vm_name to force registry fqdn
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Apr 27, 2024
1 parent 6bafce1 commit 3a80340
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1842,6 +1842,7 @@ You can fine tweak this registry with several parameters:
- disconnected_user
- disconnected_password
- disconnected_operators
- disconnected_vm_name
- ...
Note that this disconnected registry can also be deployed on its own using `kcli create openshift-registry` subcommand
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1984,6 +1984,7 @@ You can fine tweak this registry with several parameters:
- disconnected_user
- disconnected_password
- disconnected_operators
- disconnected_vm_name
- …

Note that this disconnected registry can also be deployed on its own using ``kcli create openshift-registry`` subcommand
Expand Down
2 changes: 1 addition & 1 deletion kvirt/cluster/openshift/disconnected/bin/sync_image.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
IP=$(ip -o addr show eth0 | grep -v '169.254\|fe80::' | tail -1 | awk '{print $4}' | cut -d'/' -f1)
REGISTRY_NAME=$(echo $IP | sed 's/\./-/g' | sed 's/:/-/g').sslip.io
REGISTRY_NAME={{ disconnected_vm_name or "$(echo $IP | sed 's/\./-/g' | sed 's/:/-/g').sslip.io" }}
REGISTRY=$REGISTRY_NAME:5000
PULL_SECRET="/root/openshift_pull.json"
image=$1
Expand Down
2 changes: 1 addition & 1 deletion kvirt/cluster/openshift/disconnected/scripts/03_mirror.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export PATH=/root/bin:$PATH
export PULL_SECRET=/root/openshift_pull.json
IP=$(ip -o addr show eth0 | grep -v '169.254\|fe80::' | tail -1 | awk '{print $4}' | cut -d'/' -f1)
REGISTRY_NAME=$(echo $IP | sed 's/\./-/g' | sed 's/:/-/g').sslip.io
REGISTRY_NAME={{ disconnected_vm_name or "$(echo $IP | sed 's/\./-/g' | sed 's/:/-/g').sslip.io" }}
REGISTRY_USER={{ disconnected_user if disconnected_user != None else 'dummy' }}
REGISTRY_PASSWORD={{ disconnected_password if disconnected_password != None else 'dummy' }}
{% if openshift_release_image is defined and openshift_version is defined %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export PATH=/root/bin:$PATH
export PULL_SECRET=/root/openshift_pull.json
export REGISTRY_IMAGE=quay.io/karmab/registry:latest
IP=$(ip -o addr show eth0 | grep -v '169.254\|fe80::' | tail -1 | awk '{print $4}' | cut -d'/' -f1)
REGISTRY_NAME=$(echo $IP | sed 's/\./-/g' | sed 's/:/-/g').sslip.io
REGISTRY_NAME={{ disconnected_vm_name or "$(echo $IP | sed 's/\./-/g' | sed 's/:/-/g').sslip.io" }}
echo $REGISTRY_NAME:5000 > /root/url.txt
REGISTRY_USER={{ disconnected_user if disconnected_user != None else 'dummy' }}
REGISTRY_PASSWORD={{ disconnected_password if disconnected_password != None else 'dummy' }}
Expand Down
2 changes: 1 addition & 1 deletion kvirt/cluster/openshift/disconnected/scripts/05_olm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cd /root
export PATH=/root/bin:$PATH
export OCP_PULLSECRET_AUTHFILE='/root/openshift_pull.json'
IP=$(ip -o addr show eth0 | grep -v '169.254\|fe80::' | tail -1 | awk '{print $4}' | cut -d'/' -f1)
REGISTRY_NAME=$(echo $IP | sed 's/\./-/g' | sed 's/:/-/g').sslip.io
REGISTRY_NAME={{ disconnected_vm_name or "$(echo $IP | sed 's/\./-/g' | sed 's/:/-/g').sslip.io" }}
export LOCAL_REGISTRY=$REGISTRY_NAME:5000
export IMAGE_TAG=olm

Expand Down
1 change: 1 addition & 0 deletions kvirt/cluster/openshift/kcli_default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ extra_ctlplane_networks: []
extra_worker_networks: []
disconnected_url:
disconnected_vm: false
disconnected_vm_name:
disconnected_update: false
disconnected_haproxy: false
disconnected_reuse: false
Expand Down

0 comments on commit 3a80340

Please sign in to comment.