Skip to content

Commit

Permalink
Add multipathd image and Fix EDPM $RELATED_IMAGE* vars for consistency (
Browse files Browse the repository at this point in the history
#741)

* Add multipathd image

This image was missing from OpenStackVersion.

Signed-off-by: James Slagle <[email protected]>

* Fix EDPM $RELATED_IMAGE* vars for consistency

Fixes the EDPM environment variables to match the naming convention from
the other operators for consistency.

- Drops OPENSTACK from the names
- Each vars ends in IMAGE_URL_DEFAULT

Syncs openstack-operator with the changes done in dataplane-operator
commit 6b307a874617acb1585d5acc09c2f04e47e17fa7

Signed-off-by: James Slagle <[email protected]>

---------

Signed-off-by: James Slagle <[email protected]>
Signed-off-by: James Slagle <[email protected]>
  • Loading branch information
slagle authored Apr 12, 2024
1 parent ef01d00 commit 7c14614
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 21 deletions.
2 changes: 2 additions & 0 deletions apis/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17297,6 +17297,8 @@ spec:
type: string
edpmLogrotateCrondImage:
type: string
edpmMultipathdImage:
type: string
edpmNeutronMetadataAgentImage:
type: string
edpmNeutronSriovAgentImage:
Expand Down
6 changes: 6 additions & 0 deletions apis/bases/core.openstack.org_openstackversions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ spec:
type: string
edpmLogrotateCrondImage:
type: string
edpmMultipathdImage:
type: string
edpmNeutronMetadataAgentImage:
type: string
edpmNeutronSriovAgentImage:
Expand Down Expand Up @@ -288,6 +290,8 @@ spec:
type: string
edpmLogrotateCrondImage:
type: string
edpmMultipathdImage:
type: string
edpmNeutronMetadataAgentImage:
type: string
edpmNeutronSriovAgentImage:
Expand Down Expand Up @@ -446,6 +450,8 @@ spec:
type: string
edpmLogrotateCrondImage:
type: string
edpmMultipathdImage:
type: string
edpmNeutronMetadataAgentImage:
type: string
edpmNeutronSriovAgentImage:
Expand Down
1 change: 1 addition & 0 deletions apis/core/v1beta1/openstackversion_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ type ContainerTemplate struct {
EdpmFrrImage *string `json:"edpmFrrImage,omitempty"`
EdpmIscsidImage *string `json:"edpmIscsidImage,omitempty"`
EdpmLogrotateCrondImage *string `json:"edpmLogrotateCrondImage,omitempty"`
EdpmMultipathdImage *string `json:"edpmMultipathdImage,omitempty"`
EdpmNeutronMetadataAgentImage *string `json:"edpmNeutronMetadataAgentImage,omitempty"`
EdpmNeutronSriovAgentImage *string `json:"edpmNeutronSriovAgentImage,omitempty"`
EdpmOvnBgpAgentImage *string `json:"edpmOvnBgpAgentImage,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions apis/core/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -17297,6 +17297,8 @@ spec:
type: string
edpmLogrotateCrondImage:
type: string
edpmMultipathdImage:
type: string
edpmNeutronMetadataAgentImage:
type: string
edpmNeutronSriovAgentImage:
Expand Down
6 changes: 6 additions & 0 deletions config/crd/bases/core.openstack.org_openstackversions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ spec:
type: string
edpmLogrotateCrondImage:
type: string
edpmMultipathdImage:
type: string
edpmNeutronMetadataAgentImage:
type: string
edpmNeutronSriovAgentImage:
Expand Down Expand Up @@ -288,6 +290,8 @@ spec:
type: string
edpmLogrotateCrondImage:
type: string
edpmMultipathdImage:
type: string
edpmNeutronMetadataAgentImage:
type: string
edpmNeutronSriovAgentImage:
Expand Down Expand Up @@ -446,6 +450,8 @@ spec:
type: string
edpmLogrotateCrondImage:
type: string
edpmMultipathdImage:
type: string
edpmNeutronMetadataAgentImage:
type: string
edpmNeutronSriovAgentImage:
Expand Down
18 changes: 8 additions & 10 deletions hack/export_related_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,11 @@ export RELATED_IMAGE_DESIGNATE_UNBOUND_IMAGE_URL_DEFAULT=quay.io/tripleowallabyc
export RELATED_IMAGE_BARBICAN_API_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-barbican-api:current-podified
export RELATED_IMAGE_BARBICAN_WORKER_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-barbican-worker:current-podified
export RELATED_IMAGE_BARBICAN_KEYSTONE_LISTENER_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-barbican-keystone-listener:current-podified
export RELATED_IMAGE_OPENSTACK_EDPM_FRR_DEFAULT_IMG=quay.io/podified-antelope-centos9/openstack-frr:current-podified
export RELATED_IMAGE_OPENSTACK_EDPM_ISCSID_DEFAULT_IMG=quay.io/podified-antelope-centos9/openstack-iscsid:current-podified
export RELATED_IMAGE_OPENSTACK_EDPM_LOGROTATE_CROND_DEFAULT_IMG=quay.io/podified-antelope-centos9/openstack-cron:current-podified
export RELATED_IMAGE_OPENSTACK_EDPM_NEUTRON_METADATA_AGENT_DEFAULT_IMG=quay.io/podified-antelope-centos9/openstack-neutron-metadata-agent-ovn:current-podified
export RELATED_IMAGE_OPENSTACK_EDPM_NEUTRON_SRIOV_AGENT_DEFAULT_IMG=quay.io/podified-antelope-centos9/openstack-neutron-sriov-agent:current-podified
export RELATED_IMAGE_OPENSTACK_EDPM_OVN_BGP_AGENT_IMAGE=quay.io/podified-antelope-centos9/openstack-ovn-bgp-agent:current-podified
export RELATED_IMAGE_OPENSTACK_EDPM_CEILOMETER_COMPUTE_IMAGE=quay.io/podified-antelope-centos9/openstack-ceilometer-compute:current-podified
export RELATED_IMAGE_OPENSTACK_EDPM_CEILOMETER_IPMI_IMAGE=quay.io/podified-antelope-centos9/openstack-ceilometer-ipmi:current-podified
#NOTE: RELATED_IMAGE_OPENSTACK_EDPM_NODE_EXPORTER_IMAGE is the same as below
export RELATED_IMAGE_TELEMETRY_NODE_EXPORTER_IMAGE_URL_DEFAULT=quay.io/prometheus/node-exporter:v1.5.0
export RELATED_IMAGE_EDPM_FRR_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-frr:current-podified
export RELATED_IMAGE_EDPM_ISCSID_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-iscsid:current-podified
export RELATED_IMAGE_EDPM_LOGROTATE_CROND_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-cron:current-podified
export RELATED_IMAGE_EDPM_MULTIPATHD_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-multipathd:current-podified
export RELATED_IMAGE_EDPM_NEUTRON_METADATA_AGENT_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-neutron-metadata-agent-ovn:current-podified
export RELATED_IMAGE_EDPM_NEUTRON_SRIOV_AGENT_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-neutron-sriov-agent:current-podified
export RELATED_IMAGE_EDPM_OVN_BGP_AGENT_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-ovn-bgp-agent:current-podified
export RELATED_IMAGE_EDPM_NODE_EXPORTER_IMAGE_URL_DEFAULT=quay.io/prometheus/node-exporter:v1.5.0
10 changes: 1 addition & 9 deletions pkg/openstack/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@ func InitializeOpenStackVersionImageDefaults(ctx context.Context, envImages map[
}
// format API so we adhere to go linting standards
fieldName = strings.Replace(fieldName, "Api", "API", -1)
// EDPM variables have OPENSTACK prefixes we drop
if strings.Contains(fieldName, "Edpm") {
fieldName = strings.Replace(fieldName, "Openstack", "", -1)
fieldName += "Image"
}
// FIXME: RELATED_IMAGE_OPENSTACK_EDPM_OVN_BGP_AGENT_IMAGE is inconsistent with other EDPM image names
if fieldName == "EdpmOvnBgpImage" {
fieldName = "EdpmOvnBgpAgentImage"
}
}
Log.Info(fmt.Sprintf("Initialize Field name: %s", fieldName))
field := d.FieldByName(fieldName)
Expand Down Expand Up @@ -113,6 +104,7 @@ func GetContainerImages(ctx context.Context, defaults *corev1beta1.ContainerDefa
EdpmFrrImage: getImg(instance.Spec.CustomContainerImages.EdpmFrrImage, defaults.EdpmFrrImage),
EdpmIscsidImage: getImg(instance.Spec.CustomContainerImages.EdpmIscsidImage, defaults.EdpmIscsidImage),
EdpmLogrotateCrondImage: getImg(instance.Spec.CustomContainerImages.EdpmLogrotateCrondImage, defaults.EdpmLogrotateCrondImage),
EdpmMultipathdImage: getImg(instance.Spec.CustomContainerImages.EdpmMultipathdImage, defaults.EdpmMultipathdImage),
EdpmNeutronMetadataAgentImage: getImg(instance.Spec.CustomContainerImages.EdpmNeutronMetadataAgentImage, defaults.EdpmNeutronMetadataAgentImage),
EdpmNeutronSriovAgentImage: getImg(instance.Spec.CustomContainerImages.EdpmNeutronSriovAgentImage, defaults.EdpmNeutronSriovAgentImage),
EdpmOvnBgpAgentImage: getImg(instance.Spec.CustomContainerImages.EdpmOvnBgpAgentImage, defaults.EdpmOvnBgpAgentImage),
Expand Down
6 changes: 4 additions & 2 deletions tests/functional/openstackversion_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ var _ = Describe("OpenStackOperator controller", func() {
g.Expect(version.Status.ContainerImages.EdpmFrrImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.EdpmIscsidImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.EdpmLogrotateCrondImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.EdpmMultipathdImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.EdpmNeutronMetadataAgentImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.EdpmNeutronSriovAgentImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.EdpmNodeExporterImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.EdpmOvnBgpAgentImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.GlanceAPIImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.HeatAPIImage).ShouldNot(BeNil())
Expand Down Expand Up @@ -130,8 +133,7 @@ var _ = Describe("OpenStackOperator controller", func() {
g.Expect(version.Status.ContainerImages.SwiftContainerImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.SwiftObjectImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.SwiftProxyImage).ShouldNot(BeNil())
// same a RELATED_IMAGE_OPENSTACK_EDPM_NODE_EXPORTER_IMAGE
g.Expect(version.Status.ContainerImages.TelemetryNodeExporterImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.EdpmNodeExporterImage).ShouldNot(BeNil())

}, timeout, interval).Should(Succeed())
})
Expand Down

0 comments on commit 7c14614

Please sign in to comment.