From 1c16a59204731eddf081949e1d8d06ec576128a5 Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Wed, 29 May 2024 19:13:12 +0530 Subject: [PATCH] Use dhcp and ovn agent images from OpenstackVersion Related-Issue: OSPRH-6639 Resolves: OSPRH-6747 Depends-On: https://github.com/openstack-k8s-operators/openstack-operator/pull/818 --- api/go.mod | 2 +- api/go.sum | 4 ++-- api/v1beta1/openstackdataplanenodeset_types.go | 4 ++++ config/default/manager_default_images.yaml | 4 ++++ go.mod | 2 +- go.sum | 4 ++-- pkg/deployment/inventory.go | 6 ++++++ pkg/util/version.go | 4 ++++ 8 files changed, 24 insertions(+), 6 deletions(-) diff --git a/api/go.mod b/api/go.mod index 8ea96e4cc..121cc688e 100644 --- a/api/go.mod +++ b/api/go.mod @@ -15,7 +15,7 @@ require ( require ( github.com/cert-manager/cert-manager v1.13.6 github.com/go-playground/validator/v10 v10.20.0 - github.com/openstack-k8s-operators/openstack-operator/apis v0.0.0-20240529001123-0d27046f8644 + github.com/openstack-k8s-operators/openstack-operator/apis v0.0.0-20240530055332-aa91068ef71b golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 ) diff --git a/api/go.sum b/api/go.sum index 79a41a726..f153a3499 100644 --- a/api/go.sum +++ b/api/go.sum @@ -122,8 +122,8 @@ github.com/openstack-k8s-operators/octavia-operator/api v0.3.1-0.20240523092718- github.com/openstack-k8s-operators/octavia-operator/api v0.3.1-0.20240523092718-22ea0a3c5100/go.mod h1:AWiNsUW/IQARQfEt0RDknT879JszjK4AOVHkjhs/Svk= github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.3.1-0.20240523005930-c332745390c8 h1:R1MeuR4dPhMop5i9Q4s0PKwqII/uzB6+sVhF9DeWk78= github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.3.1-0.20240523005930-c332745390c8/go.mod h1:z+mHw+0/ehsh5bPzeuurxY5uahRNtH1KcOkYg8Bl678= -github.com/openstack-k8s-operators/openstack-operator/apis v0.0.0-20240529001123-0d27046f8644 h1:mJ2HCYEOh7w4vMdfLYhdRQZeScx6Cqkxq9bzvgUPrrY= -github.com/openstack-k8s-operators/openstack-operator/apis v0.0.0-20240529001123-0d27046f8644/go.mod h1:4gN/mAlXB4wbt8k7xKb4MtD4iwhmfMd4GM4AM1b4Nsg= +github.com/openstack-k8s-operators/openstack-operator/apis v0.0.0-20240530055332-aa91068ef71b h1:fz/3MdTbv8RVlx4LP4dU0tKbEBE+lYs62ChsVpB2dRc= +github.com/openstack-k8s-operators/openstack-operator/apis v0.0.0-20240530055332-aa91068ef71b/go.mod h1:4gN/mAlXB4wbt8k7xKb4MtD4iwhmfMd4GM4AM1b4Nsg= github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240528144729-0bb142a7d5cd h1:T5K8z+ZMOPjl9E3zjg+ZnoiEtP3TG+OKGgIheNnInxs= github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240528144729-0bb142a7d5cd/go.mod h1:kuMvjznu0eoRWBlK6YBP6KunVeXNFteyqa2+LHErTWw= github.com/openstack-k8s-operators/placement-operator/api v0.3.1-0.20240527110305-6cee824d1cd4 h1:pcsiDNTPQHUBh2ObiOyKoFl+agx/nSVfPlAvRSUwCt8= diff --git a/api/v1beta1/openstackdataplanenodeset_types.go b/api/v1beta1/openstackdataplanenodeset_types.go index a7faec183..d86b22764 100644 --- a/api/v1beta1/openstackdataplanenodeset_types.go +++ b/api/v1beta1/openstackdataplanenodeset_types.go @@ -212,7 +212,9 @@ var ContainerImageDefaults = openstackv1.ContainerImages{ 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"), + EdpmNeutronDhcpAgentImage: getStrPtr("quay.io/podified-antelope-centos9/openstack-neutron-dhcp-agent-ovn:current-podified"), EdpmNeutronMetadataAgentImage: getStrPtr("quay.io/podified-antelope-centos9/openstack-neutron-metadata-agent-ovn:current-podified"), + EdpmNeutronOvnAgentImage: getStrPtr("quay.io/podified-antelope-centos9/openstack-neutron-ovn-agent:current-podified"), EdpmNeutronSriovAgentImage: getStrPtr("quay.io/podified-antelope-centos9/openstack-neutron-sriov-agent:current-podified"), EdpmMultipathdImage: getStrPtr("quay.io/podified-antelope-centos9/openstack-multipathd:current-podified"), NovaComputeImage: getStrPtr("quay.io/podified-antelope-centos9/openstack-nova-compute:current-podified"), @@ -240,7 +242,9 @@ func SetupDefaults() { EdpmIscsidImage: getImageDefault("RELATED_IMAGE_EDPM_ISCSID_IMAGE_URL_DEFAULT", ContainerImageDefaults.EdpmIscsidImage), EdpmLogrotateCrondImage: getImageDefault("RELATED_IMAGE_EDPM_LOGROTATE_CROND_IMAGE_URL_DEFAULT", ContainerImageDefaults.EdpmLogrotateCrondImage), EdpmMultipathdImage: getImageDefault("RELATED_IMAGE_EDPM_MULTIPATHD_IMAGE_URL_DEFAULT", ContainerImageDefaults.EdpmMultipathdImage), + EdpmNeutronDhcpAgentImage: getImageDefault("RELATED_IMAGE_EDPM_NEUTRON_DHCP_AGENT_IMAGE_URL_DEFAULT", ContainerImageDefaults.EdpmNeutronDhcpAgentImage), EdpmNeutronMetadataAgentImage: getImageDefault("RELATED_IMAGE_EDPM_NEUTRON_METADATA_AGENT_IMAGE_URL_DEFAULT", ContainerImageDefaults.EdpmNeutronMetadataAgentImage), + EdpmNeutronOvnAgentImage: getImageDefault("RELATED_IMAGE_EDPM_NEUTRON_OVN_AGENT_IMAGE_URL_DEFAULT", ContainerImageDefaults.EdpmNeutronOvnAgentImage), EdpmNeutronSriovAgentImage: getImageDefault("RELATED_IMAGE_EDPM_NEUTRON_SRIOV_AGENT_IMAGE_URL_DEFAULT", ContainerImageDefaults.EdpmNeutronSriovAgentImage), EdpmNodeExporterImage: getImageDefault("RELATED_IMAGE_EDPM_NODE_EXPORTER_IMAGE_URL_DEFAULT", ContainerImageDefaults.EdpmNodeExporterImage), EdpmOvnBgpAgentImage: getImageDefault("RELATED_IMAGE_EDPM_OVN_BGP_AGENT_IMAGE_URL_DEFAULT", ContainerImageDefaults.EdpmOvnBgpAgentImage), diff --git a/config/default/manager_default_images.yaml b/config/default/manager_default_images.yaml index ee4615467..7e9b3e6dc 100644 --- a/config/default/manager_default_images.yaml +++ b/config/default/manager_default_images.yaml @@ -19,8 +19,12 @@ spec: value: quay.io/podified-antelope-centos9/openstack-cron:current-podified - name: RELATED_IMAGE_EDPM_OVN_CONTROLLER_AGENT_IMAGE_URL_DEFAULT value: quay.io/podified-antelope-centos9/openstack-ovn-controller:current-podified + - name: RELATED_IMAGE_EDPM_NEUTRON_DHCP_AGENT_IMAGE_URL_DEFAULT + value: quay.io/podified-antelope-centos9/openstack-neutron-dhcp-agent-ovn:current-podified - name: RELATED_IMAGE_EDPM_NEUTRON_METADATA_AGENT_IMAGE_URL_DEFAULT value: quay.io/podified-antelope-centos9/openstack-neutron-metadata-agent-ovn:current-podified + - name: RELATED_IMAGE_EDPM_NEUTRON_OVN_AGENT_IMAGE_URL_DEFAULT + value: quay.io/podified-antelope-centos9/openstack-neutron-ovn-agent:current-podified - name: RELATED_IMAGE_EDPM_NEUTRON_SRIOV_AGENT_IMAGE_URL_DEFAULT value: quay.io/podified-antelope-centos9/openstack-neutron-sriov-agent:current-podified - name: RELATED_IMAGE_EDPM_OVN_BGP_AGENT_IMAGE_URL_DEFAULT diff --git a/go.mod b/go.mod index 8443eb4bf..717df919c 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/openstack-k8s-operators/lib-common/modules/test v0.3.1-0.20240529115306-9068d1417ae9 github.com/openstack-k8s-operators/openstack-ansibleee-operator/api v0.3.1-0.20240529115838-0dfe70b6ee71 github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.3.1-0.20240523005930-c332745390c8 - github.com/openstack-k8s-operators/openstack-operator/apis v0.0.0-20240529001123-0d27046f8644 + github.com/openstack-k8s-operators/openstack-operator/apis v0.0.0-20240530055332-aa91068ef71b golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.28.10 diff --git a/go.sum b/go.sum index 4a87cc37b..5dcf95f8b 100644 --- a/go.sum +++ b/go.sum @@ -138,8 +138,8 @@ github.com/openstack-k8s-operators/openstack-ansibleee-operator/api v0.3.1-0.202 github.com/openstack-k8s-operators/openstack-ansibleee-operator/api v0.3.1-0.20240529115838-0dfe70b6ee71/go.mod h1:Cq6iYl9YJ+YGbZfDARqlCTLZ8ym6YvYAG3zpcwG4wYA= github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.3.1-0.20240523005930-c332745390c8 h1:R1MeuR4dPhMop5i9Q4s0PKwqII/uzB6+sVhF9DeWk78= github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.3.1-0.20240523005930-c332745390c8/go.mod h1:z+mHw+0/ehsh5bPzeuurxY5uahRNtH1KcOkYg8Bl678= -github.com/openstack-k8s-operators/openstack-operator/apis v0.0.0-20240529001123-0d27046f8644 h1:mJ2HCYEOh7w4vMdfLYhdRQZeScx6Cqkxq9bzvgUPrrY= -github.com/openstack-k8s-operators/openstack-operator/apis v0.0.0-20240529001123-0d27046f8644/go.mod h1:4gN/mAlXB4wbt8k7xKb4MtD4iwhmfMd4GM4AM1b4Nsg= +github.com/openstack-k8s-operators/openstack-operator/apis v0.0.0-20240530055332-aa91068ef71b h1:fz/3MdTbv8RVlx4LP4dU0tKbEBE+lYs62ChsVpB2dRc= +github.com/openstack-k8s-operators/openstack-operator/apis v0.0.0-20240530055332-aa91068ef71b/go.mod h1:4gN/mAlXB4wbt8k7xKb4MtD4iwhmfMd4GM4AM1b4Nsg= github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240528144729-0bb142a7d5cd h1:T5K8z+ZMOPjl9E3zjg+ZnoiEtP3TG+OKGgIheNnInxs= github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240528144729-0bb142a7d5cd/go.mod h1:kuMvjznu0eoRWBlK6YBP6KunVeXNFteyqa2+LHErTWw= github.com/openstack-k8s-operators/placement-operator/api v0.3.1-0.20240527110305-6cee824d1cd4 h1:pcsiDNTPQHUBh2ObiOyKoFl+agx/nSVfPlAvRSUwCt8= diff --git a/pkg/deployment/inventory.go b/pkg/deployment/inventory.go index 7ddf7e948..c9c6cec6a 100644 --- a/pkg/deployment/inventory.go +++ b/pkg/deployment/inventory.go @@ -253,9 +253,15 @@ func resolveGroupAnsibleVars(template *dataplanev1.NodeTemplate, group *ansible. if template.Ansible.AnsibleVars["edpm_multipathd_image"] == nil { group.Vars["edpm_multipathd_image"] = containerImages.EdpmMultipathdImage } + if template.Ansible.AnsibleVars["edpm_neutron_dhcp_image"] == nil { + group.Vars["edpm_neutron_dhcp_image"] = containerImages.EdpmNeutronDhcpAgentImage + } if template.Ansible.AnsibleVars["edpm_neutron_metadata_agent_image"] == nil { group.Vars["edpm_neutron_metadata_agent_image"] = containerImages.EdpmNeutronMetadataAgentImage } + if template.Ansible.AnsibleVars["edpm_neutron_ovn_agent_image"] == nil { + group.Vars["edpm_neutron_ovn_agent_image"] = containerImages.EdpmNeutronOvnAgentImage + } if template.Ansible.AnsibleVars["edpm_neutron_sriov_agent_image"] == nil { group.Vars["edpm_neutron_sriov_image"] = containerImages.EdpmNeutronSriovAgentImage } diff --git a/pkg/util/version.go b/pkg/util/version.go index 07581c70c..8117fa0a6 100644 --- a/pkg/util/version.go +++ b/pkg/util/version.go @@ -68,7 +68,9 @@ func GetContainerImages(version *openstackv1.OpenStackVersion) openstackv1.Conta containerImages.EdpmIscsidImage = version.Status.ContainerImages.EdpmIscsidImage containerImages.EdpmLogrotateCrondImage = version.Status.ContainerImages.EdpmLogrotateCrondImage containerImages.EdpmMultipathdImage = version.Status.ContainerImages.EdpmMultipathdImage + containerImages.EdpmNeutronDhcpAgentImage = version.Status.ContainerImages.EdpmNeutronDhcpAgentImage containerImages.EdpmNeutronMetadataAgentImage = version.Status.ContainerImages.EdpmNeutronMetadataAgentImage + containerImages.EdpmNeutronOvnAgentImage = version.Status.ContainerImages.EdpmNeutronOvnAgentImage containerImages.EdpmNeutronSriovAgentImage = version.Status.ContainerImages.EdpmNeutronSriovAgentImage containerImages.EdpmNodeExporterImage = version.Status.ContainerImages.EdpmNodeExporterImage containerImages.EdpmOvnBgpAgentImage = version.Status.ContainerImages.EdpmOvnBgpAgentImage @@ -85,7 +87,9 @@ func GetContainerImages(version *openstackv1.OpenStackVersion) openstackv1.Conta containerImages.EdpmIscsidImage = dataplanev1.ContainerImages.EdpmIscsidImage containerImages.EdpmLogrotateCrondImage = dataplanev1.ContainerImages.EdpmLogrotateCrondImage containerImages.EdpmMultipathdImage = dataplanev1.ContainerImages.EdpmMultipathdImage + containerImages.EdpmNeutronDhcpAgentImage = dataplanev1.ContainerImages.EdpmNeutronDhcpAgentImage containerImages.EdpmNeutronMetadataAgentImage = dataplanev1.ContainerImages.EdpmNeutronMetadataAgentImage + containerImages.EdpmNeutronOvnAgentImage = dataplanev1.ContainerImages.EdpmNeutronOvnAgentImage containerImages.EdpmNeutronSriovAgentImage = dataplanev1.ContainerImages.EdpmNeutronSriovAgentImage containerImages.EdpmNodeExporterImage = dataplanev1.ContainerImages.EdpmNodeExporterImage containerImages.EdpmOvnBgpAgentImage = dataplanev1.ContainerImages.EdpmOvnBgpAgentImage