From 26d2e0ea06195343748fd8c3715a0e5d0d6847c1 Mon Sep 17 00:00:00 2001 From: Martin Schuppert Date: Mon, 11 Nov 2024 17:04:42 +0100 Subject: [PATCH] Use new nad.EnsureNetworksAnnotation() func to get NAD annotations For BGP setup there is the need to set the default gateway to the additional interface defined via the multus annotations. To allow this a user can configure `ipam.gateway` in the NAD. EnsureNetworksAnnotation() will override the pod network default route by reading the NAD. If `ipam.gateway` is defined and not "", it gets set on the networks annotation as the `default-route`. Jira: https://issues.redhat.com/browse/OSPRH-8680 Depends-On: https://github.com/openstack-k8s-operators/lib-common/pull/579 Signed-off-by: Martin Schuppert --- ....openstack.org_openstackcontrolplanes.yaml | 6 +- apis/go.mod | 32 ++++----- apis/go.sum | 64 ++++++++--------- ....openstack.org_openstackcontrolplanes.yaml | 6 +- config/manager/kustomization.yaml | 4 +- go.mod | 36 +++++----- go.sum | 68 +++++++++---------- main.go | 2 + pkg/dataplane/util/ansible_execution.go | 15 +++- 9 files changed, 128 insertions(+), 105 deletions(-) diff --git a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml index f2cfd8597..c10294eef 100644 --- a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -9130,7 +9130,8 @@ spec: apacheContainerImage: type: string apiTimeout: - type: string + default: 120 + type: integer customServiceConfig: default: '# add your customization here' type: string @@ -9171,6 +9172,8 @@ spec: type: object octaviaAPI: properties: + apiTimeout: + type: integer customServiceConfig: default: '# add your customization here' type: string @@ -9889,6 +9892,7 @@ spec: type: string required: - apacheContainerImage + - apiTimeout - databaseInstance - octaviaAPI - octaviaNetworkAttachment diff --git a/apis/go.mod b/apis/go.mod index 19bfdcb0b..6ceb673fd 100644 --- a/apis/go.mod +++ b/apis/go.mod @@ -7,26 +7,26 @@ require ( github.com/go-playground/validator/v10 v10.22.1 github.com/onsi/ginkgo/v2 v2.20.1 github.com/onsi/gomega v1.34.1 - github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241106125449-336a1272b72d - github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241111103512-0399189684c4 - github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241030162909-74f95be0e33d - github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241111170024-125104b7422a + github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241114094618-6febb2d8d6a4 + github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241114094619-8cd575ca0e60 + github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241114094900-9ce3c64786da + github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241114111414-1fdd7f486264 github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241112060409-5e91380094e6 - github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241111212134-2ef2b1f3a054 - github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241106062833-6ba8f6c612c7 - github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241106034332-79154efb7555 - github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241106094500-2e94eb1e34a5 - github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241104140916-71a0e9d9766d + github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241114094043-66396cca1abf + github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241114093759-47b4c2e6639e + github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114095146-fcfd1c985034 + github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991 + github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241113144931-ff1fd2dcd04a github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241104140916-71a0e9d9766d - github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241106152337-61488e9159ce + github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241114094620-1f5a15bf6a50 github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241106141725-340c4d78fef0 - github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241107080145-5c05397cec75 - github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241105105110-d4bfa598cee7 - github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241105111556-f9cd9b8eefed + github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241114104932-eae3f8cd032b + github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241114101059-b95e93394d87 + github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241114095147-1eb7c834eac3 github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241030042838-d69076bd6a9d - github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241112055839-8e8021867a0d - github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241105102056-1bd39d75b43b - github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241105002938-810e13b12918 + github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241114004031-c25a6e443b25 + github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241114101059-9566e1fd30de + github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241114094619-107d1aac9458 github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241111235825-227a5c47eff2 github.com/rabbitmq/cluster-operator/v2 v2.11.0 github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.71.0-rhobs1 // indirect diff --git a/apis/go.sum b/apis/go.sum index 66e6b73af..fb01128af 100644 --- a/apis/go.sum +++ b/apis/go.sum @@ -94,50 +94,50 @@ github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094 h1:J1wuGhVxpsHykZBa6Beb1gQ96Ptej9AE/BvwCBiRj1E= github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094/go.mod h1:CxgbWAlvu2iQB0UmKTtRu1YfepRg1/vJ64n2DlIEVz4= -github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241106125449-336a1272b72d h1:zOsc3fXEqF9YHkNDGxM2bafNkt++ENr9LOpfLqYjnFc= -github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241106125449-336a1272b72d/go.mod h1:NoS1vLy1V8aDsZzaydPzcjnjmXy5nO87BFsjiAZLlzc= -github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241111103512-0399189684c4 h1:urU2dymHz8rKvmM/st3vV40eGGoEj3cXyJKIG5sHOr8= -github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241111103512-0399189684c4/go.mod h1:PFQeZpfbTFkU4C1+Syf3Tm4ffeXo3C/pConYRr/8lIg= -github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241030162909-74f95be0e33d h1:NVePNW/Qz73/rZngQF+igybKXesJjwDDwrjhuzYfWV0= -github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241030162909-74f95be0e33d/go.mod h1:ylxf6O3dpBsem6lRdUOk7c7MVvci9Y+PgT2MzJczpQI= -github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241111170024-125104b7422a h1:jXKBnaucOBLr2t7wbNSz1iEfNVDn2iWcHZ64k1QpG1M= -github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241111170024-125104b7422a/go.mod h1:6R23oItD4Phx1gl2Tiwg8dZ9XMLqPOASJg56rQEstUc= +github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241114094618-6febb2d8d6a4 h1:vMsxll0P87Gzght042PytRTx5c71hlQLhux/peHONmk= +github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241114094618-6febb2d8d6a4/go.mod h1:Xn5DqgDkAT61fI88mBHsMfyzD4xNh0dYcSI90B3Io08= +github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241114094619-8cd575ca0e60 h1:kpojOnJkO8mC962fidyCUDwayju8U9NPkmScYfQ9dxA= +github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241114094619-8cd575ca0e60/go.mod h1:3NvCHOoCyzcZm046XctbsU/Dx+en3l8jG3nHhZyWOAA= +github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241114094900-9ce3c64786da h1:f2jFQsWopZfBoiI4mIlO7RpGRJ+QYYlfQhy9X7f5Bns= +github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241114094900-9ce3c64786da/go.mod h1:JZSzHp6f07mYkRB71xamFIPlgbFKvzIbv68ttwsEt/o= +github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241114111414-1fdd7f486264 h1:gQXtUfjK1Nj2tSBwarVUlJXEWUiYgu2ovMWEtTBvC4Y= +github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241114111414-1fdd7f486264/go.mod h1:bRqpa/WUQ7D99SAOXEPItxBobRP1oVUo93PWQukChIs= github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241112060409-5e91380094e6 h1:vxFlYgZD6jXGdGumhzyKRVgPwzBd4YxBOU0YrF9fxr8= github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241112060409-5e91380094e6/go.mod h1:+CUPkPcR8P4wpTlURPPsE9AD1uNYvvk0JsoIn5JLADM= -github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241111212134-2ef2b1f3a054 h1:klf+aTLFv0M9HDJuvCi/xJeUIRJbTV/cbqAXCmmdK08= -github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241111212134-2ef2b1f3a054/go.mod h1:K+9VJLuFNps6fsMjqEJjIP5T/F4lLgoQclG4tu4y7KA= -github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241106062833-6ba8f6c612c7 h1:2NCYi2y2n/JvpFcOCo3Lnwoy7zOl6WCMDKc82+0Acvw= -github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241106062833-6ba8f6c612c7/go.mod h1:1khEYHcLFRF0wBT7bFM7IHTmY7u3eTxwowOvNY/A3qo= -github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241106034332-79154efb7555 h1:qnd7s6aq1ZzrQUYqqToQ6TnTQnLqbW63kMPW83LeSYE= -github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241106034332-79154efb7555/go.mod h1:G2+GeBF23/YqS1KvMtoSyfxOBMa+Gj3XaahLT5OG598= -github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241106094500-2e94eb1e34a5 h1:KejIMvM/Mwb9/L3nRfCp9Zb9gZhnko3SJT4qnLEOsFI= -github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241106094500-2e94eb1e34a5/go.mod h1:3ZVAfShONGUZDenwtq8CHTf3p2CxcH1fN7J7Ff/ZSiQ= -github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241104140916-71a0e9d9766d h1:4rZOEft7IFZSzPx+QVuaRq1KEfM8MT+qBILnoa3Kf00= -github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241104140916-71a0e9d9766d/go.mod h1:YpNTuJhDWhbXM50O3qBkhO7M+OOyRmWkNVmJ4y3cyFs= +github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241114094043-66396cca1abf h1:ZNttb7z+8vPXpmqsintXxxNSP1s8PWukND2oLPepJ4w= +github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241114094043-66396cca1abf/go.mod h1:ezxV+6xd12IRKespGaDlJCUQ301yxrBlQUCEbeYQgSA= +github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241114093759-47b4c2e6639e h1:IzKbAe3kIWXi9ZyBtMLOrQY5UTytf7RrA+bFQCdoKDc= +github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241114093759-47b4c2e6639e/go.mod h1:6x5zgJJBjrOhsTtNALYrM2ecUH92kIoZbZ6w1fKHPfs= +github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114095146-fcfd1c985034 h1:PtGZ55Oq58Ivt0dBJ0YNybcBe4Pwxc8jT+NbI3QIhnE= +github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114095146-fcfd1c985034/go.mod h1:nKeZBXFCwbYxTpIW9mPs/SK+4cODkEZgs+yOytvafBo= +github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991 h1:NnE6zREsZ2bYKNdt5Ds8tNv5YOtvUpNFwy7sjzoqoKw= +github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991/go.mod h1:AZhHY6dZzGyG9iVOf1poD7pTS9c7ZG/f99Fg+GdFVEk= +github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241113144931-ff1fd2dcd04a h1:izLb1IVe6pXuQ6Y49CIAkN7yS9qe2fDptRlhxMHSYv4= +github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241113144931-ff1fd2dcd04a/go.mod h1:YpNTuJhDWhbXM50O3qBkhO7M+OOyRmWkNVmJ4y3cyFs= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.5.1-0.20241104140916-71a0e9d9766d h1:Li5NFO947jH8Oe9jZVAhHYWqDaGjBBMx2n8QIIw22GI= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.5.1-0.20241104140916-71a0e9d9766d/go.mod h1:IASoGvp5QM/tBJUd/8i8uIjj4DBnI+64Ydh4r7pmnvA= github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241104140916-71a0e9d9766d h1:6fA7kvhKRelVwNWxcMVe2d2lkN8MITY0OIudTBnmT+A= github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241104140916-71a0e9d9766d/go.mod h1:tfgBeLRqmlH/NQkLPe7396rj+t0whv2wPuMb8Ttvh8w= -github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241106152337-61488e9159ce h1:kStpSrKMy+QJFUYt0s2vK/dvkwjaHy9FG2Pb63daEW4= -github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241106152337-61488e9159ce/go.mod h1:J8OYKTCUBxCf9zMd6sGJ9/4RV+YO46dqe32da3WQ0Po= +github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241114094620-1f5a15bf6a50 h1:8KSiycyZqMQS+Sv1dPRgzUbAH4pbixF4cUjO9bbMntk= +github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241114094620-1f5a15bf6a50/go.mod h1:inYtiHx+T50vt9RlzwljnngJhwaKsxofih6BUGsioYA= github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241106141725-340c4d78fef0 h1:XrJID4tPlR1JCO7A7MPONGfVRmhgf6ktglmE1v7UlHM= github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241106141725-340c4d78fef0/go.mod h1:348EPtAdpE2LxHAH4bHdCMNP7HyX6DevwEsF9DQ0S2k= -github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241107080145-5c05397cec75 h1:VDAUUB7Qs4tvN/PIs85ohFOwRO8RWAsVGQ0zpQaOvvk= -github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241107080145-5c05397cec75/go.mod h1:O+FIhhff0RsUTR5JNtLvf8yJN2S0r5dSgSYxaX1sY4g= -github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241105105110-d4bfa598cee7 h1:ztIBhZAChwMSBQfzUgWE1zoPvxVcLuJQanTeS9z43yw= -github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241105105110-d4bfa598cee7/go.mod h1:lfMDfS0ROyH3mGnPhfdn2zus1wbhqYDIWN2tXYnnWAQ= -github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241105111556-f9cd9b8eefed h1:mpi0WpWIzFVS8nWaCpN6XHMSQ6yohzXZ4f4SAUVWrlM= -github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241105111556-f9cd9b8eefed/go.mod h1:O8z7OV48TD59UGoOg9FgOjpuNU5brIwGwQ3ObGTIdXg= +github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241114104932-eae3f8cd032b h1:JMMPYDierS4YZdG9O/50kLihPQqmDz7p72btLy7Ibew= +github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241114104932-eae3f8cd032b/go.mod h1:Kfuu3g4PSFpEowdWhbnTgSlDpsBGswQf/WU/kKQKK7s= +github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241114101059-b95e93394d87 h1:vbozzPzNz4gEzviNq8D8yNdN09XTBKX7gzTcD4ayasI= +github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241114101059-b95e93394d87/go.mod h1:330SfEZuqG3b90HopY+Hk90y0OTyPcBa0GRKPUD7BHE= +github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241114095147-1eb7c834eac3 h1:OjkvNpdJkjOak/z6qk+zvoooJQtOWsBPjWKaQa/peIQ= +github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241114095147-1eb7c834eac3/go.mod h1:3bFE3g3OCC2vtwhxDKdjV7sezTj4yFeqP0C40Z5NOEA= github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241030042838-d69076bd6a9d h1:CZUNDTMnekjZ6YqT7gvUF2tixo13VCOGpvKaWk0qQpM= github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241030042838-d69076bd6a9d/go.mod h1:G9nampuSFs/9i2Ldx3OasU6oehWchwYuhBu1qMWktMg= -github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241112055839-8e8021867a0d h1:pUWu+0BciZabf/bD2bA9AbNYU1T8Mz4qU1QmyDiu+2c= -github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241112055839-8e8021867a0d/go.mod h1:Z/cOU0EBzOscCe/s6cpvRStXLXiGFkgEU2HUfBt9Xm0= -github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241105102056-1bd39d75b43b h1:SLDOxfVQT8iI29xvFGKi1djSvJc7Uliskzh+XNpUWTk= -github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241105102056-1bd39d75b43b/go.mod h1:hWvNrnSQ2zYnrwNzHf+ZygHdmN4xYtdF584UMKQKpPI= +github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241114004031-c25a6e443b25 h1:U2i7mnDEYdIxVn3wgybEg3xm/scWugW+K32QMvtVE10= +github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241114004031-c25a6e443b25/go.mod h1:prfVDR3J1bjg+LkYfqbsq2V3Kwm9ftO7sPxfilotJSo= +github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241114101059-9566e1fd30de h1:DPSV/DNXGlevgssV0POKZqRXKels5/Y+xQ8EOtw+eHE= +github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241114101059-9566e1fd30de/go.mod h1:3XfvmllEbmTSFzX44Smpq5Ec5nzNAU+aiMgrYKwiXs4= github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20241017142550-a3524acedd49 h1:/7SnnHfGCH/dwuZFNUx54zw4cnwv2w6hjONq16aoowM= github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20241017142550-a3524acedd49/go.mod h1:6Mq2N/KtNFW20L+PQC5qkeK8R8UGadmGBXL8HDY6lcg= -github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241105002938-810e13b12918 h1:vtekTd7tg8DChMVGpeUF6ue5oT9xBmAEStDWlI2MvhU= -github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241105002938-810e13b12918/go.mod h1:+s78tiOcj0eFe6H9hQXtC5nKT+jEKyiwKLfXtoZho1o= +github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241114094619-107d1aac9458 h1:jLM1a3sClYUKfWHdZzTZI9RIpJGA+H8XQh321CbO0D0= +github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241114094619-107d1aac9458/go.mod h1:JlOTO8hnn/RCDtmZXAvnpudqv38eEFGX6nbfwEbltv8= github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241111235825-227a5c47eff2 h1:55s2O1E0I3emHpgl2vGE0B8CHyQlyASSHhi04YTRrX8= github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241111235825-227a5c47eff2/go.mod h1:5SZa4K2+zCxxulGbsTmnxlnQ1dh0ETJCWA9OhnAKZu4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= diff --git a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml index f2cfd8597..c10294eef 100644 --- a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -9130,7 +9130,8 @@ spec: apacheContainerImage: type: string apiTimeout: - type: string + default: 120 + type: integer customServiceConfig: default: '# add your customization here' type: string @@ -9171,6 +9172,8 @@ spec: type: object octaviaAPI: properties: + apiTimeout: + type: integer customServiceConfig: default: '# add your customization here' type: string @@ -9889,6 +9892,7 @@ spec: type: string required: - apacheContainerImage + - apiTimeout - databaseInstance - octaviaAPI - octaviaNetworkAttachment diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 9fa78d2b9..1116d4602 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -12,5 +12,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: quay.io/openstack-k8s-operators/openstack-operator - newTag: latest + newName: quay.io/mschuppe/openstack-operator + newTag: v0.0.19 diff --git a/go.mod b/go.mod index d7f679afc..22fa1b3da 100644 --- a/go.mod +++ b/go.mod @@ -9,35 +9,36 @@ require ( github.com/go-playground/validator/v10 v10.22.1 github.com/google/uuid v1.6.0 github.com/iancoleman/strcase v0.3.0 + github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.7.5 github.com/onsi/ginkgo/v2 v2.20.1 github.com/onsi/gomega v1.34.1 github.com/openshift/api v3.9.0+incompatible - github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241106125449-336a1272b72d - github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241111103512-0399189684c4 - github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241030162909-74f95be0e33d - github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241111170024-125104b7422a + github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241114094618-6febb2d8d6a4 + github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241114094619-8cd575ca0e60 + github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241114094900-9ce3c64786da + github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241114111414-1fdd7f486264 github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241112060409-5e91380094e6 - github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241111212134-2ef2b1f3a054 - github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241106062833-6ba8f6c612c7 - github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241106034332-79154efb7555 - github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241106094500-2e94eb1e34a5 + github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241114094043-66396cca1abf + github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241114093759-47b4c2e6639e + github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114095146-fcfd1c985034 + github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991 github.com/openstack-k8s-operators/lib-common/modules/ansible v0.5.0 github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.5.1-0.20241104140916-71a0e9d9766d - github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241104140916-71a0e9d9766d + github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241113144931-ff1fd2dcd04a github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241104140916-71a0e9d9766d github.com/openstack-k8s-operators/lib-common/modules/test v0.5.1-0.20241104140916-71a0e9d9766d - github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241106152337-61488e9159ce + github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241114094620-1f5a15bf6a50 github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241106141725-340c4d78fef0 - github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241107080145-5c05397cec75 - github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241105105110-d4bfa598cee7 - github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241105111556-f9cd9b8eefed + github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241114104932-eae3f8cd032b + github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241114101059-b95e93394d87 + github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241114095147-1eb7c834eac3 github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241030042838-d69076bd6a9d github.com/openstack-k8s-operators/openstack-operator/apis v0.0.0-20240531084739-3b4c0451297c - github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241112055839-8e8021867a0d - github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241105102056-1bd39d75b43b - github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241105002938-810e13b12918 + github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241114004031-c25a6e443b25 + github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241114101059-9566e1fd30de + github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241114094619-107d1aac9458 github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241111235825-227a5c47eff2 - github.com/openstack-k8s-operators/test-operator/api v0.5.1-0.20241111122238-28d0922e9371 + github.com/openstack-k8s-operators/test-operator/api v0.5.1-0.20241114145659-bda006a5385d github.com/rabbitmq/cluster-operator/v2 v2.11.0 go.uber.org/zap v1.27.0 golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 @@ -75,7 +76,6 @@ require ( github.com/imdario/mergo v0.3.16 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.7.5 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/metal3-io/baremetal-operator/apis v0.6.2 // indirect diff --git a/go.sum b/go.sum index be3980e03..c1a53b409 100644 --- a/go.sum +++ b/go.sum @@ -100,60 +100,60 @@ github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094 h1:J1wuGhVxpsHykZBa6Beb1gQ96Ptej9AE/BvwCBiRj1E= github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094/go.mod h1:CxgbWAlvu2iQB0UmKTtRu1YfepRg1/vJ64n2DlIEVz4= -github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241106125449-336a1272b72d h1:zOsc3fXEqF9YHkNDGxM2bafNkt++ENr9LOpfLqYjnFc= -github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241106125449-336a1272b72d/go.mod h1:NoS1vLy1V8aDsZzaydPzcjnjmXy5nO87BFsjiAZLlzc= -github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241111103512-0399189684c4 h1:urU2dymHz8rKvmM/st3vV40eGGoEj3cXyJKIG5sHOr8= -github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241111103512-0399189684c4/go.mod h1:PFQeZpfbTFkU4C1+Syf3Tm4ffeXo3C/pConYRr/8lIg= -github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241030162909-74f95be0e33d h1:NVePNW/Qz73/rZngQF+igybKXesJjwDDwrjhuzYfWV0= -github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241030162909-74f95be0e33d/go.mod h1:ylxf6O3dpBsem6lRdUOk7c7MVvci9Y+PgT2MzJczpQI= -github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241111170024-125104b7422a h1:jXKBnaucOBLr2t7wbNSz1iEfNVDn2iWcHZ64k1QpG1M= -github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241111170024-125104b7422a/go.mod h1:6R23oItD4Phx1gl2Tiwg8dZ9XMLqPOASJg56rQEstUc= +github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241114094618-6febb2d8d6a4 h1:vMsxll0P87Gzght042PytRTx5c71hlQLhux/peHONmk= +github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241114094618-6febb2d8d6a4/go.mod h1:Xn5DqgDkAT61fI88mBHsMfyzD4xNh0dYcSI90B3Io08= +github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241114094619-8cd575ca0e60 h1:kpojOnJkO8mC962fidyCUDwayju8U9NPkmScYfQ9dxA= +github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241114094619-8cd575ca0e60/go.mod h1:3NvCHOoCyzcZm046XctbsU/Dx+en3l8jG3nHhZyWOAA= +github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241114094900-9ce3c64786da h1:f2jFQsWopZfBoiI4mIlO7RpGRJ+QYYlfQhy9X7f5Bns= +github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241114094900-9ce3c64786da/go.mod h1:JZSzHp6f07mYkRB71xamFIPlgbFKvzIbv68ttwsEt/o= +github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241114111414-1fdd7f486264 h1:gQXtUfjK1Nj2tSBwarVUlJXEWUiYgu2ovMWEtTBvC4Y= +github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241114111414-1fdd7f486264/go.mod h1:bRqpa/WUQ7D99SAOXEPItxBobRP1oVUo93PWQukChIs= github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241112060409-5e91380094e6 h1:vxFlYgZD6jXGdGumhzyKRVgPwzBd4YxBOU0YrF9fxr8= github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241112060409-5e91380094e6/go.mod h1:+CUPkPcR8P4wpTlURPPsE9AD1uNYvvk0JsoIn5JLADM= -github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241111212134-2ef2b1f3a054 h1:klf+aTLFv0M9HDJuvCi/xJeUIRJbTV/cbqAXCmmdK08= -github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241111212134-2ef2b1f3a054/go.mod h1:K+9VJLuFNps6fsMjqEJjIP5T/F4lLgoQclG4tu4y7KA= -github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241106062833-6ba8f6c612c7 h1:2NCYi2y2n/JvpFcOCo3Lnwoy7zOl6WCMDKc82+0Acvw= -github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241106062833-6ba8f6c612c7/go.mod h1:1khEYHcLFRF0wBT7bFM7IHTmY7u3eTxwowOvNY/A3qo= -github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241106034332-79154efb7555 h1:qnd7s6aq1ZzrQUYqqToQ6TnTQnLqbW63kMPW83LeSYE= -github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241106034332-79154efb7555/go.mod h1:G2+GeBF23/YqS1KvMtoSyfxOBMa+Gj3XaahLT5OG598= -github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241106094500-2e94eb1e34a5 h1:KejIMvM/Mwb9/L3nRfCp9Zb9gZhnko3SJT4qnLEOsFI= -github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241106094500-2e94eb1e34a5/go.mod h1:3ZVAfShONGUZDenwtq8CHTf3p2CxcH1fN7J7Ff/ZSiQ= +github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241114094043-66396cca1abf h1:ZNttb7z+8vPXpmqsintXxxNSP1s8PWukND2oLPepJ4w= +github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241114094043-66396cca1abf/go.mod h1:ezxV+6xd12IRKespGaDlJCUQ301yxrBlQUCEbeYQgSA= +github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241114093759-47b4c2e6639e h1:IzKbAe3kIWXi9ZyBtMLOrQY5UTytf7RrA+bFQCdoKDc= +github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241114093759-47b4c2e6639e/go.mod h1:6x5zgJJBjrOhsTtNALYrM2ecUH92kIoZbZ6w1fKHPfs= +github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114095146-fcfd1c985034 h1:PtGZ55Oq58Ivt0dBJ0YNybcBe4Pwxc8jT+NbI3QIhnE= +github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114095146-fcfd1c985034/go.mod h1:nKeZBXFCwbYxTpIW9mPs/SK+4cODkEZgs+yOytvafBo= +github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991 h1:NnE6zREsZ2bYKNdt5Ds8tNv5YOtvUpNFwy7sjzoqoKw= +github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241114094330-6d9f1d45f991/go.mod h1:AZhHY6dZzGyG9iVOf1poD7pTS9c7ZG/f99Fg+GdFVEk= github.com/openstack-k8s-operators/lib-common/modules/ansible v0.5.0 h1:M6tou1UD+en6fcZtV64RPsDVdHH5up6oqtENDU8dRyE= github.com/openstack-k8s-operators/lib-common/modules/ansible v0.5.0/go.mod h1:FxA/2ChDnVKgbZAyiiRLDGZB7WMcrHlOMBZYUQGgRf0= github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.5.1-0.20241104140916-71a0e9d9766d h1:Bq8vsu4SLco9kRClcXflMk9wHEagkXr58MG9u7FmaR4= github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.5.1-0.20241104140916-71a0e9d9766d/go.mod h1:MdZhEe4ciAXJwWygYBMJCIVONZWv+MqBIp/0+LxFcS0= -github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241104140916-71a0e9d9766d h1:4rZOEft7IFZSzPx+QVuaRq1KEfM8MT+qBILnoa3Kf00= -github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241104140916-71a0e9d9766d/go.mod h1:YpNTuJhDWhbXM50O3qBkhO7M+OOyRmWkNVmJ4y3cyFs= +github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241113144931-ff1fd2dcd04a h1:izLb1IVe6pXuQ6Y49CIAkN7yS9qe2fDptRlhxMHSYv4= +github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241113144931-ff1fd2dcd04a/go.mod h1:YpNTuJhDWhbXM50O3qBkhO7M+OOyRmWkNVmJ4y3cyFs= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.5.1-0.20241104140916-71a0e9d9766d h1:Li5NFO947jH8Oe9jZVAhHYWqDaGjBBMx2n8QIIw22GI= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.5.1-0.20241104140916-71a0e9d9766d/go.mod h1:IASoGvp5QM/tBJUd/8i8uIjj4DBnI+64Ydh4r7pmnvA= github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241104140916-71a0e9d9766d h1:6fA7kvhKRelVwNWxcMVe2d2lkN8MITY0OIudTBnmT+A= github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241104140916-71a0e9d9766d/go.mod h1:tfgBeLRqmlH/NQkLPe7396rj+t0whv2wPuMb8Ttvh8w= github.com/openstack-k8s-operators/lib-common/modules/test v0.5.1-0.20241104140916-71a0e9d9766d h1:6tQArLsL+R8dNAp0Ye+fdw1KHo2c8OQwqwG7pU2bTTw= github.com/openstack-k8s-operators/lib-common/modules/test v0.5.1-0.20241104140916-71a0e9d9766d/go.mod h1:LV0jo5etIsGyINpmB37i4oWR8zU6ApIuh7fsqGGA41o= -github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241106152337-61488e9159ce h1:kStpSrKMy+QJFUYt0s2vK/dvkwjaHy9FG2Pb63daEW4= -github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241106152337-61488e9159ce/go.mod h1:J8OYKTCUBxCf9zMd6sGJ9/4RV+YO46dqe32da3WQ0Po= +github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241114094620-1f5a15bf6a50 h1:8KSiycyZqMQS+Sv1dPRgzUbAH4pbixF4cUjO9bbMntk= +github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241114094620-1f5a15bf6a50/go.mod h1:inYtiHx+T50vt9RlzwljnngJhwaKsxofih6BUGsioYA= github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241106141725-340c4d78fef0 h1:XrJID4tPlR1JCO7A7MPONGfVRmhgf6ktglmE1v7UlHM= github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241106141725-340c4d78fef0/go.mod h1:348EPtAdpE2LxHAH4bHdCMNP7HyX6DevwEsF9DQ0S2k= -github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241107080145-5c05397cec75 h1:VDAUUB7Qs4tvN/PIs85ohFOwRO8RWAsVGQ0zpQaOvvk= -github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241107080145-5c05397cec75/go.mod h1:O+FIhhff0RsUTR5JNtLvf8yJN2S0r5dSgSYxaX1sY4g= -github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241105105110-d4bfa598cee7 h1:ztIBhZAChwMSBQfzUgWE1zoPvxVcLuJQanTeS9z43yw= -github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241105105110-d4bfa598cee7/go.mod h1:lfMDfS0ROyH3mGnPhfdn2zus1wbhqYDIWN2tXYnnWAQ= -github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241105111556-f9cd9b8eefed h1:mpi0WpWIzFVS8nWaCpN6XHMSQ6yohzXZ4f4SAUVWrlM= -github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241105111556-f9cd9b8eefed/go.mod h1:O8z7OV48TD59UGoOg9FgOjpuNU5brIwGwQ3ObGTIdXg= +github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241114104932-eae3f8cd032b h1:JMMPYDierS4YZdG9O/50kLihPQqmDz7p72btLy7Ibew= +github.com/openstack-k8s-operators/neutron-operator/api v0.5.1-0.20241114104932-eae3f8cd032b/go.mod h1:Kfuu3g4PSFpEowdWhbnTgSlDpsBGswQf/WU/kKQKK7s= +github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241114101059-b95e93394d87 h1:vbozzPzNz4gEzviNq8D8yNdN09XTBKX7gzTcD4ayasI= +github.com/openstack-k8s-operators/nova-operator/api v0.5.1-0.20241114101059-b95e93394d87/go.mod h1:330SfEZuqG3b90HopY+Hk90y0OTyPcBa0GRKPUD7BHE= +github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241114095147-1eb7c834eac3 h1:OjkvNpdJkjOak/z6qk+zvoooJQtOWsBPjWKaQa/peIQ= +github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241114095147-1eb7c834eac3/go.mod h1:3bFE3g3OCC2vtwhxDKdjV7sezTj4yFeqP0C40Z5NOEA= github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241030042838-d69076bd6a9d h1:CZUNDTMnekjZ6YqT7gvUF2tixo13VCOGpvKaWk0qQpM= github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.5.1-0.20241030042838-d69076bd6a9d/go.mod h1:G9nampuSFs/9i2Ldx3OasU6oehWchwYuhBu1qMWktMg= -github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241112055839-8e8021867a0d h1:pUWu+0BciZabf/bD2bA9AbNYU1T8Mz4qU1QmyDiu+2c= -github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241112055839-8e8021867a0d/go.mod h1:Z/cOU0EBzOscCe/s6cpvRStXLXiGFkgEU2HUfBt9Xm0= -github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241105102056-1bd39d75b43b h1:SLDOxfVQT8iI29xvFGKi1djSvJc7Uliskzh+XNpUWTk= -github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241105102056-1bd39d75b43b/go.mod h1:hWvNrnSQ2zYnrwNzHf+ZygHdmN4xYtdF584UMKQKpPI= +github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241114004031-c25a6e443b25 h1:U2i7mnDEYdIxVn3wgybEg3xm/scWugW+K32QMvtVE10= +github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241114004031-c25a6e443b25/go.mod h1:prfVDR3J1bjg+LkYfqbsq2V3Kwm9ftO7sPxfilotJSo= +github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241114101059-9566e1fd30de h1:DPSV/DNXGlevgssV0POKZqRXKels5/Y+xQ8EOtw+eHE= +github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241114101059-9566e1fd30de/go.mod h1:3XfvmllEbmTSFzX44Smpq5Ec5nzNAU+aiMgrYKwiXs4= github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20241017142550-a3524acedd49 h1:/7SnnHfGCH/dwuZFNUx54zw4cnwv2w6hjONq16aoowM= github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20241017142550-a3524acedd49/go.mod h1:6Mq2N/KtNFW20L+PQC5qkeK8R8UGadmGBXL8HDY6lcg= -github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241105002938-810e13b12918 h1:vtekTd7tg8DChMVGpeUF6ue5oT9xBmAEStDWlI2MvhU= -github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241105002938-810e13b12918/go.mod h1:+s78tiOcj0eFe6H9hQXtC5nKT+jEKyiwKLfXtoZho1o= +github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241114094619-107d1aac9458 h1:jLM1a3sClYUKfWHdZzTZI9RIpJGA+H8XQh321CbO0D0= +github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241114094619-107d1aac9458/go.mod h1:JlOTO8hnn/RCDtmZXAvnpudqv38eEFGX6nbfwEbltv8= github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241111235825-227a5c47eff2 h1:55s2O1E0I3emHpgl2vGE0B8CHyQlyASSHhi04YTRrX8= github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241111235825-227a5c47eff2/go.mod h1:5SZa4K2+zCxxulGbsTmnxlnQ1dh0ETJCWA9OhnAKZu4= -github.com/openstack-k8s-operators/test-operator/api v0.5.1-0.20241111122238-28d0922e9371 h1:TVGlAyCfRtL8HrR2Sj8Uincj/i0DnC+Rl5RKjl8Of4U= -github.com/openstack-k8s-operators/test-operator/api v0.5.1-0.20241111122238-28d0922e9371/go.mod h1:wIa8zy24hrmIHPtlvZvs+tD0qK+uh2GdUjLn8vHgG2k= +github.com/openstack-k8s-operators/test-operator/api v0.5.1-0.20241114145659-bda006a5385d h1:uUmzPtCHl4Hy8lf3CbhRraqAmPq2zfJ3zwlZ7UarGlQ= +github.com/openstack-k8s-operators/test-operator/api v0.5.1-0.20241114145659-bda006a5385d/go.mod h1:nINie8YT42g1JY+GtCicdgfxsrfbx2UBz/GZl2merVg= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= diff --git a/main.go b/main.go index 01a942536..0a4151179 100644 --- a/main.go +++ b/main.go @@ -30,6 +30,7 @@ import ( _ "k8s.io/client-go/plugin/pkg/client/auth" certmgrv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + k8s_networkv1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" barbicanv1 "github.com/openstack-k8s-operators/barbican-operator/api/v1beta1" cinderv1 "github.com/openstack-k8s-operators/cinder-operator/api/v1beta1" designatev1 "github.com/openstack-k8s-operators/designate-operator/api/v1beta1" @@ -124,6 +125,7 @@ func init() { utilruntime.Must(ocp_configv1.AddToScheme(scheme)) utilruntime.Must(ocp_image.AddToScheme(scheme)) utilruntime.Must(machineconfig.AddToScheme(scheme)) + utilruntime.Must(k8s_networkv1.AddToScheme(scheme)) // +kubebuilder:scaffold:scheme } diff --git a/pkg/dataplane/util/ansible_execution.go b/pkg/dataplane/util/ansible_execution.go index 99e1aa5eb..e86b6d6d7 100644 --- a/pkg/dataplane/util/ansible_execution.go +++ b/pkg/dataplane/util/ansible_execution.go @@ -31,6 +31,7 @@ import ( apimachineryvalidation "k8s.io/apimachinery/pkg/util/validation" "sigs.k8s.io/controller-runtime/pkg/client" + networkv1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" "github.com/openstack-k8s-operators/lib-common/modules/common/helper" job "github.com/openstack-k8s-operators/lib-common/modules/common/job" nad "github.com/openstack-k8s-operators/lib-common/modules/common/networkattachment" @@ -71,7 +72,19 @@ func AnsibleExecution( } ansibleEE.NetworkAttachments = aeeSpec.NetworkAttachments - ansibleEE.Annotations, err = nad.CreateNetworksAnnotation(deployment.Namespace, ansibleEE.NetworkAttachments) + + nadList := []networkv1.NetworkAttachmentDefinition{} + for _, netAtt := range ansibleEE.NetworkAttachments { + nad, err := nad.GetNADWithName(ctx, helper, netAtt, deployment.Namespace) + if err != nil { + return err + } + + if nad != nil { + nadList = append(nadList, *nad) + } + } + ansibleEE.Annotations, err = nad.EnsureNetworksAnnotation(nadList) if err != nil { return fmt.Errorf("failed to create NetworkAttachment annotation. Error: %w", err) }