Skip to content

Commit a811e66

Browse files
committed
drop use of RELATED_IMAGES some test-operator IMGs
Drop use of the RELATED_IMAGES env naming convention for test-operator images that we do not release downstream and instead just use normal Env variables. This should resolve bundle validation issues with these related images not existing... The normal ENV variables can be used upstream for tests. Jira: OSPRH-14450
1 parent a3ed3f4 commit a811e66

File tree

5 files changed

+27
-6
lines changed

5 files changed

+27
-6
lines changed

config/operator/default_images.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,12 @@ spec:
181181
value: quay.io/podified-antelope-centos9/openstack-swift-proxy-server:current-podified
182182
- name: RELATED_IMAGE_TEST_TEMPEST_IMAGE_URL_DEFAULT
183183
value: quay.io/podified-antelope-centos9/openstack-tempest-all:current-podified
184-
- name: RELATED_IMAGE_TEST_TOBIKO_IMAGE_URL_DEFAULT
184+
# NOTE: TEST_ images below do not get released downstream. They should not be prefixed with RELATED
185+
- name: TEST_TOBIKO_IMAGE_URL_DEFAULT
185186
value: quay.io/podified-antelope-centos9/openstack-tobiko:current-podified
186-
- name: RELATED_IMAGE_TEST_ANSIBLETEST_IMAGE_URL_DEFAULT
187+
- name: TEST_ANSIBLETEST_IMAGE_URL_DEFAULT
187188
value: quay.io/podified-antelope-centos9/openstack-ansible-tests:current-podified
188-
- name: RELATED_IMAGE_TEST_HORIZONTEST_IMAGE_URL_DEFAULT
189+
- name: TEST_HORIZONTEST_IMAGE_URL_DEFAULT
189190
value: quay.io/podified-antelope-centos9/openstack-horizontest:current-podified
190191
- name: RELATED_IMAGE_OPENSTACK_MUST_GATHER_DEFAULT
191192
value: quay.io/openstack-k8s-operators/openstack-must-gather:latest

controllers/core/openstackversion_controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ func SetupVersionDefaults() {
5555
if strings.HasPrefix(envArr[0], "RELATED_IMAGE_") {
5656
localVars[envArr[0]] = &envArr[1]
5757
}
58+
// we have some TEST_ env vars which specify images that aren't released downstream
59+
if strings.HasPrefix(envArr[0], "TEST_") {
60+
localVars[envArr[0]] = &envArr[1]
61+
}
5862
}
5963
envAvailableVersion = corev1beta1.GetOpenStackReleaseVersion(os.Environ())
6064
envContainerImages = localVars

hack/export_related_images.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ export RELATED_IMAGE_EDPM_OPENSTACK_NETWORK_EXPORTER_IMAGE_URL_DEFAULT=quay.io/o
8787
export RELATED_IMAGE_EDPM_KEPLER_IMAGE_URL_DEFAULT=quay.io/sustainable_computing_io/kepler:release-0.7.12
8888
export RELATED_IMAGE_EDPM_PODMAN_EXPORTER_IMAGE_URL_DEFAULT=quay.io/navidys/prometheus-podman-exporter:v1.10.1
8989
export RELATED_IMAGE_TEST_TEMPEST_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-tempest-all:current-podified
90-
export RELATED_IMAGE_TEST_TOBIKO_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-tobiko:current-podified
91-
export RELATED_IMAGE_TEST_ANSIBLETEST_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-ansible-tests:current-podified
92-
export RELATED_IMAGE_TEST_HORIZONTEST_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-horizontest:current-podified
90+
#NOTE: TEST_ images below do not get released downstream. They should not be prefixed with RELATED
91+
export TEST_TOBIKO_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-tobiko:current-podified
92+
export TEST_ANSIBLETEST_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-ansible-tests:current-podified
93+
export TEST_HORIZONTEST_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-horizontest:current-podified
9394
export RELATED_IMAGE_OPENSTACK_MUST_GATHER_DEFAULT=quay.io/openstack-k8s-operators/openstack-must-gather:latest

pkg/openstack/version.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ func InitializeOpenStackVersionImageDefaults(ctx context.Context, envImages map[
6060
if envImages["RELATED_IMAGE_NEUTRON_API_IMAGE_URL_DEFAULT"] != nil {
6161
defaults.InfraDnsmasqImage = envImages["RELATED_IMAGE_NEUTRON_API_IMAGE_URL_DEFAULT"]
6262
}
63+
// custom TEST_ images which aren't released downstream
64+
if envImages["TEST_TOBIKO_IMAGE_URL_DEFAULT"] != nil {
65+
defaults.TestTobikoImage = envImages["TEST_TOBIKO_IMAGE_URL_DEFAULT"]
66+
}
67+
if envImages["TEST_ANSIBLETEST_IMAGE_URL_DEFAULT"] != nil {
68+
defaults.TestAnsibletestImage = envImages["TEST_ANSIBLETEST_IMAGE_URL_DEFAULT"]
69+
}
70+
if envImages["TEST_HORIZONTEST_IMAGE_URL_DEFAULT"] != nil {
71+
defaults.TestHorizontestImage = envImages["TEST_HORIZONTEST_IMAGE_URL_DEFAULT"]
72+
}
73+
6374
Log.Info("Initialize OpenStackVersion return defaults")
6475
return defaults
6576

tests/functional/ctlplane/openstackversion_controller_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ var _ = Describe("OpenStackOperator controller", func() {
183183
g.Expect(version.Status.ContainerImages.SwiftContainerImage).ShouldNot(BeNil())
184184
g.Expect(version.Status.ContainerImages.SwiftObjectImage).ShouldNot(BeNil())
185185
g.Expect(version.Status.ContainerImages.SwiftProxyImage).ShouldNot(BeNil())
186+
g.Expect(version.Status.ContainerImages.TestTempestImage).ShouldNot(BeNil())
187+
g.Expect(version.Status.ContainerImages.TestTobikoImage).ShouldNot(BeNil())
188+
g.Expect(version.Status.ContainerImages.TestHorizontestImage).ShouldNot(BeNil())
189+
g.Expect(version.Status.ContainerImages.TestAnsibletestImage).ShouldNot(BeNil())
186190

187191
}, timeout, interval).Should(Succeed())
188192
})

0 commit comments

Comments
 (0)