diff --git a/pkg/autodiscover/autodiscover.go b/pkg/autodiscover/autodiscover.go index 32ae2a38a..e9f2b324b 100644 --- a/pkg/autodiscover/autodiscover.go +++ b/pkg/autodiscover/autodiscover.go @@ -102,16 +102,6 @@ type labelObject struct { var data = DiscoveredTestData{} -func warnDeprecation(config *configuration.TestConfiguration) { - if len(config.OperatorsUnderTestLabels) == 0 { - log.Warn("DEPRECATED: deprecated default operator label in use ( %s:%s ) is about to be obsolete. Please use the new \"operatorsUnderTestLabels\" field to specify operators labels instead.", - deprecatedHardcodedOperatorLabelName, deprecatedHardcodedOperatorLabelValue) - } - if len(config.PodsUnderTestLabels) == 0 { - log.Warn("No Pod under test labels configured. Tests on pods and containers will not run. Please use the \"podsUnderTestLabels\" field to specify labels for pods under test") - } -} - const labelRegex = `(\S*)\s*:\s*(\S*)` const labelRegexMatches = 3 @@ -148,11 +138,6 @@ func DoAutoDiscover(config *configuration.TestConfiguration) DiscoveredTestData podsUnderTestLabelsObjects := createLabels(config.PodsUnderTestLabels) operatorsUnderTestLabelsObjects := createLabels(config.OperatorsUnderTestLabels) - // prints warning about deprecated labels - warnDeprecation(config) - // adds DEPRECATED hardcoded operator label - operatorsUnderTestLabelsObjects = append(operatorsUnderTestLabelsObjects, labelObject{LabelKey: deprecatedHardcodedOperatorLabelName, LabelValue: deprecatedHardcodedOperatorLabelValue}) - log.Info("parsed pods under test labels: %+v", podsUnderTestLabelsObjects) log.Info("parsed operators under test labels: %+v", operatorsUnderTestLabelsObjects) diff --git a/pkg/autodiscover/autodiscover_operators.go b/pkg/autodiscover/autodiscover_operators.go index c1b005649..1c2837252 100644 --- a/pkg/autodiscover/autodiscover_operators.go +++ b/pkg/autodiscover/autodiscover_operators.go @@ -68,11 +68,7 @@ func findOperatorsByLabel(olmClient clientOlm.Interface, labels []labelObject, n for _, ns := range namespaces { log.Debug("Searching CSVs in namespace %s", ns) for _, aLabelObject := range labels { - label := aLabelObject.LabelKey - // DEPRECATED special processing for deprecated operator label. Value not needed to match. - if aLabelObject.LabelKey != deprecatedHardcodedOperatorLabelName { - label += "=" + aLabelObject.LabelValue - } + label := aLabelObject.LabelKey + "=" + aLabelObject.LabelValue log.Debug("Searching CSVs with label %s", label) csvList, err := olmClient.OperatorsV1alpha1().ClusterServiceVersions(ns.Name).List(context.TODO(), metav1.ListOptions{ LabelSelector: label, diff --git a/pkg/autodiscover/constants.go b/pkg/autodiscover/constants.go index 863b6eecc..085f55b4a 100644 --- a/pkg/autodiscover/constants.go +++ b/pkg/autodiscover/constants.go @@ -16,8 +16,6 @@ package autodiscover const ( - deprecatedHardcodedOperatorLabelName = "test-network-function.com/operator" - deprecatedHardcodedOperatorLabelValue = "" - debugHelperPodsLabelName = "test-network-function.com/app" - debugHelperPodsLabelValue = "tnf-debug" + debugHelperPodsLabelName = "test-network-function.com/app" + debugHelperPodsLabelValue = "tnf-debug" )