Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Use dhcp and ovn agent images from OpenstackVersion
Browse files Browse the repository at this point in the history
Related-Issue: OSPRH-6639
Resolves: OSPRH-6747
Depends-On: openstack-k8s-operators/openstack-operator#818
  • Loading branch information
karelyatin committed May 30, 2024
1 parent 59c96c5 commit 1c16a59
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
4 changes: 2 additions & 2 deletions api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
4 changes: 4 additions & 0 deletions api/v1beta1/openstackdataplanenodeset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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),
Expand Down
4 changes: 4 additions & 0 deletions config/default/manager_default_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
6 changes: 6 additions & 0 deletions pkg/deployment/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/util/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1c16a59

Please sign in to comment.