Skip to content

Commit 466d48c

Browse files
authored
[IUO] Add kubevirt-apiserver-proxy-np relate object (RedHatQE#2020)
* [IUO] Add kubevirt-apiserver-proxy-np relate object Signed-off-by: Harel Meir <hmeir@redhat.com> * Add jira CNV-68999 The np component relationship label isn't correct. Skipping it until its fixed Signed-off-by: Harel Meir <hmeir@redhat.com> --------- Signed-off-by: Harel Meir <hmeir@redhat.com>
1 parent b5153b0 commit 466d48c

3 files changed

Lines changed: 24 additions & 2 deletions

File tree

tests/install_upgrade_operators/relationship_labels/constants.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@
2828
KUBEMACPOOL_CERT_MANAGER,
2929
KUBEMACPOOL_MAC_CONTROLLER_MANAGER,
3030
KUBEVIRT_APISERVER_PROXY,
31+
KUBEVIRT_APISERVER_PROXY_NP,
3132
KUBEVIRT_CLUSTER_CRITICAL,
3233
KUBEVIRT_CONSOLE_PLUGIN,
34+
KUBEVIRT_CONSOLE_PLUGIN_NP,
3335
KUBEVIRT_CONSOLE_PLUGIN_SERVICE,
3436
KUBEVIRT_HYPERCONVERGED_OPERATOR_METRICS,
3537
KUBEVIRT_HYPERCONVERGED_PROMETHEUS_RULE,
@@ -430,4 +432,16 @@
430432
VERSION_LABEL_KEY: None,
431433
PART_OF_LABEL_KEY: HCO_PART_OF_LABEL_VALUE,
432434
},
435+
KUBEVIRT_CONSOLE_PLUGIN_NP: {
436+
MANAGED_BY_LABEL_KEY: HCO_OPERATOR,
437+
COMPONENT_LABEL_KEY: KUBEVIRT_CONSOLE_PLUGIN,
438+
VERSION_LABEL_KEY: None,
439+
PART_OF_LABEL_KEY: HCO_PART_OF_LABEL_VALUE,
440+
},
441+
KUBEVIRT_APISERVER_PROXY_NP: {
442+
MANAGED_BY_LABEL_KEY: HCO_OPERATOR,
443+
COMPONENT_LABEL_KEY: KUBEVIRT_APISERVER_PROXY,
444+
VERSION_LABEL_KEY: None,
445+
PART_OF_LABEL_KEY: HCO_PART_OF_LABEL_VALUE,
446+
},
433447
}

tests/install_upgrade_operators/relationship_labels/test_relationship_labels.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
from tests.install_upgrade_operators.relationship_labels.utils import (
1313
verify_component_labels_by_resource,
1414
)
15-
from utilities.constants import VERSION_LABEL_KEY
15+
from utilities.constants import KUBEVIRT_APISERVER_PROXY_NP, VERSION_LABEL_KEY
16+
from utilities.infra import is_jira_open
1617

1718
pytestmark = [pytest.mark.post_upgrade, pytest.mark.sno, pytest.mark.gating, pytest.mark.arm64, pytest.mark.s390x]
1819
LOGGER = logging.getLogger(__name__)
@@ -99,6 +100,9 @@ def test_verify_relationship_labels_hco_components(
99100
expected_label_dictionary,
100101
ocp_resource_by_name,
101102
):
103+
if ocp_resource_by_name.name == KUBEVIRT_APISERVER_PROXY_NP and is_jira_open(jira_id="CNV-68999"):
104+
pytest.skip(f"Currently {KUBEVIRT_APISERVER_PROXY_NP} resource have the wrong relationship labels")
105+
102106
verify_component_labels_by_resource(
103107
component=ocp_resource_by_name,
104108
expected_component_labels=expected_label_dictionary,

utilities/constants.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,8 @@ class S390X:
385385
KUBEVIRT_UI_CONFIG_READER = "kubevirt-ui-config-reader"
386386
KUBEVIRT_UI_CONFIG_READER_ROLE_BINDING = "kubevirt-ui-config-reader-rolebinding"
387387
HCO_BEARER_AUTH = "hco-bearer-auth"
388+
KUBEVIRT_CONSOLE_PLUGIN_NP = "kubevirt-console-plugin-np"
389+
KUBEVIRT_APISERVER_PROXY_NP = "kubevirt-apiserver-proxy-np"
388390
# components kind
389391
ROLEBINDING_STR = "RoleBinding"
390392
POD_STR = "Pod"
@@ -407,6 +409,7 @@ class S390X:
407409
SSP_STR = "SSP"
408410
SECRET_STR = "Secret"
409411
KUBEVIRT_APISERVER_PROXY = "kubevirt-apiserver-proxy"
412+
NETWORKPOLICY_STR = "NetworkPolicy"
410413
AAQ_OPERATOR = "aaq-operator"
411414
WINDOWS_BOOTSOURCE_PIPELINE = "windows-bootsource-pipeline"
412415
# All hco relate objects with kind
@@ -446,7 +449,8 @@ class S390X:
446449
{KUBEVIRT_UI_CONFIG_READER: ROLE_STR},
447450
{KUBEVIRT_UI_CONFIG_READER_ROLE_BINDING: ROLEBINDING_STR},
448451
{HCO_BEARER_AUTH: SECRET_STR},
449-
{"kubevirt-console-plugin-np": "NetworkPolicy"},
452+
{KUBEVIRT_CONSOLE_PLUGIN_NP: NETWORKPOLICY_STR},
453+
{KUBEVIRT_APISERVER_PROXY_NP: NETWORKPOLICY_STR},
450454
]
451455
CNV_PODS_NO_HPP_CSI_HPP_POOL = [
452456
AAQ_OPERATOR,

0 commit comments

Comments
 (0)