Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -17950,6 +17950,8 @@ spec:
type: string
barbicanWorkerImage:
type: string
bootcOsContainerImage:
type: string
ceilometerCentralImage:
type: string
ceilometerComputeImage:
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 @@ -58,6 +58,8 @@ spec:
type: string
barbicanWorkerImage:
type: string
bootcOsContainerImage:
type: string
ceilometerCentralImage:
type: string
ceilometerComputeImage:
Expand Down Expand Up @@ -277,6 +279,8 @@ spec:
type: string
barbicanWorkerImage:
type: string
bootcOsContainerImage:
type: string
ceilometerCentralImage:
type: string
ceilometerComputeImage:
Expand Down Expand Up @@ -461,6 +465,8 @@ spec:
type: string
barbicanWorkerImage:
type: string
bootcOsContainerImage:
type: string
ceilometerCentralImage:
type: string
ceilometerComputeImage:
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 @@ -84,6 +84,7 @@ type ContainerTemplate struct {
BarbicanAPIImage *string `json:"barbicanAPIImage,omitempty"`
BarbicanKeystoneListenerImage *string `json:"barbicanKeystoneListenerImage,omitempty"`
BarbicanWorkerImage *string `json:"barbicanWorkerImage,omitempty"`
BootcOsContainerImage *string `json:"bootcOsContainerImage,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why we would need this? Can we not leverage the same OsContainerImage for this? Having both bootc and non-bootc container images in OpenStackVersion does not look like a good design. If we expect customers to use nodesets with both bootc and non-bootc images in a deployment, they've to patch nodesets I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Rabi,

It has been 9 months since I've looked at this. But I believe the issue is that OsContainerImage refers to the image that contains the qcow2 file that's used to provision nodes with Metal3. Whereas the variable I was adding here refers specifically to the bootc container image for the OS. So for example, here:
https://github.com/openstack-k8s-operators/openstack-operator/pull/1321/files#diff-a8669e419dcd80822e0cf7a87d6d1c9444012a2a58b7df32d1d17059aee51d83R330

That Ansible variable would be used to lifecycle the OS via bootc update or bootc switch for example. You wouldn't use this variable to Provision nodes in the NodeSet via Metal3 since the image doesn't contain the qcow2 file.

I can rebase this if you want to actively discuss and pursue this. I'm not too sure how your requirements have evolved since I left, but I'm still happy to work with you on it if it's something you need.

CeilometerCentralImage *string `json:"ceilometerCentralImage,omitempty"`
CeilometerComputeImage *string `json:"ceilometerComputeImage,omitempty"`
CeilometerIpmiImage *string `json:"ceilometerIpmiImage,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.

2 changes: 2 additions & 0 deletions apis/dataplane/v1beta1/openstackdataplanenodeset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ var ContainerImageDefaults = openstackv1.ContainerImages{
AgentImage: getStrPtr("quay.io/openstack-k8s-operators/openstack-baremetal-operator-agent:current-podified"),
AnsibleeeImage: getStrPtr("quay.io/openstack-k8s-operators/openstack-ansibleee-runner:latest"),
ApacheImage: getStrPtr("registry.redhat.io/ubi9/httpd-24:latest"),
BootcOsContainerImage: getStrPtr("quay.io/openstack-k8s-operators/edpm-bootc:current-podified"),
EdpmFrrImage: getStrPtr("quay.io/podified-antelope-centos9/openstack-frr:current-podified"),
EdpmIscsidImage: getStrPtr("quay.io/podified-antelope-centos9/openstack-iscsid:current-podified"),
EdpmLogrotateCrondImage: getStrPtr("quay.io/podified-antelope-centos9/openstack-cron:current-podified"),
Expand Down Expand Up @@ -251,6 +252,7 @@ func SetupDefaults() {
AgentImage: getImageDefault("RELATED_IMAGE_AGENT_IMAGE_URL_DEFAULT", ContainerImageDefaults.AgentImage),
AnsibleeeImage: getImageDefault("RELATED_IMAGE_ANSIBLEEE_IMAGE_URL_DEFAULT", ContainerImageDefaults.AnsibleeeImage),
ApacheImage: getImageDefault("RELATED_IMAGE_APACHE_IMAGE_URL_DEFAULT", ContainerImageDefaults.ApacheImage),
BootcOsContainerImage: getImageDefault("RELATED_IMAGE_BOOTC_OS_CONTAINER_IMAGE_URL_DEFAUILT", ContainerImageDefaults.BootcOsContainerImage),
EdpmFrrImage: getImageDefault("RELATED_IMAGE_EDPM_FRR_IMAGE_URL_DEFAULT", ContainerImageDefaults.EdpmFrrImage),
EdpmIscsidImage: getImageDefault("RELATED_IMAGE_EDPM_ISCSID_IMAGE_URL_DEFAULT", ContainerImageDefaults.EdpmIscsidImage),
EdpmLogrotateCrondImage: getImageDefault("RELATED_IMAGE_EDPM_LOGROTATE_CROND_IMAGE_URL_DEFAULT", ContainerImageDefaults.EdpmLogrotateCrondImage),
Expand Down
8 changes: 8 additions & 0 deletions bindata/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18114,6 +18114,8 @@ spec:
type: string
barbicanWorkerImage:
type: string
bootcOsContainerImage:
type: string
ceilometerCentralImage:
type: string
ceilometerComputeImage:
Expand Down Expand Up @@ -19700,6 +19702,8 @@ spec:
type: string
barbicanWorkerImage:
type: string
bootcOsContainerImage:
type: string
ceilometerCentralImage:
type: string
ceilometerComputeImage:
Expand Down Expand Up @@ -19919,6 +19923,8 @@ spec:
type: string
barbicanWorkerImage:
type: string
bootcOsContainerImage:
type: string
ceilometerCentralImage:
type: string
ceilometerComputeImage:
Expand Down Expand Up @@ -20103,6 +20109,8 @@ spec:
type: string
barbicanWorkerImage:
type: string
bootcOsContainerImage:
type: string
ceilometerCentralImage:
type: string
ceilometerComputeImage:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17950,6 +17950,8 @@ spec:
type: string
barbicanWorkerImage:
type: string
bootcOsContainerImage:
type: string
ceilometerCentralImage:
type: string
ceilometerComputeImage:
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 @@ -58,6 +58,8 @@ spec:
type: string
barbicanWorkerImage:
type: string
bootcOsContainerImage:
type: string
ceilometerCentralImage:
type: string
ceilometerComputeImage:
Expand Down Expand Up @@ -277,6 +279,8 @@ spec:
type: string
barbicanWorkerImage:
type: string
bootcOsContainerImage:
type: string
ceilometerCentralImage:
type: string
ceilometerComputeImage:
Expand Down Expand Up @@ -461,6 +465,8 @@ spec:
type: string
barbicanWorkerImage:
type: string
bootcOsContainerImage:
type: string
ceilometerCentralImage:
type: string
ceilometerComputeImage:
Expand Down
1 change: 1 addition & 0 deletions hack/export_related_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export RELATED_IMAGE_DESIGNATE_UNBOUND_IMAGE_URL_DEFAULT=quay.io/podified-antelo
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_BOOTC_OS_CONTAINER_IMAGE_URL_DEFAULT=quay.io/openstack-k8s-operators/edpm-bootc:current-podified
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
Expand Down
3 changes: 3 additions & 0 deletions pkg/dataplane/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@ func resolveGroupAnsibleVars(template *dataplanev1.NodeTemplate, group *ansible.
if template.Ansible.AnsibleVars["edpm_telemetry_openstack_network_exporter_image"] == nil {
group.Vars["edpm_telemetry_openstack_network_exporter_image"] = containerImages.EdpmOpenstackNetworkExporterImage
}
if template.Ansible.AnsibleVars["edpm_bootc_os_container_image"] == nil {
group.Vars["edpm_bootc_os_container_image"] = containerImages.BootcOsContainerImage
}

err := unmarshalAnsibleVars(template.Ansible.AnsibleVars, group.Vars)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions pkg/dataplane/util/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func GetContainerImages(version *openstackv1.OpenStackVersion) openstackv1.Conta
// OpenStackVersion, use the value from there, else use the default value.
if version != nil {
containerImages.AnsibleeeImage = version.Status.ContainerImages.AnsibleeeImage
containerImages.BootcOsContainerImage = version.Status.ContainerImages.BootcOsContainerImage
containerImages.CeilometerComputeImage = version.Status.ContainerImages.CeilometerComputeImage
containerImages.CeilometerIpmiImage = version.Status.ContainerImages.CeilometerIpmiImage
containerImages.EdpmFrrImage = version.Status.ContainerImages.EdpmFrrImage
Expand All @@ -83,6 +84,7 @@ func GetContainerImages(version *openstackv1.OpenStackVersion) openstackv1.Conta
containerImages.ApacheImage = version.Status.ContainerImages.ApacheImage
} else {
containerImages.AnsibleeeImage = dataplanev1.ContainerImages.AnsibleeeImage
containerImages.BootcOsContainerImage = dataplanev1.ContainerImages.BootcOsContainerImage
containerImages.CeilometerComputeImage = dataplanev1.ContainerImages.CeilometerComputeImage
containerImages.CeilometerIpmiImage = dataplanev1.ContainerImages.CeilometerIpmiImage
containerImages.EdpmFrrImage = dataplanev1.ContainerImages.EdpmFrrImage
Expand Down
1 change: 1 addition & 0 deletions pkg/openstack/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func GetContainerImages(defaults *corev1beta1.ContainerDefaults, instance corev1
BarbicanAPIImage: getImg(instance.Spec.CustomContainerImages.BarbicanAPIImage, defaults.BarbicanAPIImage),
BarbicanKeystoneListenerImage: getImg(instance.Spec.CustomContainerImages.BarbicanKeystoneListenerImage, defaults.BarbicanKeystoneListenerImage),
BarbicanWorkerImage: getImg(instance.Spec.CustomContainerImages.BarbicanWorkerImage, defaults.BarbicanWorkerImage),
BootcOsContainerImage: getImg(instance.Spec.CustomContainerImages.BootcOsContainerImage, defaults.BootcOsContainerImage),
CeilometerCentralImage: getImg(instance.Spec.CustomContainerImages.CeilometerCentralImage, defaults.CeilometerCentralImage),
CeilometerComputeImage: getImg(instance.Spec.CustomContainerImages.CeilometerComputeImage, defaults.CeilometerComputeImage),
CeilometerIpmiImage: getImg(instance.Spec.CustomContainerImages.CeilometerIpmiImage, defaults.CeilometerIpmiImage),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ var _ = Describe("OpenStackOperator controller", func() {
g.Expect(version.Status.ContainerImages.BarbicanAPIImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.BarbicanKeystoneListenerImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.BarbicanWorkerImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.BootcOsContainerImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.CeilometerCentralImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.CeilometerComputeImage).ShouldNot(BeNil())
g.Expect(version.Status.ContainerImages.CeilometerNotificationImage).ShouldNot(BeNil())
Expand Down