Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
anjannath opened this issue Feb 17, 2025 · 0 comments
Assignees

Comments

@anjannath
Copy link
Member

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)

@anjannath anjannath moved this to Work In Progress in Project planning: crc Feb 19, 2025
@anjannath anjannath self-assigned this Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Work In Progress
Development

No branches or pull requests

1 participant