Skip to content

Commit 33b160d

Browse files
committed
Inherit top-level nodeSelector in telemetry template
1 parent a77e2c6 commit 33b160d

7 files changed

Lines changed: 34 additions & 8 deletions

File tree

apis/bases/core.openstack.org_openstackcontrolplanes.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15482,6 +15482,10 @@ spec:
1548215482
items:
1548315483
type: string
1548415484
type: array
15485+
nodeSelector:
15486+
additionalProperties:
15487+
type: string
15488+
type: object
1548515489
override:
1548615490
properties:
1548715491
service:
@@ -15576,7 +15580,6 @@ spec:
1557615580
type: object
1557715581
required:
1557815582
- databaseInstance
15579-
- memcachedInstance
1558015583
- secret
1558115584
type: object
1558215585
enabled:
@@ -15634,6 +15637,10 @@ spec:
1563415637
items:
1563515638
type: string
1563615639
type: array
15640+
nodeSelector:
15641+
additionalProperties:
15642+
type: string
15643+
type: object
1563715644
passwordSelector:
1563815645
default:
1563915646
ceilometerService: CeilometerPassword
@@ -16360,6 +16367,10 @@ spec:
1636016367
type: string
1636116368
type: object
1636216369
type: object
16370+
nodeSelector:
16371+
additionalProperties:
16372+
type: string
16373+
type: object
1636316374
type: object
1636416375
type: object
1636516376
tls:

apis/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ require (
2727
github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241121095319-a34ad51b8446
2828
github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241119131546-e4c1ba679d22
2929
github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241121093118-6ab57de4e6cc
30-
github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241118203716-9550c8740911
30+
github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241121100420-f2c8dd9aa6c3
3131
github.com/rabbitmq/cluster-operator/v2 v2.11.0
3232
github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.71.0-rhobs1 // indirect
3333
github.com/rhobs/observability-operator v0.3.1 // indirect

apis/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.2024101
138138
github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20241017142550-a3524acedd49/go.mod h1:6Mq2N/KtNFW20L+PQC5qkeK8R8UGadmGBXL8HDY6lcg=
139139
github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241121093118-6ab57de4e6cc h1:ObbwXZbbXk+PQpYPZWmisdwzQaSHv9Lyk1juBLJctnM=
140140
github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241121093118-6ab57de4e6cc/go.mod h1:JlOTO8hnn/RCDtmZXAvnpudqv38eEFGX6nbfwEbltv8=
141-
github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241118203716-9550c8740911 h1:4OysgPT+NOnOtC7dAKc9xdHLnVdEMz6JYDwFd6w3fxI=
142-
github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241118203716-9550c8740911/go.mod h1:wpC0oQUkW/a/BjgzZOEwknnKJxHY0DeAIqtAh7WNwSs=
141+
github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241121100420-f2c8dd9aa6c3 h1:w4OXa9ozND2cI155qktb7OUiRjKiw1yMLf4BQm+qs7g=
142+
github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241121100420-f2c8dd9aa6c3/go.mod h1:wpC0oQUkW/a/BjgzZOEwknnKJxHY0DeAIqtAh7WNwSs=
143143
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
144144
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
145145
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=

config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15482,6 +15482,10 @@ spec:
1548215482
items:
1548315483
type: string
1548415484
type: array
15485+
nodeSelector:
15486+
additionalProperties:
15487+
type: string
15488+
type: object
1548515489
override:
1548615490
properties:
1548715491
service:
@@ -15576,7 +15580,6 @@ spec:
1557615580
type: object
1557715581
required:
1557815582
- databaseInstance
15579-
- memcachedInstance
1558015583
- secret
1558115584
type: object
1558215585
enabled:
@@ -15634,6 +15637,10 @@ spec:
1563415637
items:
1563515638
type: string
1563615639
type: array
15640+
nodeSelector:
15641+
additionalProperties:
15642+
type: string
15643+
type: object
1563715644
passwordSelector:
1563815645
default:
1563915646
ceilometerService: CeilometerPassword
@@ -16360,6 +16367,10 @@ spec:
1636016367
type: string
1636116368
type: object
1636216369
type: object
16370+
nodeSelector:
16371+
additionalProperties:
16372+
type: string
16373+
type: object
1636316374
type: object
1636416375
type: object
1636516376
tls:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ require (
3737
github.com/openstack-k8s-operators/ovn-operator/api v0.5.1-0.20241121095319-a34ad51b8446
3838
github.com/openstack-k8s-operators/placement-operator/api v0.5.1-0.20241119131546-e4c1ba679d22
3939
github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241121093118-6ab57de4e6cc
40-
github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241118203716-9550c8740911
40+
github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241121100420-f2c8dd9aa6c3
4141
github.com/openstack-k8s-operators/test-operator/api v0.5.1-0.20241118150825-cd41d06be047
4242
github.com/rabbitmq/cluster-operator/v2 v2.11.0
4343
go.uber.org/zap v1.27.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.2024101
150150
github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20241017142550-a3524acedd49/go.mod h1:6Mq2N/KtNFW20L+PQC5qkeK8R8UGadmGBXL8HDY6lcg=
151151
github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241121093118-6ab57de4e6cc h1:ObbwXZbbXk+PQpYPZWmisdwzQaSHv9Lyk1juBLJctnM=
152152
github.com/openstack-k8s-operators/swift-operator/api v0.5.1-0.20241121093118-6ab57de4e6cc/go.mod h1:JlOTO8hnn/RCDtmZXAvnpudqv38eEFGX6nbfwEbltv8=
153-
github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241118203716-9550c8740911 h1:4OysgPT+NOnOtC7dAKc9xdHLnVdEMz6JYDwFd6w3fxI=
154-
github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241118203716-9550c8740911/go.mod h1:wpC0oQUkW/a/BjgzZOEwknnKJxHY0DeAIqtAh7WNwSs=
153+
github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241121100420-f2c8dd9aa6c3 h1:w4OXa9ozND2cI155qktb7OUiRjKiw1yMLf4BQm+qs7g=
154+
github.com/openstack-k8s-operators/telemetry-operator/api v0.5.1-0.20241121100420-f2c8dd9aa6c3/go.mod h1:wpC0oQUkW/a/BjgzZOEwknnKJxHY0DeAIqtAh7WNwSs=
155155
github.com/openstack-k8s-operators/test-operator/api v0.5.1-0.20241118150825-cd41d06be047 h1:7fq7Zl2uFWHLWc4CLvEBEuIvKLO0JYDrqBZ1wtDfBQ8=
156156
github.com/openstack-k8s-operators/test-operator/api v0.5.1-0.20241118150825-cd41d06be047/go.mod h1:+fnm5nepo//2fdEFWsGCWzjOyshRbomLTWN2ylo1PQI=
157157
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=

pkg/openstack/telemetry.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ func ReconcileTelemetry(ctx context.Context, instance *corev1beta1.OpenStackCont
5858
instance.Spec.Telemetry.Template = &telemetryv1.TelemetrySpecCore{}
5959
}
6060

61+
if instance.Spec.Telemetry.Template.NodeSelector == nil {
62+
instance.Spec.Telemetry.Template.NodeSelector = &instance.Spec.NodeSelector
63+
}
64+
6165
if err := helper.GetClient().Get(ctx, types.NamespacedName{Name: "telemetry", Namespace: instance.Namespace}, telemetry); err != nil {
6266
if !k8s_errors.IsNotFound(err) {
6367
return ctrl.Result{}, err

0 commit comments

Comments
 (0)