Skip to content

Commit

Permalink
Merge pull request #1193 from olliewalsh/cinder_nodeselector
Browse files Browse the repository at this point in the history
Inherit top-level nodeSelector in cinder, glance, galera, barbican, designate, heat templates
  • Loading branch information
openshift-merge-bot[bot] authored Nov 20, 2024
2 parents dfc0ead + 223f5d1 commit b2d562b
Show file tree
Hide file tree
Showing 13 changed files with 156 additions and 53 deletions.
4 changes: 0 additions & 4 deletions apis/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1828,9 +1828,6 @@ spec:
type: string
transportURLSecret:
type: string
required:
- controlNetworkName
- storageRequest
type: object
designateCentral:
properties:
Expand Down Expand Up @@ -2313,7 +2310,6 @@ spec:
- designateBackendbind9
- designateCentral
- designateMdns
- designateNetworkAttachment
- designateProducer
- designateWorker
- rabbitMqClusterName
Expand Down
12 changes: 6 additions & 6 deletions apis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ 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.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.20241118124230-6202fa6a0fee
github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241120105734-37d5a9b81262
github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241120063916-9e97663361d3
github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241120164406-c06a12f2e42c
github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241120062804-89e9fe93e886
github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241120140156-1c476cfe7c63
github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241119161147-c38568cb3fb0
github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d52a058b34a8
github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114211630-5b4dcbed9b37
github.com/openstack-k8s-operators/keystone-operator/api v0.5.1-0.20241119162247-18b741090348
github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241114091812-6dc9fd0961dc
github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241114091812-6dc9fd0961dc
github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241117150431-21b7f58d9ddf
github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241106141725-340c4d78fef0
github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241120160542-4b457715f74e
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.20241119125634-42b7b8417b48
github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241115111947-2336829c2d73
Expand Down
24 changes: 12 additions & 12 deletions apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ 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.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.20241118124230-6202fa6a0fee h1:bQzR5hdF/5KN/HVD73i0vrQSlsdBCg1eOXfKeJtXfTE=
github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241118124230-6202fa6a0fee/go.mod h1:PuXjq4bV3/mYo4OAD/4tTon0N7E9YYXZHWiZLeZFVek=
github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241120105734-37d5a9b81262 h1:mV28IEmhMfUa5SZuPrEu7mV7Z5AzkYHwyxn4oh+sqHg=
github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241120105734-37d5a9b81262/go.mod h1:Xn5DqgDkAT61fI88mBHsMfyzD4xNh0dYcSI90B3Io08=
github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241120063916-9e97663361d3 h1:oIlRFU4i2OTxUC3gH88KdwtihbQbSS6deNUpaqSSC6M=
github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241120063916-9e97663361d3/go.mod h1:3NvCHOoCyzcZm046XctbsU/Dx+en3l8jG3nHhZyWOAA=
github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241120164406-c06a12f2e42c h1:aGUTBPEVTMvmmdOMJRcd8Zh6lvqqb0HWNGy0mZ10BgM=
github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241120164406-c06a12f2e42c/go.mod h1:JZSzHp6f07mYkRB71xamFIPlgbFKvzIbv68ttwsEt/o=
github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241120062804-89e9fe93e886 h1:mlm90ig3R4iznmPFJ3ROgKNkWb3LNcf2lmIET1hEOdA=
github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241120062804-89e9fe93e886/go.mod h1:mzdn8Y/XF/4nP2/Il8fk0n8ZdwIS5EuZms+IbRkqJ4I=
github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241120140156-1c476cfe7c63 h1:j1RGGbbvCkW2X9VHRb4ItNozIEMJpBn5S0gGEgdPNQc=
github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241120140156-1c476cfe7c63/go.mod h1:PuXjq4bV3/mYo4OAD/4tTon0N7E9YYXZHWiZLeZFVek=
github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241119161147-c38568cb3fb0 h1:YtC+hqGKx9M8B6fHgA1eFlq1yjEiOWwp1zZqyFtjSbA=
github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241119161147-c38568cb3fb0/go.mod h1:ezxV+6xd12IRKespGaDlJCUQ301yxrBlQUCEbeYQgSA=
github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d52a058b34a8 h1:mmnunGX3tnIT4ErxFjYcKb38VLjnfe9JcIcU9LaW9rE=
Expand All @@ -120,8 +120,8 @@ github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.202411140
github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241114091812-6dc9fd0961dc/go.mod h1:tfgBeLRqmlH/NQkLPe7396rj+t0whv2wPuMb8Ttvh8w=
github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241117150431-21b7f58d9ddf h1:UsAefjZBqFl0dYMg/efe75ECm8cAwc/2FCEBPYjQfIY=
github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241117150431-21b7f58d9ddf/go.mod h1:0/qgnjufYIqe439/3aUU/cwnjDwdUlNR3jnRubLTD5o=
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/mariadb-operator/api v0.5.1-0.20241120160542-4b457715f74e h1:id6qqUWUMo0h7LoIhjQlMIjy4iihoBCi7Pe/jWjKHcY=
github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241120160542-4b457715f74e/go.mod h1:348EPtAdpE2LxHAH4bHdCMNP7HyX6DevwEsF9DQ0S2k=
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.20241119125634-42b7b8417b48 h1:eCvn/lCMqWTvlN74nFr7nG2EvZdvJPdSR9Ts2eTaM6c=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1828,9 +1828,6 @@ spec:
type: string
transportURLSecret:
type: string
required:
- controlNetworkName
- storageRequest
type: object
designateCentral:
properties:
Expand Down Expand Up @@ -2313,7 +2310,6 @@ spec:
- designateBackendbind9
- designateCentral
- designateMdns
- designateNetworkAttachment
- designateProducer
- designateWorker
- rabbitMqClusterName
Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ require (
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.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.20241118124230-6202fa6a0fee
github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241120105734-37d5a9b81262
github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241120063916-9e97663361d3
github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241120164406-c06a12f2e42c
github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241120062804-89e9fe93e886
github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241120140156-1c476cfe7c63
github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241119161147-c38568cb3fb0
github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d52a058b34a8
github.com/openstack-k8s-operators/ironic-operator/api v0.5.1-0.20241114211630-5b4dcbed9b37
Expand All @@ -28,7 +28,7 @@ require (
github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241114091812-6dc9fd0961dc
github.com/openstack-k8s-operators/lib-common/modules/test v0.5.1-0.20241114091812-6dc9fd0961dc
github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241117150431-21b7f58d9ddf
github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241106141725-340c4d78fef0
github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241120160542-4b457715f74e
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.20241119125634-42b7b8417b48
github.com/openstack-k8s-operators/octavia-operator/api v0.5.1-0.20241115111947-2336829c2d73
Expand Down
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,16 @@ 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.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.20241118124230-6202fa6a0fee h1:bQzR5hdF/5KN/HVD73i0vrQSlsdBCg1eOXfKeJtXfTE=
github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241118124230-6202fa6a0fee/go.mod h1:PuXjq4bV3/mYo4OAD/4tTon0N7E9YYXZHWiZLeZFVek=
github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241120105734-37d5a9b81262 h1:mV28IEmhMfUa5SZuPrEu7mV7Z5AzkYHwyxn4oh+sqHg=
github.com/openstack-k8s-operators/barbican-operator/api v0.5.1-0.20241120105734-37d5a9b81262/go.mod h1:Xn5DqgDkAT61fI88mBHsMfyzD4xNh0dYcSI90B3Io08=
github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241120063916-9e97663361d3 h1:oIlRFU4i2OTxUC3gH88KdwtihbQbSS6deNUpaqSSC6M=
github.com/openstack-k8s-operators/cinder-operator/api v0.5.1-0.20241120063916-9e97663361d3/go.mod h1:3NvCHOoCyzcZm046XctbsU/Dx+en3l8jG3nHhZyWOAA=
github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241120164406-c06a12f2e42c h1:aGUTBPEVTMvmmdOMJRcd8Zh6lvqqb0HWNGy0mZ10BgM=
github.com/openstack-k8s-operators/designate-operator/api v0.5.1-0.20241120164406-c06a12f2e42c/go.mod h1:JZSzHp6f07mYkRB71xamFIPlgbFKvzIbv68ttwsEt/o=
github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241120062804-89e9fe93e886 h1:mlm90ig3R4iznmPFJ3ROgKNkWb3LNcf2lmIET1hEOdA=
github.com/openstack-k8s-operators/glance-operator/api v0.5.1-0.20241120062804-89e9fe93e886/go.mod h1:mzdn8Y/XF/4nP2/Il8fk0n8ZdwIS5EuZms+IbRkqJ4I=
github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241120140156-1c476cfe7c63 h1:j1RGGbbvCkW2X9VHRb4ItNozIEMJpBn5S0gGEgdPNQc=
github.com/openstack-k8s-operators/heat-operator/api v0.5.1-0.20241120140156-1c476cfe7c63/go.mod h1:PuXjq4bV3/mYo4OAD/4tTon0N7E9YYXZHWiZLeZFVek=
github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241119161147-c38568cb3fb0 h1:YtC+hqGKx9M8B6fHgA1eFlq1yjEiOWwp1zZqyFtjSbA=
github.com/openstack-k8s-operators/horizon-operator/api v0.5.1-0.20241119161147-c38568cb3fb0/go.mod h1:ezxV+6xd12IRKespGaDlJCUQ301yxrBlQUCEbeYQgSA=
github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20241118112815-d52a058b34a8 h1:mmnunGX3tnIT4ErxFjYcKb38VLjnfe9JcIcU9LaW9rE=
Expand All @@ -132,8 +132,8 @@ github.com/openstack-k8s-operators/lib-common/modules/test v0.5.1-0.202411140918
github.com/openstack-k8s-operators/lib-common/modules/test v0.5.1-0.20241114091812-6dc9fd0961dc/go.mod h1:LV0jo5etIsGyINpmB37i4oWR8zU6ApIuh7fsqGGA41o=
github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241117150431-21b7f58d9ddf h1:UsAefjZBqFl0dYMg/efe75ECm8cAwc/2FCEBPYjQfIY=
github.com/openstack-k8s-operators/manila-operator/api v0.5.1-0.20241117150431-21b7f58d9ddf/go.mod h1:0/qgnjufYIqe439/3aUU/cwnjDwdUlNR3jnRubLTD5o=
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/mariadb-operator/api v0.5.1-0.20241120160542-4b457715f74e h1:id6qqUWUMo0h7LoIhjQlMIjy4iihoBCi7Pe/jWjKHcY=
github.com/openstack-k8s-operators/mariadb-operator/api v0.5.1-0.20241120160542-4b457715f74e/go.mod h1:348EPtAdpE2LxHAH4bHdCMNP7HyX6DevwEsF9DQ0S2k=
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.20241119125634-42b7b8417b48 h1:eCvn/lCMqWTvlN74nFr7nG2EvZdvJPdSR9Ts2eTaM6c=
Expand Down
7 changes: 4 additions & 3 deletions pkg/openstack/barbican.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ func ReconcileBarbican(ctx context.Context, instance *corev1beta1.OpenStackContr
instance.Spec.Barbican.Template.BarbicanAPI.TLS.API.Internal.SecretName = endpointDetails.GetEndptCertSecret(service.EndpointInternal)
}

if instance.Spec.Barbican.Template.NodeSelector == nil {
instance.Spec.Barbican.Template.NodeSelector = &instance.Spec.NodeSelector
}

helper.GetLogger().Info("Reconciling Barbican", "Barbican.Namespace", instance.Namespace, "Barbican.Name", "barbican")
op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), barbican, func() error {
instance.Spec.Barbican.Template.BarbicanSpecBase.DeepCopyInto(&barbican.Spec.BarbicanSpecBase)
Expand All @@ -120,9 +124,6 @@ func ReconcileBarbican(ctx context.Context, instance *corev1beta1.OpenStackContr
if barbican.Spec.Secret == "" {
barbican.Spec.Secret = instance.Spec.Secret
}
if barbican.Spec.NodeSelector == nil && instance.Spec.NodeSelector != nil {
barbican.Spec.NodeSelector = instance.Spec.NodeSelector
}
if barbican.Spec.DatabaseInstance == "" {
// barbican.Spec.DatabaseInstance = instance.Name // name of MariaDB we create here
barbican.Spec.DatabaseInstance = "openstack" // FIXME: see above
Expand Down
7 changes: 4 additions & 3 deletions pkg/openstack/cinder.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ func ReconcileCinder(ctx context.Context, instance *corev1beta1.OpenStackControl
instance.Spec.Cinder.Template.CinderAPI.TLS.API.Internal.SecretName = endpointDetails.GetEndptCertSecret(service.EndpointInternal)
}

if instance.Spec.Cinder.Template.NodeSelector == nil {
instance.Spec.Cinder.Template.NodeSelector = &instance.Spec.NodeSelector
}

Log.Info("Reconciling Cinder", "Cinder.Namespace", instance.Namespace, "Cinder.Name", cinderName)
op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), cinder, func() error {
instance.Spec.Cinder.Template.CinderSpecBase.DeepCopyInto(&cinder.Spec.CinderSpecBase)
Expand Down Expand Up @@ -151,9 +155,6 @@ func ReconcileCinder(ctx context.Context, instance *corev1beta1.OpenStackControl
if cinder.Spec.Secret == "" {
cinder.Spec.Secret = instance.Spec.Secret
}
if cinder.Spec.NodeSelector == nil && instance.Spec.NodeSelector != nil {
cinder.Spec.NodeSelector = instance.Spec.NodeSelector
}
if cinder.Spec.DatabaseInstance == "" {
//cinder.Spec.DatabaseInstance = instance.Name // name of MariaDB we create here
cinder.Spec.DatabaseInstance = "openstack" //FIXME: see above
Expand Down
7 changes: 4 additions & 3 deletions pkg/openstack/designate.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ func ReconcileDesignate(ctx context.Context, instance *corev1beta1.OpenStackCont
instance.Spec.Designate.Template.DesignateAPI.TLS.API.Internal.SecretName = endpointDetails.GetEndptCertSecret(service.EndpointInternal)
}

if instance.Spec.Designate.Template.NodeSelector == nil {
instance.Spec.Designate.Template.NodeSelector = &instance.Spec.NodeSelector
}

helper.GetLogger().Info("Reconciling Designate", "Designate.Namespace", instance.Namespace, "Designate.Name", "designate")
op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), designate, func() error {
// FIXME: the designate structs need some rework (images should be at the top level, not in the sub structs)
Expand Down Expand Up @@ -143,9 +147,6 @@ func ReconcileDesignate(ctx context.Context, instance *corev1beta1.OpenStackCont
if designate.Spec.Secret == "" {
designate.Spec.Secret = instance.Spec.Secret
}
if designate.Spec.NodeSelector == nil && instance.Spec.NodeSelector != nil {
designate.Spec.NodeSelector = instance.Spec.NodeSelector
}
if designate.Spec.DatabaseInstance == "" {
//designate.Spec.DatabaseInstance = instance.Name // name of MariaDB we create here
designate.Spec.DatabaseInstance = "openstack" //FIXME: see above
Expand Down
Loading

0 comments on commit b2d562b

Please sign in to comment.