Skip to content

use the same appsDomain value in bundle-info.json for both microshift and ocp/okd bundles #1020

Open
@anjannath

Description

Currently we are using two different base domains for openshift|okd and microshift bundles, for microshift its apps.crc.testing and for openshift|okd its apps-crc.testing:

snc/snc-library.sh

Lines 122 to 142 in 295fec3

function create_json_description {
local bundle_type=$1
sncGitHash=$(git describe --abbrev=4 HEAD 2>/dev/null || git rev-parse --short=4 HEAD)
echo {} | ${JQ} '.version = "1.4"' \
| ${JQ} ".type = \"${BUNDLE_TYPE}\"" \
| ${JQ} ".arch = \"${yq_ARCH}\"" \
| ${JQ} ".buildInfo.buildTime = \"$(date -u --iso-8601=seconds)\"" \
| ${JQ} ".buildInfo.sncVersion = \"git${sncGitHash}\"" \
| ${JQ} ".clusterInfo.openshiftVersion = \"${OPENSHIFT_RELEASE_VERSION}\"" \
| ${JQ} ".clusterInfo.clusterName = \"${SNC_PRODUCT_NAME}\"" \
| ${JQ} ".clusterInfo.baseDomain = \"${BASE_DOMAIN}\"" \
| ${JQ} ".clusterInfo.appsDomain = \"apps.${SNC_PRODUCT_NAME}.${BASE_DOMAIN}\"" >${INSTALL_DIR}/crc-bundle-info.json
if [ ${bundle_type} == "snc" ] || [ ${bundle_type} == "okd" ]; then
openshiftInstallerVersion=$(${OPENSHIFT_INSTALL} version)
tmp=$(mktemp)
cat ${INSTALL_DIR}/crc-bundle-info.json \
| ${JQ} ".buildInfo.openshiftInstallerVersion = \"${openshiftInstallerVersion}\"" \
| ${JQ} ".clusterInfo.appsDomain = \"apps-${SNC_PRODUCT_NAME}.${BASE_DOMAIN}\"" \
> ${tmp} && mv ${tmp} ${INSTALL_DIR}/crc-bundle-info.json
fi
}

We need to create a dnsmasq config file for crc when using the system network mode

and in case of the self-sufficient bundle this needs to happen from a systemd service running in the VM. If we have two different base domains for the cluster then we need to modify this systemd service to create the config file with the right domain based on the bundle preset type

but if we could use the same base domain for both the preset then this systemd service can be simple, and there was mention of unifying this here: #372 (comment)

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions