Skip to content

Commit

Permalink
remove cap Ingress from ADDITIONAL_ENABLED_CAPABILITIES (#51424)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinyunma committed Apr 28, 2024
1 parent 5a0d64a commit 1d3eeaf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 33 deletions.
Expand Up @@ -316,7 +316,6 @@ tests:
OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE: release:multi-latest
env:
ADDITIONAL_ENABLED_CAPABILITIES: MachineAPI CloudCredential CloudControllerManager
Ingress
BASE_DOMAIN: qe.devcluster.openshift.com
BASELINE_CAPABILITY_SET: None
COMPUTE_NODE_TYPE: m6g.xlarge
Expand All @@ -339,7 +338,6 @@ tests:
OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE: release:multi-latest
env:
ADDITIONAL_ENABLED_CAPABILITIES: MachineAPI CloudCredential CloudControllerManager
Ingress
BASE_DOMAIN: qe.devcluster.openshift.com
BASELINE_CAPABILITY_SET: None
E2E_RUN_TAGS: '@disconnected'
Expand Down Expand Up @@ -749,7 +747,7 @@ tests:
dependencies:
OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE: release:multi-latest
env:
ADDITIONAL_ENABLED_CAPABILITIES: CloudCredential CloudControllerManager Ingress
ADDITIONAL_ENABLED_CAPABILITIES: CloudCredential CloudControllerManager
BASE_DOMAIN: qe.devcluster.openshift.com
BASELINE_CAPABILITY_SET: None
PERSISTENT_MONITORING: "false"
Expand All @@ -763,7 +761,7 @@ tests:
dependencies:
OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE: release:multi-latest
env:
ADDITIONAL_ENABLED_CAPABILITIES: CloudCredential CloudControllerManager Ingress
ADDITIONAL_ENABLED_CAPABILITIES: CloudCredential CloudControllerManager
BASE_DOMAIN: qe.devcluster.openshift.com
BASELINE_CAPABILITY_SET: None
BOOTSTRAP_INSTANCE_TYPE: m6g.large
Expand Down Expand Up @@ -859,7 +857,7 @@ tests:
dependencies:
OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE: release:multi-latest
env:
ADDITIONAL_ENABLED_CAPABILITIES: CloudCredential CloudControllerManager Ingress
ADDITIONAL_ENABLED_CAPABILITIES: CloudCredential CloudControllerManager
BASE_DOMAIN: qe.azure.devcluster.openshift.com
PERSISTENT_MONITORING: "false"
test:
Expand All @@ -872,7 +870,7 @@ tests:
dependencies:
OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE: release:multi-latest
env:
ADDITIONAL_ENABLED_CAPABILITIES: CloudCredential CloudControllerManager Ingress
ADDITIONAL_ENABLED_CAPABILITIES: CloudCredential CloudControllerManager
BASE_DOMAIN: qe.azure.devcluster.openshift.com
COMPUTE_NODE_TYPE: Standard_D4ps_v5
OCP_ARCH: arm64
Expand Down Expand Up @@ -1540,7 +1538,7 @@ tests:
MULTI_RELEASE_IMAGE: release:multi-latest
OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE: release:multi-latest
env:
ADDITIONAL_ENABLED_CAPABILITIES: baremetal MachineAPI Ingress
ADDITIONAL_ENABLED_CAPABILITIES: baremetal MachineAPI
AUX_HOST: openshift-qe-metal-ci.arm.eng.rdu2.redhat.com
BASELINE_CAPABILITY_SET: None
DISCONNECTED: "false"
Expand Down
Expand Up @@ -108,8 +108,8 @@ v416=" ${v415} CloudControllerManager Ingress"
latest_defined="v416"
always_default="${!latest_defined}"
# always enabled capabilities
#declare -A always_enabled_caps
#always_enabled_caps[416]="Ingress"
declare -A always_enabled_caps
always_enabled_caps[416]="Ingress"

# Determine vCurrent
declare "v${ocp_major_version}${ocp_minor_version}"
Expand Down Expand Up @@ -161,12 +161,12 @@ additional_caps_from_config=$(yq-go r "${SHARED_DIR}/install-config.yaml" "capab
if [[ "${additional_caps_from_config}" != "" ]]; then
enabled_capability_set="${enabled_capability_set} ${additional_caps_from_config}"
fi
# Once pr https://github.com/openshift/cluster-version-operator/pull/946 merged, the code can be opened
#for version in "${!always_enabled_caps[@]}"; do
# if [[ ${ocp_version/.} -ge ${version} ]]; then
# enabled_capability_set="${enabled_capability_set} ${always_enabled_caps[$version]}"
# fi
#done

for version in "${!always_enabled_caps[@]}"; do
if [[ ${ocp_version/.} -ge ${version} ]]; then
enabled_capability_set="${enabled_capability_set} ${always_enabled_caps[$version]}"
fi
done
enabled_capability_set=$(echo ${enabled_capability_set} | xargs -n1 | sort -u | xargs)
disabled_capability_set="${vCurrent}"
for cap in $enabled_capability_set; do
Expand Down
Expand Up @@ -125,12 +125,6 @@ function get_actual_implicit_caps {
# The condition message could be "The following capabilities could not be disabled: Console, Insights, Storage"
tmp_capabilities=$(echo "$implicit_message" | grep -oE 'could not be disabled: (.*)' | cut -d':' -f2)
actual_implicit_caps=$(echo "$tmp_capabilities" | awk -F', ' '{ for (i=1; i<=NF; i++) print $i }')
# need to remove once pr https://github.com/openshift/cluster-version-operator/pull/946 is merged
for version in "${!always_enabled_caps[@]}"; do
if [[ ${ocp_version/.} -ge ${version} ]]; then
actual_implicit_caps="${actual_implicit_caps} ${always_enabled_caps[$version]}"
fi
done
# echo "Actual implicitly enabled capabilities list is ${actual_implicit_caps}"
}

Expand Down Expand Up @@ -224,13 +218,6 @@ function check_cvo_cap() {
result=1
else
cvo_caps_str=$(echo $cvo_caps | tr -d '["]' | tr "," " " | xargs -n1 | sort -u | xargs)
# need to remove once pr https://github.com/openshift/cluster-version-operator/pull/946 is merged
for version in "${!always_enabled_caps[@]}"; do
if [[ ${ocp_version/.} -ge ${version} ]]; then
cvo_caps_str="${cvo_caps_str} ${always_enabled_caps[$version]}"
fi
done
cvo_caps_str=$(echo ${cvo_caps_str} | xargs -n1 | sort -u | xargs)

if [[ "${cvo_caps_str}" == "${capability_set}" ]]; then
echo "INFO: ${expected_status} capabilities matches with cvo ${cvo_field}!"
Expand Down Expand Up @@ -268,11 +255,6 @@ if [[ -z "${baselinecaps_from_cluster}" || "${baselinecaps_from_cluster}" == "nu
fi
echo "baselinecaps_from_cluster: ${baselinecaps_from_cluster}"

ocp_version=$(oc version -o json | jq -r '.openshiftVersion' | cut -d '.' -f1,2 | tr -d '.')
# always enabled capabilities
declare -A always_enabled_caps
always_enabled_caps[416]="Ingress"

# shellcheck disable=SC2207
version_set=($(oc get clusterversion version -ojson | jq -r .status.history[].version))

Expand Down

0 comments on commit 1d3eeaf

Please sign in to comment.