Skip to content
Merged
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
2 changes: 1 addition & 1 deletion agent/docs/config-presets-and-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ When setting the above variables to true you also might want to set the followin
| LOCAL_REGISTRY_DNS_NAME | virthost.$CLUSTER_NAME.test.metalkube.org | String - Web domain | Local image registry DNS name. |
| LOCAL_REGISTRY_PORT | 5000 | String - Port Number | Local image registry port. |
| REGISTRY_USER | ocp-user | String | Local image registry user. |
| REGISTRY_PASS | ocp-pass | String | Local image registry user's password. |
| REGISTRY_PASS | <generated> | String | Local image registry user's password. |
| REGISTRY_DIR | $WORKING_DIR/registry | String - Directory path | Base directory for the local image registry. |
| REGISTRY_CREDS | $HOME/$USER-private-mirror-$CLUSTER_NAME.json | String - File path | Location of the local registry mirror's credentials. |
| MIRROR_OLM | | String - List | Comma-separated list of OLM operators to mirror into the local registry. |
Expand Down
13 changes: 12 additions & 1 deletion common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,22 @@ export ALL_REGISTRY_DNS_NAMES=${ALL_REGISTRY_DNS_NAMES:-${LOCAL_REGISTRY_DNS_NAM
# variables for local registry configuration
export LOCAL_REGISTRY_PORT=${LOCAL_REGISTRY_PORT:-"5000"}
export REGISTRY_USER=${REGISTRY_USER:-ocp-user}
export REGISTRY_PASS=${REGISTRY_PASS:-ocp-pass}
export REGISTRY_DIR=${REGISTRY_DIR:-$WORKING_DIR/registry}
export REGISTRY_CREDS=${REGISTRY_CREDS:-$HOME/private-mirror-${CLUSTER_NAME}.json}
export REGISTRY_CRT=registry.2.crt
export REGISTRY_BACKEND=${REGISTRY_BACKEND:-"podman"}
REGISTRY_PASS_FILE="${XDG_CONFIG_HOME}/dev-scripts/registry-pass"
mkdir -p "$(dirname "${REGISTRY_PASS_FILE}")"

if [[ -z "${REGISTRY_PASS:-}" ]]; then
if [[ ! -f "${REGISTRY_PASS_FILE}" ]]; then
touch "${REGISTRY_PASS_FILE}"
chmod 0600 "${REGISTRY_PASS_FILE}"
uuidgen > "${REGISTRY_PASS_FILE}"
fi
REGISTRY_PASS=$(<"${REGISTRY_PASS_FILE}")
fi
export REGISTRY_PASS

# Set this variable to build the installer from source
export KNI_INSTALL_FROM_GIT=${KNI_INSTALL_FROM_GIT:-}
Expand Down