diff --git a/openshift/tests-extension/.gitignore b/openshift/tests-extension/.gitignore index e660fd93d..5d4b47b87 100644 --- a/openshift/tests-extension/.gitignore +++ b/openshift/tests-extension/.gitignore @@ -1 +1,2 @@ bin/ +!vendor/ diff --git a/openshift/tests-extension/.openshift-tests-extension/openshift_payload_olmv1.json b/openshift/tests-extension/.openshift-tests-extension/openshift_payload_olmv1.json index 99de7c456..2ef277e95 100644 --- a/openshift/tests-extension/.openshift-tests-extension/openshift_payload_olmv1.json +++ b/openshift/tests-extension/.openshift-tests-extension/openshift_payload_olmv1.json @@ -130,8 +130,11 @@ "environmentSelector": {} }, { - "name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed", - "labels": {}, + "name": "[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed", + "originalName": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed", + "labels": { + "original-name:[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed": {} + }, "resources": { "isolation": {} }, diff --git a/openshift/tests-extension/Makefile b/openshift/tests-extension/Makefile index d7185b351..429121f24 100644 --- a/openshift/tests-extension/Makefile +++ b/openshift/tests-extension/Makefile @@ -64,7 +64,6 @@ lint: $(GOLANGCI_LINT) #HELP Run golangci linter. fix-lint: $(GOLANGCI_LINT) #HELP Fix lint issues $(GOLANGCI_LINT) run --fix -# Bindata generation .PHONY: bindata bindata: $(GO_BINDATA) diff --git a/openshift/tests-extension/go.mod b/openshift/tests-extension/go.mod index f8246560c..cf715d1b6 100644 --- a/openshift/tests-extension/go.mod +++ b/openshift/tests-extension/go.mod @@ -4,12 +4,13 @@ go 1.24.4 require ( github.com/blang/semver/v4 v4.0.0 - github.com/ghodss/yaml v1.0.0 + github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 github.com/onsi/ginkgo/v2 v2.25.1 github.com/onsi/gomega v1.38.2 github.com/openshift-eng/openshift-tests-extension v0.0.0-20250722101414-8083129ab8f9 github.com/openshift/api v0.0.0-20250808142411-c974eeafe3f1 github.com/openshift/client-go v0.0.0-20250710075018-396b36f983ee + github.com/openshift/origin v1.5.0-alpha.3.0.20250927181537-6079513c8d63 github.com/operator-framework/operator-controller v1.5.1 github.com/pborman/uuid v1.2.1 github.com/spf13/cobra v1.10.1 @@ -22,7 +23,7 @@ require ( k8s.io/apiserver v0.33.4 k8s.io/client-go v0.33.4 k8s.io/kubernetes v1.33.4 - k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 + k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d sigs.k8s.io/controller-runtime v0.21.0 ) @@ -99,7 +100,7 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/x448/float16 v0.8.4 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect go.opentelemetry.io/otel v1.37.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0 // indirect @@ -121,27 +122,27 @@ require ( golang.org/x/time v0.12.0 // indirect golang.org/x/tools v0.36.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0 // indirect google.golang.org/grpc v1.75.0 // indirect google.golang.org/protobuf v1.36.8 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/cloud-provider v0.0.0 // indirect + k8s.io/cloud-provider v0.31.1 // indirect k8s.io/component-base v0.33.4 // indirect - k8s.io/component-helpers v0.33.2 // indirect + k8s.io/component-helpers v0.33.4 // indirect k8s.io/controller-manager v0.33.2 // indirect - k8s.io/cri-api v0.0.0 // indirect + k8s.io/cri-api v0.27.1 // indirect k8s.io/cri-client v0.0.0 // indirect k8s.io/csi-translation-lib v0.0.0 // indirect k8s.io/dynamic-resource-allocation v0.0.0 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20250610211856-8b98d1ed966a // indirect k8s.io/kube-scheduler v0.0.0 // indirect - k8s.io/kubectl v0.33.3 // indirect - k8s.io/kubelet v0.0.0 // indirect + k8s.io/kubectl v0.33.4 // indirect + k8s.io/kubelet v0.31.1 // indirect k8s.io/mount-utils v0.0.0 // indirect - k8s.io/pod-security-admission v0.0.0 // indirect + k8s.io/pod-security-admission v0.33.4 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.33.0 // indirect sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect sigs.k8s.io/randfill v1.0.0 // indirect diff --git a/openshift/tests-extension/go.sum b/openshift/tests-extension/go.sum index 82bc367e5..fdade0bcc 100644 --- a/openshift/tests-extension/go.sum +++ b/openshift/tests-extension/go.sum @@ -57,8 +57,8 @@ github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.8.0 h1:fFtUGXUzXPHTIUdne5+zzMPTfffl3RD5qYnkY40vtxU= github.com/fxamacker/cbor/v2 v2.8.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 h1:Mn26/9ZMNWSw9C9ERFA1PUxfmGpolnw2v0bKOREu5ew= +github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -201,6 +201,8 @@ github.com/openshift/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0 github.com/openshift/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20250906192346-6efb6a95323f/go.mod h1:+UmuDIUnxxGlHHQvFhdg4s1XMRX+MBU1n70IYo18IOk= github.com/openshift/onsi-ginkgo/v2 v2.6.1-0.20250416174521-4eb003743b54 h1:ehXndVZfIk/fo18YJCMJ+6b8HL8tzqjP7yWgchMnfCc= github.com/openshift/onsi-ginkgo/v2 v2.6.1-0.20250416174521-4eb003743b54/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= +github.com/openshift/origin v1.5.0-alpha.3.0.20250927181537-6079513c8d63 h1:kt7T98/AlpwFeMZlEqlwRJXWUW0kp9etoZ1uUmZfLnY= +github.com/openshift/origin v1.5.0-alpha.3.0.20250927181537-6079513c8d63/go.mod h1:thiTAaYNKIS7Lh6Lvzwi1JcE/TrX8oSc8u8PfP/Gaa8= github.com/operator-framework/operator-controller v1.5.1 h1:J3xdRHzh9ajuKt/i1fWxoOLUf3kMpaOnGf1XNZ6+Klg= github.com/operator-framework/operator-controller v1.5.1/go.mod h1:6BpO9yzrmr1s7zqnk7YUA9SJlNVD+gA25JS5sg6axCE= github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw= @@ -334,8 +336,8 @@ gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 h1:FiusG7LWj+4byqhbvmB+Q93B/mOxJLN2DTozDuZm4EU= google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:kXqgZtrWaf6qS3jZOCnCH7WYfrvFjkC51bM8fz3RsCA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 h1:pFyd6EwwL2TqFf8emdthzeX+gZE1ElRq3iM8pui4KBY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0 h1:MAKi5q709QWfnkkpNQ0M12hYJ1+e8qYVDyowc4U1XZM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4= google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= @@ -347,6 +349,7 @@ gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSP gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -356,8 +359,8 @@ k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20250610211856-8b98d1ed966a h1:ZV3Zr+/7s7aVbjNGICQt+ppKWsF1tehxggNfbM7XnG8= k8s.io/kube-openapi v0.0.0-20250610211856-8b98d1ed966a/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= -k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= -k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d h1:wAhiDyZ4Tdtt7e46e9M5ZSAJ/MnPGPs+Ki1gHw4w1R0= +k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.33.0 h1:qPrZsv1cwQiFeieFlRqT627fVZ+tyfou/+S5S0H5ua0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.33.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8= diff --git a/openshift/tests-extension/pkg/bindata/catalog/catalog.go b/openshift/tests-extension/pkg/bindata/catalog/catalog.go index 6c4f74b9f..277a264f1 100644 --- a/openshift/tests-extension/pkg/bindata/catalog/catalog.go +++ b/openshift/tests-extension/pkg/bindata/catalog/catalog.go @@ -119,7 +119,7 @@ func configsIndexignore() (*asset, error) { return a, nil } -var _configsIndexYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x91\x31\x4f\xc3\x30\x10\x85\xf7\xfc\x8a\x93\xe7\x24\x0d\x03\x4b\xb6\x02\x19\x90\x20\x45\xa4\x74\x41\x0c\x26\x1c\x8d\x85\xed\x58\xb6\x6b\xa8\xaa\xfc\x77\x64\x27\x55\x69\x71\x61\x49\x2c\x7d\x77\xef\xee\xde\xdb\x25\x00\xc4\xb4\x1d\x0a\x4a\x4a\x20\x3d\x17\xb9\xa2\xed\x07\x5d\x23\x49\x3d\x92\x54\xa0\x07\xcb\xaa\x59\x66\x57\x4f\xf5\xcd\x5d\x45\x92\x21\x89\xb4\xbd\x6e\xe4\x1b\x3f\xdf\x95\xbb\x22\x2f\xf2\x8b\x91\xef\x47\x9c\x08\x07\xc6\xc4\x44\xc2\x23\xd3\xb8\x66\xc6\xea\x6d\xde\x2b\x94\xa6\x63\xef\x36\x3b\x01\xc6\xb5\xe5\x65\x51\x14\xb3\x7a\x7e\x5f\x35\x0f\xf3\xeb\x6a\xf6\x43\xb4\xe4\xd4\xa2\xb1\xd3\x5c\xdd\x2b\xd4\x96\xa1\x21\x25\x3c\x27\x00\x00\xbb\xf0\x05\x20\x76\xab\x30\x66\x41\x80\x8e\xf2\x8d\xa7\xfb\xea\xc3\x0d\x75\xc4\xa0\xf4\x50\xe5\x50\x1b\xd6\x4b\x5f\x31\xde\x3f\xa1\x21\xfc\x87\xf4\xfc\x0e\x82\x7e\x2d\x14\xca\xc6\x9f\xbc\x9a\x54\x7e\xed\x43\x56\xd5\x63\x73\xbb\xa8\x47\x59\x2f\xfa\x12\x4f\xa7\xed\xa8\x94\xc8\x8f\xe3\x51\x1a\x1d\xc3\xcf\xff\x33\x41\x69\x75\xd4\xb4\x3f\x82\x3e\xda\xe8\x3b\x00\x00\xff\xff\x5d\x4e\xb3\xae\x67\x02\x00\x00") +var _configsIndexYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x92\x31\x4f\xc3\x30\x10\x85\xf7\xfc\x8a\x93\xe7\x26\x0d\x03\x4b\xb6\x02\x19\x90\x20\x45\xa4\x74\x41\x0c\x26\x1c\x8d\x45\xe2\x58\xb6\x6b\xa8\x2c\xff\x77\x64\x27\x55\x55\xea\xaa\x2c\x49\xa4\xef\xf9\xdd\xcb\x3b\xdb\x04\x80\xa8\xa6\xc5\x9e\x92\x02\xc8\xd0\xf5\x99\xa0\xcd\x17\xdd\x20\x99\x79\xc4\x69\x8f\x1e\x58\x0b\xab\xb2\x5e\xa5\x37\x2f\xd5\xdd\x43\x09\xce\x91\xc4\x25\x91\xc3\xef\x5b\xfe\xd1\x5d\x3a\x9b\x99\x3c\xcb\xb3\xab\x51\xb5\x1f\x17\x1d\x12\x14\xac\x9f\x78\xf8\x48\x25\x6e\x98\xd2\x72\x97\x0d\x02\xb9\x6a\xd9\xa7\x4e\xff\x00\x65\x9a\xe2\x3a\xcf\xf3\xb9\xb5\x50\x2d\x1e\xcb\xfa\x69\x71\xeb\xed\xe6\x27\x03\x8a\x8e\x6a\x54\x7a\x4a\x22\x07\x81\x52\x33\x54\xa4\x80\xd7\x04\x00\xc0\x86\x27\x00\xd1\x3b\x81\xb1\x82\x02\x34\xb4\xdb\x7a\xba\x57\x1f\xfe\xaa\x3a\x5b\xdf\xec\xa0\x35\x28\x15\x1b\xb8\xd7\x8d\xbd\x4c\xc8\x85\xb7\x9b\x9d\x4f\xd2\xd3\x9f\xa5\x40\x5e\xfb\x12\xd6\x93\xcb\x49\x2a\xb2\x2e\x9f\xeb\xfb\x65\x35\xda\x7a\xd3\xb7\xf8\xee\x9a\x96\x72\x8e\xdd\xf1\xf2\x84\x44\xc3\xf0\xfb\xbf\xbb\x42\xae\x65\xb4\xc0\x8b\x97\xe1\x28\xdd\x6f\x00\x00\x00\xff\xff\xe5\x9f\x1d\x23\x97\x02\x00\x00") func configsIndexYamlBytes() ([]byte, error) { return bindataRead( @@ -134,7 +134,7 @@ func configsIndexYaml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "configs/index.yaml", size: 615, mode: os.FileMode(420), modTime: time.Unix(1756998653, 0)} + info := bindataFileInfo{name: "configs/index.yaml", size: 663, mode: os.FileMode(420), modTime: time.Unix(1759218366, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/openshift/tests-extension/pkg/bindata/operator/operator.go b/openshift/tests-extension/pkg/bindata/operator/operator.go index ea2681a98..30c6f5ffd 100644 --- a/openshift/tests-extension/pkg/bindata/operator/operator.go +++ b/openshift/tests-extension/pkg/bindata/operator/operator.go @@ -101,7 +101,7 @@ func dockerfile() (*asset, error) { return a, nil } -var _manifestsRegistryClusterserviceversionYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x57\x4b\x6f\xe3\xb6\x13\xbf\xfb\x53\x0c\x74\xfe\xd3\xb1\xb2\xd9\xfd\x07\x3c\x35\xfb\xc0\xa2\x40\x92\x0d\x36\x69\x0f\x2d\x8a\x62\x4c\x4e\x6c\xd6\x14\xc9\x92\x94\x13\xed\x76\xbf\x7b\x41\x3d\x6c\xc9\x52\x12\x2f\xda\x4b\x79\x91\x34\xf3\x9b\x27\x87\x9c\x11\x3a\xf5\x33\xf9\xa0\xac\xe1\x60\x1d\x79\x8c\xd6\x87\xb9\xb0\x9e\x6c\x7a\x14\x27\xdb\x1c\xb5\x5b\x63\x3e\xdb\x28\x23\x39\xbc\xd3\x65\x88\xe4\x6f\xc9\x6f\x95\xa0\x56\x74\x56\x50\x44\x89\x11\xf9\x0c\x00\x8d\xb1\x11\xa3\xb2\x26\xa4\x4f\x00\xd4\x05\xa3\x47\x2c\x9c\xa6\xc0\xe1\x2f\x56\x13\x01\x7e\x6d\x9f\x00\x5f\x77\x6f\x00\xd9\xde\xa1\x8c\x43\x66\x05\xb3\x4e\xd2\x96\xd1\x29\xcd\x3b\xff\xee\x3d\x16\xf4\x60\xfd\x66\xae\xec\xfc\x45\xc4\x2e\x82\xec\x7f\x7d\x3b\x29\x9c\x64\xe1\x33\xad\x54\x88\xbe\x1a\x72\xbb\x80\x32\x3e\xf0\x0e\x20\xd3\xb8\x24\x1d\x46\xf4\xda\x73\x37\xdf\x94\x4b\xf2\x86\x22\x85\x64\xb9\x40\x83\x2b\x92\x6c\x59\x25\x4b\x9b\x32\x44\x5b\xa8\x2f\x34\x30\xf5\x84\xa8\xc1\x82\x92\xd0\xdd\x87\xdb\x3b\xf6\xf6\xa7\xeb\xf7\x97\x1f\xb2\x81\xd4\xb7\xa1\x92\x6c\x42\x80\x85\x3a\xe9\x7d\xb9\x81\x54\x16\x1c\x89\x8c\x83\x29\xb5\xde\x91\xbf\xb5\x6f\xbf\xd5\x4f\x81\x0e\x97\x4a\xab\xa8\xd2\xde\xbd\xc5\xa0\x04\xfc\x68\x42\xc4\x56\x42\x78\xc2\x48\xf2\x22\x72\xc8\x4e\x17\xa7\xaf\xd9\xe2\x9c\x2d\xde\xdc\xe5\xff\xe7\x67\xaf\xf8\x59\xfe\x4b\x63\x7b\x5f\x58\x93\x1b\xb4\x2c\x95\x96\xe4\xf7\x05\xc8\x82\xdc\xb0\x6d\x3e\x7f\x75\x36\xcf\x8f\x51\xe0\xbc\xfd\x83\x44\xfc\x5d\x63\x65\xcb\xc8\x61\x65\xeb\x6c\xb6\x7a\xeb\x1a\x38\x9b\x01\xa4\x14\x71\xe8\x25\x68\xbe\x5d\xcc\x17\xb5\x89\xc4\x0a\x0e\x05\x71\x70\x1a\x05\xad\x6d\x92\x9c\xa5\x04\xd5\x35\xed\x54\x68\x2a\x5e\xd2\xbd\x32\xaa\xa9\x6e\xf8\x9a\x92\x25\xea\x6d\xf5\x14\x6c\xe9\xfb\xfc\x96\x2d\x29\x08\xaf\x5c\x43\xe9\xd9\xee\x33\xe6\x70\xf7\xe9\xfd\xa7\x79\x42\xab\xe0\x34\x56\xd7\x87\x9e\xce\x00\x94\xb0\x26\xf9\xc2\x60\x89\x81\xde\x9c\xd5\xe7\x0d\xb2\x26\xc3\x05\x49\x85\xb1\x72\xd4\x52\x54\xb3\x47\xcd\x01\xec\xa2\x48\x4b\x92\xd3\xb6\x2a\xc8\xc4\xd0\x91\x18\xd4\x35\xcd\x7b\x95\xf1\x5c\x29\x73\xd8\x15\xf2\xb3\x12\xa3\x6c\xf7\xd0\xc2\x9a\xe8\xad\x66\x4e\xa3\x21\xde\x7d\x6a\xf2\xac\xb1\xe3\x77\xd8\x91\x16\xf6\x0c\xb8\x1f\x68\x5a\x9e\x9c\x56\x02\x03\x87\xbc\x47\x0d\xa4\x49\x44\xeb\xf9\xe0\x00\x15\x18\xc5\xfa\xb2\x3e\xdc\xfc\xe0\x78\x1e\xef\x2d\x40\x88\x1e\x23\xad\xaa\x76\xf7\xbb\x15\xa9\x70\x1a\x23\x1d\xd8\xec\x5d\x9b\xfd\x35\xba\x42\xfb\x2b\x65\x59\x44\x7d\x90\x6d\x49\xf7\x58\xea\x58\x67\x07\x95\x49\xa7\x69\xec\x5c\x5a\x7a\x32\xc4\xef\x0b\x72\x9c\xe9\x4e\x43\x6d\x7a\xa4\x9d\x01\xfa\xd5\xa4\xcd\xa2\x40\x23\xc7\x0c\x06\x41\x13\xb9\x09\x7a\x96\x2f\x16\x8b\x6c\xc4\x50\x05\xae\x88\xc3\xb2\x0c\xd5\xd2\x3e\x8e\xd8\x5a\x6d\xc9\x50\x08\x37\xde\x2e\x69\x6c\x0e\x60\x1d\xa3\xfb\x48\x71\x8a\x05\xe0\x30\xae\x39\x9c\xac\x09\x75\x5c\x7f\x99\x86\x58\x1f\x39\x9c\x2f\xce\xf3\x09\x76\x7d\x21\xa0\x7e\x4f\x1a\xab\x5b\x12\xd6\xc8\x54\x91\xaf\x27\x90\x8e\xbc\xb2\x72\x87\x39\x5d\x8c\x30\xcd\x79\x98\xde\xda\x54\xf0\x28\xd5\x3f\x0e\x34\x69\xa9\xfe\xad\x38\x8f\x08\x33\x1f\x87\xd9\x5d\xa7\x13\x45\x93\x76\xb3\x50\x71\x92\x03\x20\x5c\xc9\xe1\xf5\x62\x51\x4c\x72\x0b\x2a\xac\xaf\x38\xe4\xa7\xe7\x57\x6a\x02\xe1\xe9\xcf\x92\xc2\xb3\xba\xf3\x17\x54\xbf\x39\x9b\xd0\x1c\x48\x94\x5e\xc5\xea\x9d\x35\x91\x1e\x27\xb3\x8f\x5a\xdb\x87\x1b\xaf\xb6\x4a\xd3\x8a\x3e\x04\x81\x1a\x9b\xa6\x71\x8f\x3a\xd0\x84\xc4\xa0\x37\x4f\xfa\x24\xbd\x75\xd3\x1c\x06\x17\x97\x97\xb3\xef\x74\xd2\x97\xe6\x22\x5c\x5b\xf3\xd9\xda\xc8\x21\xfa\xf2\xd0\xab\xb6\x47\x5e\x08\x61\x4b\x13\x9b\x26\xd6\x5e\x4c\x07\xc8\x48\xbe\x50\xa6\x0e\xf0\xa3\x47\x41\x37\x4f\x54\x84\x4b\xb8\x10\xfa\x37\x21\x03\x5f\xea\x7e\xc4\x2c\xb5\xe7\x8f\xde\x96\x6e\x90\x06\xd6\xf5\xc6\xd6\xf9\xa9\x8a\x62\xe9\xd2\xba\x57\xab\x02\x5d\xe8\x91\xb7\xe4\x97\x07\xb8\x15\xc5\xc1\xb7\x56\x61\x48\x78\x48\xfd\x63\xa8\xba\x9e\x8d\x06\xa4\xd2\xc9\x43\x92\x1b\xc9\x49\xd2\xd4\x03\x3d\x19\x9e\xb0\xd6\xcb\x36\x89\xf3\xcd\x79\x6a\x03\x2f\xc7\xab\x09\x03\xfd\xf7\x62\x3d\x66\x2b\x69\x9b\xa6\x9a\xe7\x43\x9b\xf0\x73\xe8\xd4\x54\x09\x1f\x31\x7d\xec\xdb\xfe\x7e\xc0\xda\x8f\x61\x57\x56\x36\xce\x32\x08\xa5\x4b\x77\x28\xc9\xfe\xb9\x6e\x06\xb7\x4f\x0f\xe6\xba\x1b\x43\x5f\xc2\xde\x2a\xb3\xd2\x74\x34\xfc\xaa\xd4\x51\x3d\x89\xde\x9d\xe4\x06\x7c\xa1\xf5\x0e\x9a\xd2\xb9\xa1\xea\xc1\x7a\xd9\x06\x30\x1c\xe8\xb4\x32\x9b\x96\x31\x3d\xef\x95\x5e\xf3\xba\xe9\x04\x7e\x72\xd2\x1f\xbd\xa5\x2d\x50\x99\x59\x1a\xbc\x54\x7f\x6e\x60\x40\x05\x2a\xcd\xa1\xb2\xa5\xff\xa1\x7e\x4f\xff\xa1\xb5\xb2\xc6\xc4\xd5\x4e\x00\x92\x9f\xb5\x8a\x58\xdf\x5c\x1c\xea\x3f\xbd\x19\x80\xf3\x76\xab\xd2\x3f\x45\x4f\xee\xa6\xa5\x75\x52\x07\xce\x25\x7b\x7b\xaf\xb6\xdd\x4f\x71\xf3\x87\xf0\x77\x00\x00\x00\xff\xff\xb7\xc0\xfc\x99\x27\x0f\x00\x00") +var _manifestsRegistryClusterserviceversionYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x57\x4d\x6f\xe3\x36\x13\xbe\xfb\x57\x0c\x74\x7e\xe9\xd8\xd9\xec\xbe\x01\x4f\xcd\xee\x06\x8b\x02\xf9\x42\x92\xf6\xd0\xa2\x28\xc6\xd4\xc4\x66\x4d\x91\x2c\x49\x39\xab\x4d\xf3\xdf\x0b\x52\x92\x2d\x59\x72\x92\x45\x7b\x29\x2f\x92\xe6\xf3\x99\xe1\x70\x38\x42\x2b\x7f\x26\xe7\xa5\xd1\x1c\x8c\x25\x87\xc1\x38\x3f\x15\xc6\x91\x89\x8f\xe2\x68\x33\x47\x65\x57\x38\x9f\xac\xa5\xce\x39\x7c\x52\xa5\x0f\xe4\xee\xc8\x6d\xa4\xa0\x46\x75\x52\x50\xc0\x1c\x03\xf2\x09\x00\x6a\x6d\x02\x06\x69\xb4\x8f\x9f\x00\xa8\x0a\x46\x5f\xb1\xb0\x8a\x3c\x87\xbf\x58\x22\x02\xfc\xda\x3c\x01\x9e\xb6\x6f\x00\xd9\x0e\x50\xc6\x21\x33\x82\x19\x9b\xd3\x86\xd1\x31\x4d\x5b\x7c\x0f\x0e\x0b\x7a\x34\x6e\x3d\x95\x66\xfa\xaa\xc4\x36\x82\xec\x7f\x5d\x3f\x31\x9c\xe8\xe1\x96\x96\xd2\x07\x57\xf5\xb9\x6d\x40\x19\xef\xa1\x03\xc8\x14\x2e\x48\xf9\x01\x3d\x21\xb7\xd3\x75\xb9\x20\xa7\x29\x90\x8f\x9e\x0b\xd4\xb8\xa4\x9c\x2d\xaa\xe8\x69\x5d\xfa\x60\x0a\xf9\x8d\x7a\xae\x0e\xa8\x6a\x2c\x28\x2a\x3d\x3d\xc1\xfd\xf9\xdd\x3d\xfb\xf8\xd3\xd5\xe7\x8b\x73\x78\x7e\xce\x7a\xba\xcf\x7d\x53\xd9\x41\x35\xe6\xd3\x06\x74\xb5\x7b\xba\x99\xb7\x24\x32\x0e\xba\x54\x6a\x4b\x7e\x6e\xde\x7e\x4b\x4f\x81\x16\x17\x52\xc9\x20\xe3\x3e\x7e\x44\x2f\x05\xfc\xa8\x7d\xc0\x46\x43\x38\xc2\x40\xf9\x59\xe0\x90\x1d\xcf\x8e\xdf\xb3\xd9\x29\x9b\x7d\xb8\x9f\xff\x9f\x9f\xbc\xe3\x27\xf3\x5f\x6a\xdf\xbb\x22\x1b\xdd\xac\x45\x29\x55\x4e\x6e\x57\x8c\xcc\xe7\x6b\xb6\x99\x4f\xdf\x9d\x4c\xe7\x6f\x31\x60\x9d\xf9\x83\x44\xf8\x5d\x61\x65\xca\xc0\x61\x69\x52\x66\x1b\xbb\xa9\x1e\x4e\x26\x00\x31\x51\x1c\x06\x69\x9a\x6e\x66\xd3\x59\x72\x14\x05\xbc\x45\x41\x1c\xac\x42\x41\x2b\x13\xf5\x27\x31\x4d\xa9\xca\xad\xf4\xf5\x19\xc8\xe9\x41\x6a\x59\xd7\x3b\x3c\xc5\x94\x89\xb4\xd1\x8e\xbc\x29\x5d\x97\xdf\xb0\x73\xf2\xc2\x49\xdb\x50\xf6\x11\x74\xd9\x53\xb8\xbf\xfe\x7c\x3d\x8d\x3a\xd2\x5b\x85\xd5\xd5\x38\xea\x09\x80\x14\x46\x47\x5c\x0c\x16\xe8\xe9\xc3\x49\x3a\x8d\x90\xd5\x39\x2f\x28\x97\x18\x2a\x4b\x0d\x45\xd6\xbb\x56\x1f\xcf\x36\xa2\xb8\x72\xb2\xca\x54\x05\xe9\xe0\x5b\x12\x83\x54\xf1\xbc\x53\x2b\x2f\x15\x3a\x87\x6d\x99\xbf\xa8\x71\x20\xff\x1d\x1d\x61\x74\x70\x46\x31\xab\x50\x13\x6f\x3f\x15\x39\x56\x7b\x73\x5b\xd9\x03\xb6\xd8\x0b\x2a\xdd\xa0\xe3\x72\x64\x95\x14\xe8\x39\xcc\x3b\x54\x4f\x8a\x44\x30\x8e\xf7\x0e\x59\x81\x41\xac\x2e\x52\x1b\xe0\x7b\x07\xf9\xed\x98\x01\x7c\x70\x18\x68\x59\x35\x55\xd1\xae\x40\x85\x55\x18\x68\xcf\x67\xa7\xc1\x76\xd7\xa0\xd9\x76\x57\xcc\xb8\x08\x6a\x2f\xf3\x39\x3d\x60\xa9\x42\xca\x0e\x4a\x1d\xcf\xda\x10\x5c\x5c\x6a\x34\xc4\xef\x0b\x72\x98\xe9\xd6\x42\x72\x3d\xb0\xce\x00\xdd\x72\xd4\x67\x51\xa0\xce\x87\x0c\x06\x5e\x11\xd9\x11\x7a\x36\x9f\xcd\x66\xd9\x80\x21\x0b\x5c\x52\xa7\x43\x7e\xba\xbe\xba\xbf\xbd\xbe\xb8\x38\xbf\x1d\x34\xd7\x94\x04\xb9\x21\x4d\xde\xdf\x38\xb3\xa0\xa1\x7b\x80\x55\x08\xf6\x0b\x85\x31\x16\x80\xc5\xb0\xe2\x70\xb4\x22\x54\x61\xf5\x6d\x5c\xc4\xb8\xc0\xe1\x74\x76\x3a\x1f\x61\xa7\xc6\x81\xea\x33\x29\xac\xee\x48\x18\x9d\xc7\x0a\x7d\x3f\x22\x69\xc9\x49\x93\x6f\x65\x8e\x67\x03\x99\xfa\x94\x8c\x6f\x75\x3c\x00\x98\xcb\x7f\x1c\x68\xb4\x52\xfd\x5b\x71\xbe\x21\xcc\xf9\x30\xcc\xb6\xed\x8e\x14\x51\xdc\xcd\x42\x86\x51\x0e\x80\xb0\x25\x87\xf7\xb3\x59\x31\xca\x2d\xa8\x30\xae\xe2\x30\x3f\x3e\xbd\x94\x23\x12\x8e\xfe\x2c\xc9\xbf\x68\x7b\xfe\x8a\xe9\x0f\x27\x23\x96\x3d\x89\xd2\xc9\x50\x7d\x32\x3a\xd0\xd7\xd1\xec\xa3\x52\xe6\xf1\xc6\xc9\x8d\x54\xb4\xa4\x73\x2f\x50\x61\x7d\xb9\x3c\xa0\xf2\x34\xa2\xd1\xbb\xc9\x47\x31\xe5\xce\xd8\x71\x0e\x83\xb3\x8b\x8b\xc9\x77\x82\x74\xa5\x3e\xf3\x57\x46\xdf\x1a\x13\x38\x04\x57\xee\xa3\x6a\xee\xd2\x33\x21\x4c\xa9\x43\x7d\xcd\x35\x8d\x6a\x4f\x32\x90\x2b\xa4\x4e\x01\x7e\x71\x28\xe8\xe6\x40\x45\xd8\x28\xe7\x7d\xb7\x33\x32\x70\xa5\xea\x46\xcc\xe2\x35\xfe\xc5\x99\xd2\xf6\xd2\xc0\xda\x7b\xb3\x01\x3f\x56\x51\x2c\x36\xb1\x07\xb9\x2c\xd0\xfa\x0e\x79\x43\x6e\xb1\x27\xb7\xa4\xd0\xfb\x56\xd2\xf7\x09\x8f\xf1\x3e\xe9\x9b\x4e\x93\x54\x8f\x54\xda\x7c\x9f\x64\x07\x7a\x39\x29\xea\x08\x1d\x0c\x4f\x18\xe3\xf2\x26\x89\xd3\xf5\x69\xbc\x16\x5e\x8f\x57\x11\x7a\xfa\xef\xc5\xfa\x96\xad\xa4\x4d\x9c\x78\x5e\x0e\x6d\x04\x67\x1f\xd4\x58\x09\xbf\x79\x26\xd9\x0d\x03\xbb\x11\x6c\x37\xa8\x5d\x9a\xbc\x86\xcc\xc0\x97\x36\x76\x52\xca\x3b\xc7\xa8\x9e\xec\xae\x1f\xf5\x55\x3b\xb3\xbe\x22\x7a\x27\xf5\x52\xd1\x41\xe9\x5d\xdb\xa8\xc5\x2f\x4b\x15\xe4\x5b\x6d\x9f\x29\xb5\x15\x8d\x29\x5d\x53\xf5\x68\x5c\xde\xc0\x1f\x1b\xf8\x94\xd4\xeb\x86\xfd\xd2\x54\x58\x3a\xc5\xd3\x25\xe4\xf9\xd1\xd1\x70\x70\xcf\x4d\x81\x52\x4f\xe2\x78\x26\xbb\xd3\x05\x03\x2a\x50\x2a\x0e\x95\x29\xdd\x0f\xe9\x3d\xfe\xd7\x26\x93\xb5\xbb\xcb\xad\x02\x44\xe4\xc9\x44\x48\xfd\x8c\x43\xfa\x73\x9c\x00\x58\x67\x36\x32\xfe\x97\x74\xf4\x6e\x1a\x5a\xab\xb5\x07\x31\xfa\xdb\xa1\xda\xb4\x3f\xd9\xf5\xff\xc5\xdf\x01\x00\x00\xff\xff\x82\x2e\xe1\x7d\x77\x0f\x00\x00") func manifestsRegistryClusterserviceversionYamlBytes() ([]byte, error) { return bindataRead( @@ -116,7 +116,7 @@ func manifestsRegistryClusterserviceversionYaml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "manifests/registry.clusterserviceversion.yaml", size: 3879, mode: os.FileMode(420), modTime: time.Unix(1756998653, 0)} + info := bindataFileInfo{name: "manifests/registry.clusterserviceversion.yaml", size: 3959, mode: os.FileMode(420), modTime: time.Unix(1759218321, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -141,7 +141,7 @@ func metadataAnnotationsYaml() (*asset, error) { return a, nil } -var _metadataPropertiesYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x2a\x28\xca\x2f\x48\x2d\x2a\xc9\x4c\x2d\xb6\xe2\x52\x50\xd0\x55\x28\xa9\x2c\x48\xb5\x52\xc8\xcf\xc9\xd5\xcb\x4d\xac\xf0\x2f\x48\xcd\x0b\xce\xc8\x4c\x2b\x09\x4b\x2d\x2a\xce\xcc\xcf\xe3\x52\x50\x50\x50\x28\x4b\xcc\x29\x4d\xb5\x52\x50\x0a\x73\x0d\x0a\xf6\xf4\xf7\x53\xe2\x02\x04\x00\x00\xff\xff\xf3\xb7\x04\x1f\x43\x00\x00\x00") +var _metadataPropertiesYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x2a\x28\xca\x2f\x48\x2d\x2a\xc9\x4c\x2d\xb6\xe2\x52\x50\xd0\x55\x28\xa9\x2c\x48\xb5\x52\xc8\xcf\xc9\xd5\xcb\x4d\xac\xf0\x2f\x48\xcd\x0b\xce\xc8\x4c\x2b\x09\x4b\x2d\x2a\xce\xcc\xcf\xe3\x52\x50\x50\x50\x28\x4b\xcc\x29\x4d\xb5\x52\x50\xaa\xae\x56\x08\x73\x0d\x0a\xf6\xf4\xf7\x53\xa8\xad\x55\xe2\x02\x04\x00\x00\xff\xff\x9d\x3d\x49\x26\x49\x00\x00\x00") func metadataPropertiesYamlBytes() ([]byte, error) { return bindataRead( @@ -156,7 +156,7 @@ func metadataPropertiesYaml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "metadata/properties.yaml", size: 67, mode: os.FileMode(420), modTime: time.Unix(1756998653, 0)} + info := bindataFileInfo{name: "metadata/properties.yaml", size: 73, mode: os.FileMode(420), modTime: time.Unix(1759218275, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/openshift/tests-extension/pkg/helpers/cluster_extension.go b/openshift/tests-extension/pkg/helpers/cluster_extension.go index b1079b549..63603d5e4 100644 --- a/openshift/tests-extension/pkg/helpers/cluster_extension.go +++ b/openshift/tests-extension/pkg/helpers/cluster_extension.go @@ -24,9 +24,32 @@ import ( "github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/pkg/env" ) +// ClusterExtensionOption mutates ext +type ClusterExtensionOption func(ext *olmv1.ClusterExtension) + +// WithCatalogSelector sets .spec.Source.Catalog.Selector to selector if ext.Spec.Source.Catalog is defined +func WithCatalogSelector(selector metav1.LabelSelector) ClusterExtensionOption { + return func(ext *olmv1.ClusterExtension) { + if ext == nil || ext.Spec.Source.Catalog == nil { + return + } + ext.Spec.Source.Catalog.Selector = &selector + } +} + +// WithCatalogNameSelector adds a selector to the ClusterExtension's catalog filter to restrict package resolution a ClusterCatalog +// called catalogName +func WithCatalogNameSelector(catalogName string) ClusterExtensionOption { + return WithCatalogSelector(metav1.LabelSelector{ + MatchLabels: map[string]string{ + "olm.operatorframework.io/metadata.name": catalogName, + }, + }) +} + // CreateClusterExtension creates a ServiceAccount, ClusterRoleBinding, and ClusterExtension using typed APIs. // It returns the unique suffix and a cleanup function. -func CreateClusterExtension(packageName, version, namespace, unique string) (string, func()) { +func CreateClusterExtension(packageName, version, namespace, unique string, opts ...ClusterExtensionOption) (string, func()) { ctx := context.TODO() k8sClient := env.Get().K8sClient if unique == "" { @@ -51,7 +74,7 @@ func CreateClusterExtension(packageName, version, namespace, unique string) (str ExpectClusterRoleBindingExists(ctx, crbName) // 3. Create ClusterExtension - ce := NewClusterExtensionObject(packageName, version, ceName, saName, namespace) + ce := NewClusterExtensionObject(packageName, version, ceName, saName, namespace, opts...) Expect(k8sClient.Create(ctx, ce)).To(Succeed(), "failed to create ClusterExtension") // Cleanup closure @@ -91,8 +114,8 @@ func NewClusterRoleBinding(name, roleName, saName, namespace string) *rbacv1.Clu } // NewClusterExtensionObject creates a new ClusterExtension object with the specified package, version, name, and ServiceAccount. -func NewClusterExtensionObject(pkg, version, ceName, saName, namespace string) *olmv1.ClusterExtension { - return &olmv1.ClusterExtension{ +func NewClusterExtensionObject(pkg, version, ceName, saName, namespace string, opts ...ClusterExtensionOption) *olmv1.ClusterExtension { + ext := &olmv1.ClusterExtension{ ObjectMeta: metav1.ObjectMeta{Name: ceName}, Spec: olmv1.ClusterExtensionSpec{ Namespace: namespace, @@ -102,14 +125,20 @@ func NewClusterExtensionObject(pkg, version, ceName, saName, namespace string) * Source: olmv1.SourceConfig{ SourceType: olmv1.SourceTypeCatalog, Catalog: &olmv1.CatalogFilter{ - PackageName: pkg, - Version: version, - Selector: &metav1.LabelSelector{}, + PackageName: pkg, + Version: version, + Selector: &metav1.LabelSelector{ + MatchLabels: map[string]string{}, + }, UpgradeConstraintPolicy: olmv1.UpgradeConstraintPolicyCatalogProvided, }, }, }, } + for _, applyOpt := range opts { + applyOpt(ext) + } + return ext } // ExpectClusterExtensionToBeInstalled checks that the ClusterExtension has both Progressing=True and Installed=True. diff --git a/openshift/tests-extension/test/olmv1-incompatible.go b/openshift/tests-extension/test/olmv1-incompatible.go index ad5111afc..f5572003d 100644 --- a/openshift/tests-extension/test/olmv1-incompatible.go +++ b/openshift/tests-extension/test/olmv1-incompatible.go @@ -20,6 +20,7 @@ import ( configv1 "github.com/openshift/api/config/v1" imagev1 "github.com/openshift/api/image/v1" operatorv1 "github.com/openshift/api/operator/v1" + "github.com/openshift/origin/test/extended/util/image" corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/api/meta" @@ -36,7 +37,7 @@ import ( "github.com/openshift/operator-framework-operator-controller/openshift/tests-extension/pkg/helpers" ) -var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation", func() { +var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLM] OLMv1 operator installation", func() { var unique, nsName, ccName, rbName, opName string BeforeEach(func() { helpers.RequireOLMv1CapabilityOnOpenshift() @@ -54,105 +55,110 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 helpers.DescribeAllClusterExtensions(context.Background(), nsName) } }) - It("should block cluster upgrades if an incompatible operator is installed", func(ctx SpecContext) { - if !env.Get().IsOpenShift { - Skip("Requires OCP APIs: not OpenShift") - } + It("should block cluster upgrades if an incompatible operator is installed", + Label("original-name:[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 operator installation should block cluster upgrades if an incompatible operator is installed"), func(ctx SpecContext) { + if !env.Get().IsOpenShift { + Skip("Requires OCP APIs: not OpenShift") + } - By(fmt.Sprintf("setting a unique value: %q", unique)) + By(fmt.Sprintf("setting a unique value: %q", unique)) - testVersion := env.Get().OpenShiftVersion - replacements := map[string]string{ - "TEST-BUNDLE": opName, - "NAMESPACE": nsName, - "VERSION": testVersion, - } - By(fmt.Sprintf("testing against OCP %s", testVersion)) - - By("creating a new Namespace") - nsCleanup := createNamespace(nsName) - DeferCleanup(nsCleanup) - - By("applying image-puller RoleBinding") - rbCleanup := createImagePullerRoleBinding(rbName, nsName) - DeferCleanup(rbCleanup) - - By("creating the operator BuildConfig") - bcCleanup := createBuildConfig(opName, nsName) - DeferCleanup(bcCleanup) - - By("creating the operator ImageStream") - isCleanup := createImageStream(opName, nsName) - DeferCleanup(isCleanup) - - By("creating the operator tarball") - fileOperator, fileCleanup := createTempTarBall(replacements, operatordata.AssetNames, operatordata.Asset) - DeferCleanup(fileCleanup) - By(fmt.Sprintf("created operator tarball %q", fileOperator)) - - By("starting the operator build via RAW URL") - opArgs := []string{ - "create", - "--raw", - fmt.Sprintf( - "/apis/build.openshift.io/v1/namespaces/%s/buildconfigs/%s/instantiatebinary?name=%s&namespace=%s", - nsName, opName, opName, nsName, - ), - "-f", - fileOperator, - } - buildOperator := startBuild(opArgs...) - - By(fmt.Sprintf("waiting for the build %q to finish", buildOperator.Name)) - waitForBuildToFinish(ctx, buildOperator.Name, nsName) - - By("creating the catalog BuildConfig") - bcCleanup = createBuildConfig(ccName, nsName) - DeferCleanup(bcCleanup) - - By("creating the catalog ImageStream") - isCleanup = createImageStream(ccName, nsName) - DeferCleanup(isCleanup) - - By("creating the catalog tarball") - fileCatalog, fileCleanup := createTempTarBall(replacements, catalogdata.AssetNames, catalogdata.Asset) - DeferCleanup(fileCleanup) - By(fmt.Sprintf("created catalog tarball %q", fileCatalog)) - - By("starting the catalog build via RAW URL") - catalogArgs := []string{ - "create", - "--raw", - fmt.Sprintf( - "/apis/build.openshift.io/v1/namespaces/%s/buildconfigs/%s/instantiatebinary?name=%s&namespace=%s", - nsName, ccName, ccName, nsName, - ), - "-f", - fileCatalog, - } - buildCatalog := startBuild(catalogArgs...) + testVersion := env.Get().OpenShiftVersion + replacements := map[string]string{ + "{{ TEST-BUNDLE }}": opName, + "{{ NAMESPACE }}": nsName, + "{{ VERSION }}": testVersion, - By(fmt.Sprintf("waiting for the build %q to finish", buildCatalog.Name)) - waitForBuildToFinish(ctx, buildCatalog.Name, nsName) + // Using the shell image provided by origin as the controller image. + // The image is mirrored into disconnected environments for testing. + "{{ TEST-CONTROLLER }}": image.ShellImage(), + } + By(fmt.Sprintf("testing against OCP %s", testVersion)) + + By("creating a new Namespace") + nsCleanup := createNamespace(nsName) + DeferCleanup(nsCleanup) + + By("applying image-puller RoleBinding") + rbCleanup := createImagePullerRoleBinding(rbName, nsName) + DeferCleanup(rbCleanup) + + By("creating the operator BuildConfig") + bcCleanup := createBuildConfig(opName, nsName) + DeferCleanup(bcCleanup) + + By("creating the operator ImageStream") + isCleanup := createImageStream(opName, nsName) + DeferCleanup(isCleanup) + + By("creating the operator tarball") + fileOperator, fileCleanup := createTempTarBall(replacements, operatordata.AssetNames, operatordata.Asset) + DeferCleanup(fileCleanup) + By(fmt.Sprintf("created operator tarball %q", fileOperator)) + + By("starting the operator build via RAW URL") + opArgs := []string{ + "create", + "--raw", + fmt.Sprintf( + "/apis/build.openshift.io/v1/namespaces/%s/buildconfigs/%s/instantiatebinary?name=%s&namespace=%s", + nsName, opName, opName, nsName, + ), + "-f", + fileOperator, + } + buildOperator := startBuild(opArgs...) + + By(fmt.Sprintf("waiting for the build %q to finish", buildOperator.Name)) + waitForBuildToFinish(ctx, buildOperator.Name, nsName) + + By("creating the catalog BuildConfig") + bcCleanup = createBuildConfig(ccName, nsName) + DeferCleanup(bcCleanup) + + By("creating the catalog ImageStream") + isCleanup = createImageStream(ccName, nsName) + DeferCleanup(isCleanup) + + By("creating the catalog tarball") + fileCatalog, fileCleanup := createTempTarBall(replacements, catalogdata.AssetNames, catalogdata.Asset) + DeferCleanup(fileCleanup) + By(fmt.Sprintf("created catalog tarball %q", fileCatalog)) + + By("starting the catalog build via RAW URL") + catalogArgs := []string{ + "create", + "--raw", + fmt.Sprintf( + "/apis/build.openshift.io/v1/namespaces/%s/buildconfigs/%s/instantiatebinary?name=%s&namespace=%s", + nsName, ccName, ccName, nsName, + ), + "-f", + fileCatalog, + } + buildCatalog := startBuild(catalogArgs...) - By("creating the ClusterCatalog") - ccCleanup := createClusterCatalog(ccName, nsName) - DeferCleanup(ccCleanup) + By(fmt.Sprintf("waiting for the build %q to finish", buildCatalog.Name)) + waitForBuildToFinish(ctx, buildCatalog.Name, nsName) - By("waiting for InstalledOLMOperatorUpgradable to be true") - waitForOlmUpgradeStatus(ctx, operatorv1.ConditionTrue, "") + By("creating the ClusterCatalog") + ccCleanup := createClusterCatalog(ccName, nsName) + DeferCleanup(ccCleanup) - By("creating the ClusterExtension") - ceName, ceCleanup := helpers.CreateClusterExtension(opName, "", nsName, unique) - DeferCleanup(ceCleanup) - helpers.ExpectClusterExtensionToBeInstalled(ctx, ceName) + By("waiting for InstalledOLMOperatorUpgradable to be true") + waitForOlmUpgradeStatus(ctx, operatorv1.ConditionTrue, "") - By("waiting for InstalledOLMOperatorUpgradable to be false") - waitForOlmUpgradeStatus(ctx, operatorv1.ConditionFalse, ceName) + By("creating the ClusterExtension") + ceName, ceCleanup := helpers.CreateClusterExtension(opName, "", nsName, unique, helpers.WithCatalogNameSelector(ccName)) + DeferCleanup(ceCleanup) + helpers.ExpectClusterExtensionToBeInstalled(ctx, ceName) - By("waiting for ClusterOperator Upgradeable to be false") - waitForClusterOperatorUpgradable(ctx, ceName) - }) + By("waiting for InstalledOLMOperatorUpgradable to be false") + waitForOlmUpgradeStatus(ctx, operatorv1.ConditionFalse, ceName) + + By("waiting for ClusterOperator Upgradeable to be false") + waitForClusterOperatorUpgradable(ctx, ceName) + }) }) func createClusterCatalog(name, namespace string) func() { diff --git a/openshift/tests-extension/testdata/catalog/configs/index.yaml b/openshift/tests-extension/testdata/catalog/configs/index.yaml index b2e808dc7..f4a12022c 100644 --- a/openshift/tests-extension/testdata/catalog/configs/index.yaml +++ b/openshift/tests-extension/testdata/catalog/configs/index.yaml @@ -1,17 +1,17 @@ { "schema": "olm.package", - "name": "TEST-BUNDLE" + "name": "{{ TEST-BUNDLE }}" } { "schema": "olm.bundle", - "name": "TEST-BUNDLE.v0.0.1", - "package": "TEST-BUNDLE", - "image": "image-registry.openshift-image-registry.svc:5000/NAMESPACE/TEST-BUNDLE:latest", + "name": "{{ TEST-BUNDLE }}.v0.0.1", + "package": "{{ TEST-BUNDLE }}", + "image": "image-registry.openshift-image-registry.svc:5000/{{ NAMESPACE }}/{{ TEST-BUNDLE }}:latest", "properties": [ { "type": "olm.package", "value": { - "packageName": "TEST-BUNDLE", + "packageName": "{{ TEST-BUNDLE }}", "version": "0.0.1" } }, @@ -24,10 +24,10 @@ { "schema": "olm.channel", "name": "preview", - "package": "TEST-BUNDLE", + "package": "{{ TEST-BUNDLE }}", "entries": [ { - "name": "TEST-BUNDLE.v0.0.1" + "name": "{{ TEST-BUNDLE }}.v0.0.1" } ] } diff --git a/openshift/tests-extension/testdata/operator/manifests/registry.clusterserviceversion.yaml b/openshift/tests-extension/testdata/operator/manifests/registry.clusterserviceversion.yaml index 1e38c8d51..3d26b2e46 100644 --- a/openshift/tests-extension/testdata/operator/manifests/registry.clusterserviceversion.yaml +++ b/openshift/tests-extension/testdata/operator/manifests/registry.clusterserviceversion.yaml @@ -10,9 +10,9 @@ metadata: "metadata": { "labels": { "app.kubernetes.io/managed-by": "kustomize", - "app.kubernetes.io/name": "TEST-BUNDLE" + "app.kubernetes.io/name": "{{ TEST-BUNDLE }}" }, - "name": "TEST-BUNDLE-sample" + "name": "{{ TEST-BUNDLE }}-sample" }, "spec": null } @@ -21,13 +21,13 @@ metadata: createdAt: "2025-08-06T17:43:41Z" operators.operatorframework.io/builder: operator-sdk-v1.34.1 operators.operatorframework.io/project_layout: go.kubebuilder.io/v4 - name: TEST-BUNDLE.v0.0.1 + name: {{ TEST-BUNDLE }}.v0.0.1 namespace: placeholder spec: apiservicedefinitions: {} customresourcedefinition: {} - description: TEST-BUNDLE description. TODO. - displayName: TEST-BUNDLE + description: {{ TEST-BUNDLE }} description. TODO. + displayName: {{ TEST-BUNDLE }} icon: - base64data: "" mediatype: "" @@ -36,9 +36,9 @@ spec: deployments: - label: app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: TEST-BUNDLE + app.kubernetes.io/name: {{ TEST-BUNDLE }} control-plane: controller-manager - name: TEST-BUNDLE-controller-manager + name: {{ TEST-BUNDLE }}-controller-manager spec: replicas: 1 selector: @@ -57,7 +57,7 @@ spec: command: - sleep - "1000" - image: busybox + image: "{{ TEST-CONTROLLER }}" livenessProbe: httpGet: path: /healthz @@ -120,22 +120,22 @@ spec: verbs: - create - patch - serviceAccountName: TEST-BUNDLE-controller-manager + serviceAccountName: {{ TEST-BUNDLE }}-controller-manager strategy: deployment installModes: - - supported: false + - supported: true type: OwnNamespace - - supported: false + - supported: true type: SingleNamespace - supported: false type: MultiNamespace - supported: true type: AllNamespaces keywords: - - TEST-BUNDLE + - {{ TEST-BUNDLE }} links: - - name: TEST-BUNDLE - url: https://TEST-BUNDLE.domain + - name: {{ TEST-BUNDLE }} + url: https://{{ TEST-BUNDLE }}.domain maintainers: - email: your@email.com name: Maintainer Name diff --git a/openshift/tests-extension/testdata/operator/metadata/properties.yaml b/openshift/tests-extension/testdata/operator/metadata/properties.yaml index a79cdbd24..9f7b9fe58 100644 --- a/openshift/tests-extension/testdata/operator/metadata/properties.yaml +++ b/openshift/tests-extension/testdata/operator/metadata/properties.yaml @@ -1,3 +1,3 @@ properties: - type: olm.maxOpenShiftVersion - value: "VERSION" + value: "{{ VERSION }}" diff --git a/openshift/tests-extension/vendor/github.com/ghodss/yaml/.travis.yml b/openshift/tests-extension/vendor/github.com/ghodss/yaml/.travis.yml index 0e9d6edc0..98ad417e2 100644 --- a/openshift/tests-extension/vendor/github.com/ghodss/yaml/.travis.yml +++ b/openshift/tests-extension/vendor/github.com/ghodss/yaml/.travis.yml @@ -1,7 +1,8 @@ language: go go: - - 1.3 - - 1.4 + - "1.9" + - "1.10" + - "1.11" script: - go test - go build diff --git a/openshift/tests-extension/vendor/github.com/ghodss/yaml/yaml.go b/openshift/tests-extension/vendor/github.com/ghodss/yaml/yaml.go index 4fb4054a8..dfd264d6c 100644 --- a/openshift/tests-extension/vendor/github.com/ghodss/yaml/yaml.go +++ b/openshift/tests-extension/vendor/github.com/ghodss/yaml/yaml.go @@ -1,9 +1,20 @@ -package yaml +// Package yaml provides a wrapper around go-yaml designed to enable a better +// way of handling YAML when marshaling to and from structs. +// +// In short, this package first converts YAML to JSON using go-yaml and then +// uses json.Marshal and json.Unmarshal to convert to or from the struct. This +// means that it effectively reuses the JSON struct tags as well as the custom +// JSON methods MarshalJSON and UnmarshalJSON unlike go-yaml. +// +// See also http://ghodss.com/2014/the-right-way-to-handle-yaml-in-golang +// +package yaml // import "github.com/ghodss/yaml" import ( "bytes" "encoding/json" "fmt" + "io" "reflect" "strconv" @@ -26,15 +37,30 @@ func Marshal(o interface{}) ([]byte, error) { return y, nil } -// Converts YAML to JSON then uses JSON to unmarshal into an object. -func Unmarshal(y []byte, o interface{}) error { +// JSONOpt is a decoding option for decoding from JSON format. +type JSONOpt func(*json.Decoder) *json.Decoder + +// Unmarshal converts YAML to JSON then uses JSON to unmarshal into an object, +// optionally configuring the behavior of the JSON unmarshal. +func Unmarshal(y []byte, o interface{}, opts ...JSONOpt) error { + return unmarshal(yaml.Unmarshal, y, o, opts) +} + +// UnmarshalStrict is like Unmarshal except that any mapping keys that are +// duplicates will result in an error. +// To also be strict about unknown fields, add the DisallowUnknownFields option. +func UnmarshalStrict(y []byte, o interface{}, opts ...JSONOpt) error { + return unmarshal(yaml.UnmarshalStrict, y, o, opts) +} + +func unmarshal(f func(in []byte, out interface{}) (err error), y []byte, o interface{}, opts []JSONOpt) error { vo := reflect.ValueOf(o) - j, err := yamlToJSON(y, &vo) + j, err := yamlToJSON(y, &vo, f) if err != nil { return fmt.Errorf("error converting YAML to JSON: %v", err) } - err = json.Unmarshal(j, o) + err = jsonUnmarshal(bytes.NewReader(j), o, opts...) if err != nil { return fmt.Errorf("error unmarshaling JSON: %v", err) } @@ -42,6 +68,21 @@ func Unmarshal(y []byte, o interface{}) error { return nil } +// jsonUnmarshal unmarshals the JSON byte stream from the given reader into the +// object, optionally applying decoder options prior to decoding. We are not +// using json.Unmarshal directly as we want the chance to pass in non-default +// options. +func jsonUnmarshal(r io.Reader, o interface{}, opts ...JSONOpt) error { + d := json.NewDecoder(r) + for _, opt := range opts { + d = opt(d) + } + if err := d.Decode(&o); err != nil { + return fmt.Errorf("while decoding JSON: %v", err) + } + return nil +} + // Convert JSON to YAML. func JSONToYAML(j []byte) ([]byte, error) { // Convert the JSON to an object. @@ -60,8 +101,8 @@ func JSONToYAML(j []byte) ([]byte, error) { return yaml.Marshal(jsonObj) } -// Convert YAML to JSON. Since JSON is a subset of YAML, passing JSON through -// this method should be a no-op. +// YAMLToJSON converts YAML to JSON. Since JSON is a subset of YAML, +// passing JSON through this method should be a no-op. // // Things YAML can do that are not supported by JSON: // * In YAML you can have binary and null keys in your maps. These are invalid @@ -70,14 +111,22 @@ func JSONToYAML(j []byte) ([]byte, error) { // use binary data with this library, encode the data as base64 as usual but do // not use the !!binary tag in your YAML. This will ensure the original base64 // encoded data makes it all the way through to the JSON. +// +// For strict decoding of YAML, use YAMLToJSONStrict. func YAMLToJSON(y []byte) ([]byte, error) { - return yamlToJSON(y, nil) + return yamlToJSON(y, nil, yaml.Unmarshal) +} + +// YAMLToJSONStrict is like YAMLToJSON but enables strict YAML decoding, +// returning an error on any duplicate field names. +func YAMLToJSONStrict(y []byte) ([]byte, error) { + return yamlToJSON(y, nil, yaml.UnmarshalStrict) } -func yamlToJSON(y []byte, jsonTarget *reflect.Value) ([]byte, error) { +func yamlToJSON(y []byte, jsonTarget *reflect.Value, yamlUnmarshal func([]byte, interface{}) error) ([]byte, error) { // Convert the YAML to an object. var yamlObj interface{} - err := yaml.Unmarshal(y, &yamlObj) + err := yamlUnmarshal(y, &yamlObj) if err != nil { return nil, err } @@ -85,7 +134,7 @@ func yamlToJSON(y []byte, jsonTarget *reflect.Value) ([]byte, error) { // YAML objects are not completely compatible with JSON objects (e.g. you // can have non-string keys in YAML). So, convert the YAML-compatible object // to a JSON-compatible object, failing with an error if irrecoverable - // incompatibilties happen along the way. + // incompatibilities happen along the way. jsonObj, err := convertToJSONableObject(yamlObj, jsonTarget) if err != nil { return nil, err diff --git a/openshift/tests-extension/vendor/github.com/ghodss/yaml/yaml_go110.go b/openshift/tests-extension/vendor/github.com/ghodss/yaml/yaml_go110.go new file mode 100644 index 000000000..ab3e06a22 --- /dev/null +++ b/openshift/tests-extension/vendor/github.com/ghodss/yaml/yaml_go110.go @@ -0,0 +1,14 @@ +// This file contains changes that are only compatible with go 1.10 and onwards. + +// +build go1.10 + +package yaml + +import "encoding/json" + +// DisallowUnknownFields configures the JSON decoder to error out if unknown +// fields come along, instead of dropping them by default. +func DisallowUnknownFields(d *json.Decoder) *json.Decoder { + d.DisallowUnknownFields() + return d +} diff --git a/openshift/tests-extension/vendor/github.com/openshift/origin/LICENSE b/openshift/tests-extension/vendor/github.com/openshift/origin/LICENSE new file mode 100644 index 000000000..c4ea8b6f9 --- /dev/null +++ b/openshift/tests-extension/vendor/github.com/openshift/origin/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 Red Hat, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/openshift/tests-extension/vendor/github.com/openshift/origin/test/extended/util/image/OWNERS b/openshift/tests-extension/vendor/github.com/openshift/origin/test/extended/util/image/OWNERS new file mode 100644 index 000000000..dd3dc4b1a --- /dev/null +++ b/openshift/tests-extension/vendor/github.com/openshift/origin/test/extended/util/image/OWNERS @@ -0,0 +1,15 @@ +# See the OWNERS docs at https://go.k8s.io/owners +reviewers: +- bertinatto +- ingvagabund +- soltysh +- tkashem +approvers: +- bertinatto +- ingvagabund +- soltysh +- tkashem +labels: +- "e2e-images-update" +options: + no_parent_owners: true diff --git a/openshift/tests-extension/vendor/github.com/openshift/origin/test/extended/util/image/README.md b/openshift/tests-extension/vendor/github.com/openshift/origin/test/extended/util/image/README.md new file mode 100644 index 000000000..91c1cf1af --- /dev/null +++ b/openshift/tests-extension/vendor/github.com/openshift/origin/test/extended/util/image/README.md @@ -0,0 +1,103 @@ +# Images used by e2e tests + +We limit the set of images used by conformance e2e to reduce duplication and to allow us to provide offline mirroring of images for customers and restricted test environments. Every image used in e2e must be part of this utility package or referenced by the upstream `k8s.io/kubernetes/test/utils/image` package. + +All images used by e2e tests that are part of the `conformance` suite are mirrored to: + + quay.io/openshift/community-e2e-images:TAG + +for easy mirroring by the `openshift-tests images` command. + +## To add a new image: + +1. Identify whether your use case can be solved by an existing image: + * The standard "shell" image provided by `ShellImage()` that is available on all clusters and has bash + a set of standard tools available. Use this by default. + * An upstream image that is provided by `test/utils/image`. +2. If your use case is novel, you must: + * Describe your use case in a PR to this file and have it approved + * Define a standard CI build and publish the image to quay.io in the openshift namespace + * Add the new reference to the `init()` method in this package + * Reference your image inside your tests tests using `github.com/openshift/origin/test/extended/util/image.LocationFor("my.source/image/location:versioned_tag")` + * Regenerate the verify output with `make update` and compare the diff to see your source image located + * Ensure your tests fail with "image cannot be pulled" errors. + * Have the reviewer promote the image to the quay mirror location. + * The reviewer should approve the PR and merge. + +When adding a new image, first make the code changes and compile the `openshift-tests` binary. Then run `hack/update-generated-bindata.sh` to update `test/extended/util/image/zz_generated.txt`. Contact one of the OWNERS of this directory and have them review the image for inclusion into our suite (usually granted in the process above). Before merge and after review they will run the following command to mirror the content to quay: + + OPENSHIFT_SKIP_EXTERNAL_TESTS=1 ./openshift-tests images --upstream --to-repository quay.io/openshift/community-e2e-images | oc image mirror -f - --filter-by-os=.* + +Note: The `registry.k8s.io/pause:3.9` image (and possibly others) contains uncompressed layers which quay.io does not allow. The `oc image mirror` command always +mirrors the layers as is and thus fails to mirror that image. You can use skopeo instead which will successfully mirror the image, but changes the +digests due to switching the layer format. This command will mirror the `registry.k8s.io/pause:3.9` image and can be adapted for other images as needed: + + skopeo copy --all --format oci docker://registry.k8s.io/pause:3.9 docker://quay.io/openshift/community-e2e-images:e2e-27-registry-k8s-io-pause-3-9-p9APyPDU5GsW02Rk + +To become an OWNER in this directory you must be given permission to push to this repo by another OWNER. + +### Kube exceptions: + +* `webserver:404` - used to access an image that does not exist +* `gcr.io/google_samples/gb-redisslave:nonexistent` - used to access an auth protected upstream image +* `gcr.io/authenticated-image-pulling/alpine:3.7` - used to access an image that is authenticated and verify that pulls fail or succeed, cannot be mirrored +* `invalid.com/invalid/alpine:3.1` + +### OpenShift exceptions + +* Temporary + * `docker.io/summerwind/h2spec:2.4.0` - for HTTP2 testing, waiting for mirror + +## When rebasing + +When a new version of Kubernetes is introduced new images will likely need to be mirrored. The failure will be pods that fail to start, usually with an ImagePullBackoff error (the image isn't available at `quay.io/openshift/community-e2e-images:*`). + +1. Perform a rebase of openshift/origin and open a pull request +2. Observe whether any tests fail due to missing images +3. Notify an OWNER in this file, who will run: + + OPENSHIFT_SKIP_EXTERNAL_TESTS=1 ./openshift-tests images --upstream --to-repository quay.io/openshift/community-e2e-images | oc image mirror -f - --filter-by-os=.* + + Note: see above information about using skopeo to mirror images that contain uncompressed layers, such as the `pause` image. + +4. Retest the PR, which should pass or identify new failures +5. If an upstream image is removed that OpenShift tests depend on, those tests should be refactored to use the appropriate equivalent. + +Step 3 only has to be run once per new image version introduced in a test. + + +## When reviewing + +We control images so that we are confident that if a user ran the tests binary in a controlled and protected offline environment that we are not introducing excessive risk for the user by running the tests (which run privileged). That means: + +* Using images that are reproducible - can be updated if a security vulnerability is found +* Using images that are published to a secured location - a malicious third party shouldn't be able to trivially take over the location the image is published to to inject an invalid tag +* Using images that are versioned - `latest` or rolling tags where the API of the image can be broken MUST NOT be allowed, because then a future mirror might regress old tests in old versions + +Kubernetes has a working process that we consider acceptable for upstream images documented at https://github.com/kubernetes/kubernetes/blob/master/test/images/README.md - images maintained by other communities likely do not satisfy these criteria and must be reviewed with these criteria in mind. + +OpenShift test images must be built via CI and published to quay in a versioned fashion (no regressions). + +New images should be added when: + +1. An upstream component refactors to use a different image + 1. Ask whether the upstream image is a better image (i.e. is it better managed, more generic, well built, kept up to date by some process) +2. A new test is added and needs an image AND none of the existing images are sufficient AND none of the existing images can be extended to solve it + 1. I.e. agnhost is a generic tool for simulating clients inside a pod, and so it is better to use that function OR extend it than adding a separate test simulation + 2. The shell image is the ultimate catch all - ANY bash code that isn't wierd should use that. If the bash code needs a novel new command we should add it to the `tools` image (which shell image points to) if it matches the criteria for tools (small Linux utilities that are useful for debugging an openshift cluster / node that are likely to be useful in a wide range of areas) + 3. Don't introduce new versions of an existing image unless there is no choice - i.e. if you need `redis` and are not testing a specific version of redis, just use the existing image + +### Mirroring images for approved changes before the PR is merged + +In order to merge the PR, the tests have to pass, which means the new image has to be mirrored prior to merge. + +When mirroring from a PR (granting access), you should check out the PR in question and build locally. You should probably rebase the local PR to ensure you don't stomp changes in master (checking out a PR doesn't exactly match what is tested). + +Then run + + OPENSHIFT_SKIP_EXTERNAL_TESTS=1 ./openshift-tests images --upstream --to-repository quay.io/openshift/community-e2e-images + +to verify that all things check out. If everything looks good, run + + OPENSHIFT_SKIP_EXTERNAL_TESTS=1 ./openshift-tests images --upstream --to-repository quay.io/openshift/community-e2e-images | oc image mirror -f - --filter-by-os=.* + +You must be logged in (to docker, using `oc registry login --registry=quay.io` or `skopeo login` or `docker login`) to a quay account that has write permission to `quay.io/openshift/community-e2e-images` which every OWNER should have. diff --git a/openshift/tests-extension/vendor/github.com/openshift/origin/test/extended/util/image/image.go b/openshift/tests-extension/vendor/github.com/openshift/origin/test/extended/util/image/image.go new file mode 100644 index 000000000..2d7cca212 --- /dev/null +++ b/openshift/tests-extension/vendor/github.com/openshift/origin/test/extended/util/image/image.go @@ -0,0 +1,330 @@ +package image + +import ( + "crypto/sha256" + "encoding/base64" + "encoding/json" + "fmt" + "regexp" + "strings" + "sync" + "time" + + imageapi "github.com/openshift/api/image/v1" + "k8s.io/apimachinery/pkg/util/sets" + k8simage "k8s.io/kubernetes/test/utils/image" +) + +var ( + initializationLock sync.RWMutex + initialized bool + fromRepository string + images map[string]string + + releasePullSpecInitializationLock sync.RWMutex + releasePullSpecInitialized bool + availablePullSpecs = map[string]string{ + "cli": "image-registry.openshift-image-registry.svc:5000/openshift/cli:latest", + "must-gather": "image-registry.openshift-image-registry.svc:5000/openshift/must-gather:latest", + // tools during transition period, can be on a different rhel level + "tools": "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest", + } + imageRegistryPullSpecRegex = regexp.MustCompile(`image-registry\.openshift-image-registry\.svc:5000\/openshift\/([A-Za-z0-9._-]+)[@:A-Za-z0-9._-]*`) + + allowedImages = map[string]k8simage.ImageID{ + // used by jenkins tests + "quay.io/redhat-developer/nfs-server:1.1": -1, + + // used by open ldap tests + "quay.io/openshifttest/ldap:1.2": -1, + + // used by oc mirror test, should be moved to publish to quay + "docker.io/library/registry:2.8.0-beta.1": -1, + + // used by build s2i e2e's to verify that builder with USER root are not allowed + // the github.com/openshift/build-test-images repo is built out of github.com/openshift/release + "quay.io/redhat-developer/test-build-roots2i:1.2": -1, + + // used by all the rest build s2s e2e tests + "quay.io/redhat-developer/test-build-simples2i:1.2": -1, + + // allowed upstream kube images - index and value must match upstream or + // tests will fail (vendor/k8s.io/kubernetes/test/utils/image/manifest.go) + "registry.k8s.io/e2e-test-images/agnhost:2.53": 1, + "registry.k8s.io/e2e-test-images/busybox:1.36.1-1": 7, + "registry.k8s.io/e2e-test-images/nginx:1.15-4": 19, + + // used by KubeVirt test to start fedora VMs + "quay.io/kubevirt/fedora-with-test-tooling-container-disk:20241024_891122a6fc": -1, + + // used by external OIDC tests to simulate an external IdP + "quay.io/keycloak/keycloak:25.0": -1, + } +) + +func getImages() map[string]string { + initializationLock.RLock() + if !initialized { + fmt.Printf("Called getImages before initialization, starting wait.\n") + initializationLock.RUnlock() + + for { + time.Sleep(5 * time.Second) + + done := func() bool { + initializationLock.RLock() + defer initializationLock.RUnlock() + + if initialized { + return true + } + return false + }() + if done { + break + } + + fmt.Printf("getImages still not initialized, waiting more.") + } + } + return images +} + +func InitializeImages(repo string) { + initializationLock.Lock() + defer initializationLock.Unlock() + + if initialized { + panic(fmt.Sprintf("attempt to double initialize from %q to %q", fromRepository, repo)) + } + initialized = true + fromRepository = repo + images = GetMappedImages(allowedImages, repo) +} + +func GetGlobalFromRepository() string { + return fromRepository +} + +// ReplaceContents ensures that the provided yaml or json has the +// correct embedded image content. +func ReplaceContents(data []byte) ([]byte, error) { + // exactImageFormat attempts to match a string on word boundaries + const exactImageFormat = `\b%s\b` + + patterns := make(map[string]*regexp.Regexp) + for from, to := range getImages() { + pattern := fmt.Sprintf(exactImageFormat, regexp.QuoteMeta(from)) + re, err := regexp.Compile(pattern) + if err != nil { + return nil, err + } + patterns[to] = re + } + + // find any references to image-registry.openshift-image-registry.svc:5000/openshift/: + // append pattern match for appropriate PullSpec if one exists + allMatches := imageRegistryPullSpecRegex.FindAllStringSubmatch(string(data), -1) + for _, match := range allMatches { + if len(match) != 2 { + continue + } + exactMatchedPullSpec := match[0] + tagMatchedPullSpec := match[1] + to, found := GetPullSpecFor(tagMatchedPullSpec) + if !found || to == exactMatchedPullSpec { + continue + } + pattern := fmt.Sprintf(exactImageFormat, regexp.QuoteMeta(exactMatchedPullSpec)) + re, err := regexp.Compile(pattern) + if err != nil { + return nil, err + } + patterns[to] = re + } + + for to, pattern := range patterns { + data = pattern.ReplaceAll(data, []byte(to)) + } + + return data, nil +} + +// MustReplaceContents invokes ReplaceContents and panics if any +// replacement error occurs. +func MustReplaceContents(data []byte) []byte { + data, err := ReplaceContents(data) + if err != nil { + panic(err) + } + return data +} + +// LocationFor returns the appropriate URL for the provided image. +func LocationFor(image string) string { + pull, ok := getImages()[image] + if !ok { + panic(fmt.Sprintf(`The image %q is not one of the pre-approved test images. + +To add a new image to OpenShift tests you must follow the process described in +the test/extended/util/image/README.md file.`, image)) + } + return pull +} + +// ShellImage returns a docker pull spec that any pod on the cluster +// has access to that contains bash and standard commandline tools. +// This image should be used for all generic e2e shell scripts. This +// image has oc. +// +// If the script you are running does not have a specific tool available +// that is required, open an issue to github.com/openshift/images in the +// images/tools directory to discuss adding that package. In general, try +// to avoid the need to add packages by using simpler concepts or consider +// extending an existing image. +func ShellImage() string { + return GetPullSpecForOrPanic("tools") +} + +// MustGatherImage returns a docker pull spec that any pod on the cluster +// has access to that contains bash and standard commandline tools. +// This image has oc and must-gather scripts. +func MustGatherImage() string { + return GetPullSpecForOrPanic("must-gather") +} + +// LimitedShellImage returns a docker pull spec that any pod on the cluster +// has access to that contains bash and standard commandline tools. +// This image should be used when you only need oc and can't use the shell image. +// This image has oc. +func LimitedShellImage() string { + return GetPullSpecForOrPanic("cli") +} + +// OpenLDAPTestImage returns the LDAP test image. +func OpenLDAPTestImage() string { + return LocationFor("quay.io/openshifttest/ldap:1.2") +} + +// OriginalImages returns a map of the original image names. +func OriginalImages() map[string]k8simage.ImageID { + images := make(map[string]k8simage.ImageID) + for k, v := range allowedImages { + images[k] = v + } + return images +} + +// Exceptions is a list of images we don't mirror temporarily due to various +// problems. This list should ideally be empty. +var Exceptions = sets.NewString( + // this image has 2 windows/amd64 manifests, where layers are not compressed, + // ie. application/vnd.docker.image.rootfs.diff.tar which are not accepted + // by quay.io, this has to be manually mirrored with --filter-by-os=linux.* + "registry.k8s.io/pause:3.10", +) + +// GetMappedImages returns the images if they were mapped to the provided +// image repository. The keys of the returned map are the same as the keys +// in originalImages and the values are the equivalent name in the target +// repo. +func GetMappedImages(originalImages map[string]k8simage.ImageID, repo string) map[string]string { + if len(repo) == 0 { + images := make(map[string]string) + for k := range originalImages { + images[k] = k + } + return images + } + configs := make(map[string]string) + reCharSafe := regexp.MustCompile(`[^\w]`) + reDashes := regexp.MustCompile(`-+`) + h := sha256.New() + + const ( + // length of hash in base64-url chosen to minimize possible collisions (64^16 possible) + hashLength = 16 + // maximum length of a Docker spec image tag + maxTagLength = 127 + // when building a tag, there are at most 6 characters in the format (e2e and 3 dashes), + // and we should allow up to 10 digits for the index and additional qualifiers we may add + // in the future + tagFormatCharacters = 6 + 10 + ) + + parts := strings.SplitN(repo, "/", 2) + registry, destination := parts[0], parts[1] + for pullSpec, index := range originalImages { + // Build a new tag with a the index, a hash of the image spec (to be unique) and + // shorten and make the pull spec "safe" so it will fit in the tag + h.Reset() + h.Write([]byte(pullSpec)) + hash := base64.RawURLEncoding.EncodeToString(h.Sum(nil))[:hashLength] + shortName := reCharSafe.ReplaceAllLiteralString(pullSpec, "-") + shortName = reDashes.ReplaceAllLiteralString(shortName, "-") + maxLength := maxTagLength - hashLength - tagFormatCharacters + if len(shortName) > maxLength { + shortName = shortName[len(shortName)-maxLength:] + } + var newTag string + if index == -1 { + newTag = fmt.Sprintf("e2e-%s-%s", shortName, hash) + } else { + newTag = fmt.Sprintf("e2e-%d-%s-%s", index, shortName, hash) + } + + configs[pullSpec] = fmt.Sprintf("%s/%s:%s", registry, destination, newTag) + } + return configs +} + +func GetPullSpecFor(image string) (string, bool) { + if spec, found := availablePullSpecs[image]; found { + return spec, true + } + return "", false +} + +func GetPullSpecForOrPanic(image string) string { + spec, found := GetPullSpecFor(image) + if !found { + panic(fmt.Sprintf("could not find PullSpec for (%s)", image)) + } + return spec +} + +// InitializeReleasePullSpecString initializes a mapping with the PullSpec ImageStream string from +// the release payload +// +// When running in clusters that do not have ImageRegistry installed it is necessary to use the full +// PullSpec for ImageRegistry containers such as `cli` or `tools`, Pass in an imageStreamString of +// the discovered PullSpec (ex. oc adm release info `-ojsonpath='{.references}'). This method will then +// initialize the package with the PullSpec for that release. +// +// Using GetPullSpecFor(), ShellImage() and LimitedShellImage() will return the appropriate +// PullSpec, either the ReleasePayload or ImageRegistry. +func InitializeReleasePullSpecString(imageStreamString string, hasNoImageRegistry bool) error { + releasePullSpecInitializationLock.Lock() + defer releasePullSpecInitializationLock.Unlock() + if releasePullSpecInitialized { + panic("attempt to double initialize ReleasePullSpec") + } + images := &imageapi.ImageStream{} + err := json.Unmarshal([]byte(imageStreamString), images) + if err != nil { + return fmt.Errorf("failed to unmarshal release ImageStream string: %w", err) + } + + for _, tag := range images.Spec.Tags { + if tag.From.Kind != "DockerImage" { + continue + } + // If an available pullthrough spec is already defined, and we do have an ImageRegistry + // we leave it alone + if _, available := availablePullSpecs[tag.Name]; available && !hasNoImageRegistry { + continue + } + availablePullSpecs[tag.Name] = tag.From.Name + } + return nil +} diff --git a/openshift/tests-extension/vendor/github.com/openshift/origin/test/extended/util/image/zz_generated.txt b/openshift/tests-extension/vendor/github.com/openshift/origin/test/extended/util/image/zz_generated.txt new file mode 100644 index 000000000..1fda81fe7 --- /dev/null +++ b/openshift/tests-extension/vendor/github.com/openshift/origin/test/extended/util/image/zz_generated.txt @@ -0,0 +1,45 @@ +# This file is generated by hack/update-generated.sh +docker.io/library/registry:2.8.0-beta.1 quay.io/openshift/community-e2e-images:e2e-docker-io-library-registry-2-8-0-beta-1-8x_YFKSuz9Xw6lZD +quay.io/keycloak/keycloak:25.0 quay.io/openshift/community-e2e-images:e2e-quay-io-keycloak-keycloak-25-0-rEIw9B2Zcc3L1M6k +quay.io/kubevirt/fedora-with-test-tooling-container-disk:20241024_891122a6fc quay.io/openshift/community-e2e-images:e2e-quay-io-kubevirt-fedora-with-test-tooling-container-disk-20241024_891122a6fc-IycYTh-87XrXse4E +quay.io/openshifttest/ldap:1.2 quay.io/openshift/community-e2e-images:e2e-quay-io-openshifttest-ldap-1-2-O3f5zPgtmWzEtasv +quay.io/redhat-developer/nfs-server:1.1 quay.io/openshift/community-e2e-images:e2e-quay-io-redhat-developer-nfs-server-1-1-dlXGfzrk5aNo8EjC +quay.io/redhat-developer/test-build-roots2i:1.2 quay.io/openshift/community-e2e-images:e2e-quay-io-redhat-developer-test-build-roots2i-1-2-gLJ7WcnS2TSllJ32 +quay.io/redhat-developer/test-build-simples2i:1.2 quay.io/openshift/community-e2e-images:e2e-quay-io-redhat-developer-test-build-simples2i-1-2-thirLMR-JKplfkmE +registry.k8s.io/build-image/distroless-iptables:v0.7.7 quay.io/openshift/community-e2e-images:e2e-8-registry-k8s-io-build-image-distroless-iptables-v0-7-7-RnQLl7s9Ix-ryHiD +registry.k8s.io/cloud-provider-gcp/gcp-compute-persistent-disk-csi-driver:v1.4.0 quay.io/openshift/community-e2e-images:e2e-42-registry-k8s-io-cloud-provider-gcp-gcp-compute-persistent-disk-csi-driver-v1-4-0-mUHHjVVuv0UQiTyf +registry.k8s.io/e2e-test-images/agnhost:2.53 quay.io/openshift/community-e2e-images:e2e-1-registry-k8s-io-e2e-test-images-agnhost-2-53-S5hiptYgC5MyFXZH +registry.k8s.io/e2e-test-images/apparmor-loader:1.4 quay.io/openshift/community-e2e-images:e2e-4-registry-k8s-io-e2e-test-images-apparmor-loader-1-4-m-K7F-syWFeA4t03 +registry.k8s.io/e2e-test-images/busybox:1.36.1-1 quay.io/openshift/community-e2e-images:e2e-7-registry-k8s-io-e2e-test-images-busybox-1-36-1-1-n3BezCOfxp98l84K +registry.k8s.io/e2e-test-images/httpd:2.4.38-4 quay.io/openshift/community-e2e-images:e2e-10-registry-k8s-io-e2e-test-images-httpd-2-4-38-4-lYFH2l3oSS5xEICa +registry.k8s.io/e2e-test-images/httpd:2.4.39-4 quay.io/openshift/community-e2e-images:e2e-11-registry-k8s-io-e2e-test-images-httpd-2-4-39-4-Hgo23C6O-Y8DPv5N +registry.k8s.io/e2e-test-images/ipc-utils:1.3 quay.io/openshift/community-e2e-images:e2e-13-registry-k8s-io-e2e-test-images-ipc-utils-1-3-1gFPvJGe7Ngg9foG +registry.k8s.io/e2e-test-images/jessie-dnsutils:1.7 quay.io/openshift/community-e2e-images:e2e-14-registry-k8s-io-e2e-test-images-jessie-dnsutils-1-7-bJ-yvCS2MUBlnXm1 +registry.k8s.io/e2e-test-images/kitten:1.7 quay.io/openshift/community-e2e-images:e2e-15-registry-k8s-io-e2e-test-images-kitten-1-7-mZ7FrR_qsNkeZKj2 +registry.k8s.io/e2e-test-images/nautilus:1.7 quay.io/openshift/community-e2e-images:e2e-16-registry-k8s-io-e2e-test-images-nautilus-1-7-7f05f70QXiLXg0hX +registry.k8s.io/e2e-test-images/nginx:1.14-4 quay.io/openshift/community-e2e-images:e2e-18-registry-k8s-io-e2e-test-images-nginx-1-14-4-20h7A1tgJp0m0c1_ +registry.k8s.io/e2e-test-images/nginx:1.15-4 quay.io/openshift/community-e2e-images:e2e-19-registry-k8s-io-e2e-test-images-nginx-1-15-4-PSG4JEhRvqJc3rgT +registry.k8s.io/e2e-test-images/node-perf/npb-ep:1.2 quay.io/openshift/community-e2e-images:e2e-20-registry-k8s-io-e2e-test-images-node-perf-npb-ep-1-2-gVhsojuRuw0AAfMC +registry.k8s.io/e2e-test-images/node-perf/npb-is:1.2 quay.io/openshift/community-e2e-images:e2e-21-registry-k8s-io-e2e-test-images-node-perf-npb-is-1-2-_tnI2Z3XnYHZzTZJ +registry.k8s.io/e2e-test-images/node-perf/tf-wide-deep:1.3 quay.io/openshift/community-e2e-images:e2e-22-registry-k8s-io-e2e-test-images-node-perf-tf-wide-deep-1-3-EDGj7EOLGmRjJ92y +registry.k8s.io/e2e-test-images/nonewprivs:1.3 quay.io/openshift/community-e2e-images:e2e-23-registry-k8s-io-e2e-test-images-nonewprivs-1-3-lsPs1J8LjWvEYqre +registry.k8s.io/e2e-test-images/nonroot:1.4 quay.io/openshift/community-e2e-images:e2e-24-registry-k8s-io-e2e-test-images-nonroot-1-4-u_r1WOwfmHWUVyUc +registry.k8s.io/e2e-test-images/perl:5.26 quay.io/openshift/community-e2e-images:e2e-26-registry-k8s-io-e2e-test-images-perl-5-26-Y8J-9BkLP356-AtD +registry.k8s.io/e2e-test-images/redis:5.0.5-3 quay.io/openshift/community-e2e-images:e2e-27-registry-k8s-io-e2e-test-images-redis-5-0-5-3-vp1PVXVOrYaQL5QQ +registry.k8s.io/e2e-test-images/regression-issue-74839:1.2 quay.io/openshift/community-e2e-images:e2e-28-registry-k8s-io-e2e-test-images-regression-issue-74839-1-2-pZ_RxNuqvcwEiCKE +registry.k8s.io/e2e-test-images/resource-consumer:1.13 quay.io/openshift/community-e2e-images:e2e-29-registry-k8s-io-e2e-test-images-resource-consumer-1-13-LT0C2W4wMzShSeGS +registry.k8s.io/e2e-test-images/sample-apiserver:1.29.2 quay.io/openshift/community-e2e-images:e2e-3-registry-k8s-io-e2e-test-images-sample-apiserver-1-29-2-jfc3qrk0SlKStkiL +registry.k8s.io/e2e-test-images/volume/iscsi:2.6 quay.io/openshift/community-e2e-images:e2e-31-registry-k8s-io-e2e-test-images-volume-iscsi-2-6-3sOdD3WkuEQhhISN +registry.k8s.io/e2e-test-images/volume/nfs:1.4 quay.io/openshift/community-e2e-images:e2e-30-registry-k8s-io-e2e-test-images-volume-nfs-1-4-u7V8iW5QIcWM2i6h +registry.k8s.io/etcd:3.5.21-0 quay.io/openshift/community-e2e-images:e2e-9-registry-k8s-io-etcd-3-5-21-0-ul4Gh_2cA4Q27LA8 +registry.k8s.io/sig-storage/csi-attacher:v4.8.0 quay.io/openshift/community-e2e-images:e2e-38-registry-k8s-io-sig-storage-csi-attacher-v4-8-0-S1cGDJYg9N-xpVnU +registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.12.1 quay.io/openshift/community-e2e-images:e2e-35-registry-k8s-io-sig-storage-csi-external-health-monitor-controller-v0-12-1--7VXdNUMsJt30kdU +registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.13.0 quay.io/openshift/community-e2e-images:e2e-36-registry-k8s-io-sig-storage-csi-node-driver-registrar-v2-13-0-Yz3cC3wjWoQESAfV +registry.k8s.io/sig-storage/csi-provisioner:v5.1.0 quay.io/openshift/community-e2e-images:e2e-39-registry-k8s-io-sig-storage-csi-provisioner-v5-1-0-9nVNb-KrN4Qb7WGv +registry.k8s.io/sig-storage/csi-resizer:v1.13.1 quay.io/openshift/community-e2e-images:e2e-40-registry-k8s-io-sig-storage-csi-resizer-v1-13-1-YKcEWbi0FydNavn_ +registry.k8s.io/sig-storage/csi-snapshotter:v8.3.0 quay.io/openshift/community-e2e-images:e2e-41-registry-k8s-io-sig-storage-csi-snapshotter-v8-3-0-LSRhS3Dw_X9lUrAu +registry.k8s.io/sig-storage/hello-populator:v1.0.1 quay.io/openshift/community-e2e-images:e2e-32-registry-k8s-io-sig-storage-hello-populator-v1-0-1-Ei7libli17J5IWn- +registry.k8s.io/sig-storage/hostpathplugin:v1.16.1 quay.io/openshift/community-e2e-images:e2e-34-registry-k8s-io-sig-storage-hostpathplugin-v1-16-1-E8rDn5RMceBiqrUX +registry.k8s.io/sig-storage/livenessprobe:v2.15.0 quay.io/openshift/community-e2e-images:e2e-37-registry-k8s-io-sig-storage-livenessprobe-v2-15-0-4bLc1k1ifxb_KkX9 +registry.k8s.io/sig-storage/nfs-provisioner:v4.0.8 quay.io/openshift/community-e2e-images:e2e-17-registry-k8s-io-sig-storage-nfs-provisioner-v4-0-8-W5pbwDbNliDm1x4k +registry.k8s.io/sig-storage/volume-data-source-validator:v1.0.0 quay.io/openshift/community-e2e-images:e2e-33-registry-k8s-io-sig-storage-volume-data-source-validator-v1-0-0-pJwTeQGTDmAV8753 diff --git a/openshift/tests-extension/vendor/k8s.io/utils/net/multi_listen.go b/openshift/tests-extension/vendor/k8s.io/utils/net/multi_listen.go index 7cb7795be..e5d508055 100644 --- a/openshift/tests-extension/vendor/k8s.io/utils/net/multi_listen.go +++ b/openshift/tests-extension/vendor/k8s.io/utils/net/multi_listen.go @@ -21,6 +21,7 @@ import ( "fmt" "net" "sync" + "sync/atomic" ) // connErrPair pairs conn and error which is returned by accept on sub-listeners. @@ -38,6 +39,7 @@ type multiListener struct { connCh chan connErrPair // stopCh communicates from parent to child listeners. stopCh chan struct{} + closed atomic.Bool } // compile time check to ensure *multiListener implements net.Listener @@ -150,10 +152,8 @@ func (ml *multiListener) Accept() (net.Conn, error) { // the go-routines to exit. func (ml *multiListener) Close() error { // Make sure this can be called repeatedly without explosions. - select { - case <-ml.stopCh: + if !ml.closed.CompareAndSwap(false, true) { return fmt.Errorf("use of closed network connection") - default: } // Tell all sub-listeners to stop. diff --git a/openshift/tests-extension/vendor/modules.txt b/openshift/tests-extension/vendor/modules.txt index 011ca1ce7..5c4fdca61 100644 --- a/openshift/tests-extension/vendor/modules.txt +++ b/openshift/tests-extension/vendor/modules.txt @@ -86,7 +86,7 @@ github.com/fsnotify/fsnotify/internal # github.com/fxamacker/cbor/v2 v2.8.0 ## explicit; go 1.20 github.com/fxamacker/cbor/v2 -# github.com/ghodss/yaml v1.0.0 +# github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 ## explicit github.com/ghodss/yaml # github.com/go-logr/logr v1.4.3 @@ -387,6 +387,9 @@ github.com/openshift/client-go/user/applyconfigurations/user/v1 github.com/openshift/client-go/user/clientset/versioned github.com/openshift/client-go/user/clientset/versioned/scheme github.com/openshift/client-go/user/clientset/versioned/typed/user/v1 +# github.com/openshift/origin v1.5.0-alpha.3.0.20250927181537-6079513c8d63 +## explicit; go 1.24.0 +github.com/openshift/origin/test/extended/util/image # github.com/operator-framework/operator-controller v1.5.1 ## explicit; go 1.24.4 github.com/operator-framework/operator-controller/api/v1 @@ -448,7 +451,7 @@ github.com/x448/float16 ## explicit; go 1.22.0 go.opentelemetry.io/auto/sdk go.opentelemetry.io/auto/sdk/internal/telemetry -# go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 +# go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 ## explicit; go 1.21 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal @@ -601,7 +604,7 @@ golang.org/x/tools/go/ast/inspector ## explicit; go 1.23.0 google.golang.org/genproto/googleapis/api/expr/v1alpha1 google.golang.org/genproto/googleapis/api/httpbody -# google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 +# google.golang.org/genproto/googleapis/rpc v0.0.0-20250728155136-f173205681a0 ## explicit; go 1.23.0 google.golang.org/genproto/googleapis/rpc/errdetails google.golang.org/genproto/googleapis/rpc/status @@ -1283,7 +1286,7 @@ k8s.io/client-go/util/keyutil k8s.io/client-go/util/retry k8s.io/client-go/util/watchlist k8s.io/client-go/util/workqueue -# k8s.io/cloud-provider v0.0.0 => github.com/openshift/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20250906192346-6efb6a95323f +# k8s.io/cloud-provider v0.31.1 => github.com/openshift/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20250906192346-6efb6a95323f ## explicit; go 1.24.0 k8s.io/cloud-provider/volume k8s.io/cloud-provider/volume/helpers @@ -1311,7 +1314,7 @@ k8s.io/component-base/tracing k8s.io/component-base/tracing/api/v1 k8s.io/component-base/version k8s.io/component-base/zpages/features -# k8s.io/component-helpers v0.33.2 => github.com/openshift/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20250906192346-6efb6a95323f +# k8s.io/component-helpers v0.33.4 => github.com/openshift/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20250906192346-6efb6a95323f ## explicit; go 1.24.0 k8s.io/component-helpers/node/topology k8s.io/component-helpers/node/util/sysctl @@ -1323,7 +1326,7 @@ k8s.io/component-helpers/storage/volume # k8s.io/controller-manager v0.33.2 => github.com/openshift/kubernetes/staging/src/k8s.io/controller-manager v0.0.0-20250906192346-6efb6a95323f ## explicit; go 1.24.0 k8s.io/controller-manager/pkg/features -# k8s.io/cri-api v0.0.0 => github.com/openshift/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20250906192346-6efb6a95323f +# k8s.io/cri-api v0.27.1 => github.com/openshift/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20250906192346-6efb6a95323f ## explicit; go 1.24.0 k8s.io/cri-api/pkg/apis k8s.io/cri-api/pkg/apis/runtime/v1 @@ -1376,11 +1379,11 @@ k8s.io/kube-openapi/pkg/validation/strfmt/bson ## explicit; go 1.24.0 k8s.io/kube-scheduler/config/v1 k8s.io/kube-scheduler/extender/v1 -# k8s.io/kubectl v0.33.3 => github.com/openshift/kubernetes/staging/src/k8s.io/kubectl v0.0.0-20250906192346-6efb6a95323f +# k8s.io/kubectl v0.33.4 => github.com/openshift/kubernetes/staging/src/k8s.io/kubectl v0.0.0-20250906192346-6efb6a95323f ## explicit; go 1.24.0 k8s.io/kubectl/pkg/scale k8s.io/kubectl/pkg/util/podutils -# k8s.io/kubelet v0.0.0 => github.com/openshift/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20250906192346-6efb6a95323f +# k8s.io/kubelet v0.31.1 => github.com/openshift/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20250906192346-6efb6a95323f ## explicit; go 1.24.0 k8s.io/kubelet/pkg/apis k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1 @@ -1546,11 +1549,11 @@ k8s.io/kubernetes/third_party/forked/libcontainer/utils # k8s.io/mount-utils v0.0.0 => github.com/openshift/kubernetes/staging/src/k8s.io/mount-utils v0.0.0-20250906192346-6efb6a95323f ## explicit; go 1.24.0 k8s.io/mount-utils -# k8s.io/pod-security-admission v0.0.0 => github.com/openshift/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20250906192346-6efb6a95323f +# k8s.io/pod-security-admission v0.33.4 => github.com/openshift/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20250906192346-6efb6a95323f ## explicit; go 1.24.0 k8s.io/pod-security-admission/api k8s.io/pod-security-admission/policy -# k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 +# k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d ## explicit; go 1.18 k8s.io/utils/buffer k8s.io/utils/clock