Skip to content

Commit 9085d9c

Browse files
authored
Merge branch 'openstack-k8s-operators:main' into mgirgis-dashboard
2 parents 5a6ce9e + 37e7d52 commit 9085d9c

37 files changed

+896
-208
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ Now, we proceed to run our own telemetry-operator instance:
5252
oc patch openstackcontrolplane openstack-galera-network-isolation --type='json' -p='[{"op": "replace", "path": "/spec/telemetry/enabled", "value":false}]'
5353
```
5454

55-
7.- Remove telemetry-operator from the deployments
55+
7.- Scale down telemetry-operator and openstack-operator
5656
```
57-
oc project openstack-operators
58-
oc delete csv telemetry-operator.v0.0.1
57+
oc patch csv openstack-operator.v0.0.1 --type='json' -p='[{"op": "replace", "path": "/spec/install/spec/deployments/0/spec/replicas", "value":0}]' -n openstack-operators
58+
59+
oc scale deployments/telemetry-operator-controller-manager --replicas 0 -n openstack-operators
5960
```
6061

6162
8.- Deploy custom telemetry-operator version
@@ -65,25 +66,24 @@ NOTE: If you intend to deploy a custom telemetry object *with pre-populated imag
6566
```
6667
cd telemetry-operator
6768
69+
# Only needed if API changed
6870
oc delete -f config/crd/bases/
6971
oc apply -f config/crd/bases/
7072
7173
make manifests generate
7274
OPERATOR_TEMPLATES=$PWD/templates make run-with-webhook
7375
```
7476

75-
7677
9.- Deploy Telemetry
7778

78-
There are two options, either let openstack-operator manage a telemetry object, or disable openstack-operator and manage it yourself.
79+
There are two options, either use the existing OpenStackControlPlane to manage the telemetry object, or manage it yourself.
7980

80-
9a.- To continue running openstack-operator and use a telemetry object under its control, re-enable telemetry in the oscp:
81+
9a.- To use the existing OpenStackControlPlane to manage the telemetry object, re-enable telemetry:
8182
```
8283
oc patch openstackcontrolplane openstack-galera-network-isolation --type='json' -p='[{"op": "replace", "path": "/spec/telemetry/enabled", "value":true}]'
8384
```
84-
9b - To disable openstack-operator and use a custom telemetry object
85+
9b - To use a custom telemetry object
8586
```
86-
oc scale deploy/openstack-operator-controller-manager --replicas=0 -n openstack-operators
8787
oc apply -f config/samples/telemetry_v1beta1_telemetry.yaml
8888
```
8989

api/bases/telemetry.openstack.org_ceilometers.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ spec:
185185
items:
186186
type: string
187187
type: array
188+
x-kubernetes-list-type: atomic
188189
nodeSelector:
189190
additionalProperties:
190191
type: string

api/bases/telemetry.openstack.org_metricstorages.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ spec:
1515
scope: Namespaced
1616
versions:
1717
- additionalPrinterColumns:
18+
- description: NetworkAttachments
19+
jsonPath: .status.networkAttachments
20+
name: NetworkAttachments
21+
type: string
1822
- description: Status
1923
jsonPath: .status.conditions[0].status
2024
name: Status
@@ -1299,6 +1303,13 @@ spec:
12991303
type: string
13001304
type: object
13011305
type: object
1306+
networkAttachments:
1307+
description: NetworkAttachments is a list of NetworkAttachment resource
1308+
names to expose the services to the given network
1309+
items:
1310+
type: string
1311+
type: array
1312+
x-kubernetes-list-type: atomic
13021313
prometheusTls:
13031314
description: TLS - Parameters related to the TLS
13041315
properties:
@@ -1357,6 +1368,11 @@ spec:
13571368
- type
13581369
type: object
13591370
type: array
1371+
networkAttachments:
1372+
additionalProperties:
1373+
type: string
1374+
description: NetworkAttachments status of the Prometheus pods
1375+
type: object
13601376
observedGeneration:
13611377
description: |-
13621378
ObservedGeneration - the most recent generation observed for this

api/bases/telemetry.openstack.org_telemetries.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ spec:
481481
items:
482482
type: string
483483
type: array
484+
x-kubernetes-list-type: atomic
484485
nodeSelector:
485486
additionalProperties:
486487
type: string
@@ -1868,6 +1869,13 @@ spec:
18681869
type: string
18691870
type: object
18701871
type: object
1872+
networkAttachments:
1873+
description: NetworkAttachments is a list of NetworkAttachment
1874+
resource names to expose the services to the given network
1875+
items:
1876+
type: string
1877+
type: array
1878+
x-kubernetes-list-type: atomic
18711879
prometheusTls:
18721880
description: TLS - Parameters related to the TLS
18731881
properties:

api/go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ go 1.21
55
require (
66
github.com/onsi/ginkgo/v2 v2.20.1
77
github.com/onsi/gomega v1.34.1
8-
github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20250108092548-58707fa645ce
9-
github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241216113837-d172b3ac0f4e
8+
github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20250123115751-98853871de94
9+
github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20250128130522-53b65fcdadca
1010
github.com/rhobs/observability-operator v0.3.1
11-
k8s.io/api v0.29.12
12-
k8s.io/apimachinery v0.29.12
13-
k8s.io/client-go v0.29.12
11+
k8s.io/api v0.29.13
12+
k8s.io/apimachinery v0.29.13
13+
k8s.io/client-go v0.29.13
1414
sigs.k8s.io/controller-runtime v0.17.6
1515
)
1616

@@ -66,8 +66,8 @@ require (
6666
gopkg.in/inf.v0 v0.9.1 // indirect
6767
gopkg.in/yaml.v2 v2.4.0 // indirect
6868
gopkg.in/yaml.v3 v3.0.1 // indirect
69-
k8s.io/apiextensions-apiserver v0.29.12 // indirect
70-
k8s.io/component-base v0.29.12 // indirect
69+
k8s.io/apiextensions-apiserver v0.29.13 // indirect
70+
k8s.io/component-base v0.29.13 // indirect
7171
k8s.io/klog/v2 v2.120.1 // indirect
7272
k8s.io/kube-openapi v0.0.0-20240322212309-b815d8309940 // indirect
7373
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect

api/go.sum

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ github.com/onsi/ginkgo/v2 v2.20.1 h1:YlVIbqct+ZmnEph770q9Q7NVAz4wwIiVNahee6JyUzo
7272
github.com/onsi/ginkgo/v2 v2.20.1/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI=
7373
github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=
7474
github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=
75-
github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20250108092548-58707fa645ce h1:2F25J61AF3STCfW69SSQ+ribEq0fcTShZjCbb4CA6AU=
76-
github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20250108092548-58707fa645ce/go.mod h1:TDaE7BVQvJwJGFm33R6xcPTeF8LKAnMh+a1ho+YqJHs=
77-
github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241216113837-d172b3ac0f4e h1:hf4kVQBkyG79WcHBxdQ25QrDBbGFdarebS1Tc0Xclq4=
78-
github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241216113837-d172b3ac0f4e/go.mod h1:YpNTuJhDWhbXM50O3qBkhO7M+OOyRmWkNVmJ4y3cyFs=
75+
github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20250123115751-98853871de94 h1:qOSjHqncEAJeBBCITKqq3shZMuGbDC+YBiRnGIoMnoI=
76+
github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20250123115751-98853871de94/go.mod h1:TDaE7BVQvJwJGFm33R6xcPTeF8LKAnMh+a1ho+YqJHs=
77+
github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20250128130522-53b65fcdadca h1:VzIM4LLWAJX9eDC2XvwLvaFNP7BnekNTQ9HUb6C/jbw=
78+
github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20250128130522-53b65fcdadca/go.mod h1:KxnNSUk15llkKTSq/bQEE7pnc0IMk44fxhoBRpimMa8=
7979
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
8080
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
8181
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -183,16 +183,16 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
183183
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
184184
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
185185
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
186-
k8s.io/api v0.29.12 h1:SsEEMtFupOAt3pAAtAz0PDu+54g3L5rwbSCi0xQzAJM=
187-
k8s.io/api v0.29.12/go.mod h1:QFwqOP+7LNoAG1RI3vKAFxjKSLQTCamcPzAQ0Z/Yhuk=
188-
k8s.io/apiextensions-apiserver v0.29.12 h1:xoQfYPwAzfcoH/MVuQiSPTWmFrmblvYbUMODpfYyyw8=
189-
k8s.io/apiextensions-apiserver v0.29.12/go.mod h1:L1GHiWK2bkYrZOkFtChfkVpPUh9Ogr6gmShM28Yhqk0=
190-
k8s.io/apimachinery v0.29.12 h1:k6OdfK9xaNANQvWkl1pSICJGLjB4jSuJ3gGP9hBKOhE=
191-
k8s.io/apimachinery v0.29.12/go.mod h1:i3FJVwhvSp/6n8Fl4K97PJEP8C+MM+aoDq4+ZJBf70Y=
192-
k8s.io/client-go v0.29.12 h1:PjwJXavmpAqOWBRy4U5V/g3JQBpclIHEn5dvfTfsY+w=
193-
k8s.io/client-go v0.29.12/go.mod h1:hRHG6tAKxaLVKF5SlMqgXrbqPEoUcUpJGFFrC3jU69A=
194-
k8s.io/component-base v0.29.12 h1:NuFNzBSF3Iopih6VpvYmtjpdN1MLc9PcByl60fcJ0tQ=
195-
k8s.io/component-base v0.29.12/go.mod h1:YHua3E5Lvnva6dXqGqiuRj8CxhBw7g6KgYV/dcS7LBU=
186+
k8s.io/api v0.29.13 h1:VkMIbjJw1t2VgTatg8ggzI93LOfFa8z8SzAYzXtWuEg=
187+
k8s.io/api v0.29.13/go.mod h1:fBWhXqqE25b46PZEVA2DXN2EuhNg1ZT3VRyb5JitLG8=
188+
k8s.io/apiextensions-apiserver v0.29.13 h1:3xsTohNwndx4NJjgqoi5VuBPWeG4yY4VXOF62ugXvhU=
189+
k8s.io/apiextensions-apiserver v0.29.13/go.mod h1:plxNh3qMNsiMo4svQtkVp47n+2/rwm/c8FTJYR6rikQ=
190+
k8s.io/apimachinery v0.29.13 h1:a7I4uQtlfaL+UTRGFhl8lLd2nHBR7qt+axhQLtpLYMg=
191+
k8s.io/apimachinery v0.29.13/go.mod h1:i3FJVwhvSp/6n8Fl4K97PJEP8C+MM+aoDq4+ZJBf70Y=
192+
k8s.io/client-go v0.29.13 h1:M2scR9NWGlzI2YoIxTgwx2N3OA+dXqN87zsM4tvewmA=
193+
k8s.io/client-go v0.29.13/go.mod h1:BBzF0Pr78Y8DM20j22E6tOMwTBpFaKnSnn6N0pNe4VE=
194+
k8s.io/component-base v0.29.13 h1:RbksXVzXYYYvmOCArMKIkxna5eTt6DjI4Zy/4H3JFLo=
195+
k8s.io/component-base v0.29.13/go.mod h1:pjMLwLNxDg0JvXRc69GIFUEawiZEtDzm0yAJ5+Naj9s=
196196
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
197197
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
198198
k8s.io/kube-openapi v0.0.0-20240322212309-b815d8309940 h1:qVoMaQV5t62UUvHe16Q3eb2c5HPzLHYzsi0Tu/xLndo=

api/v1beta1/ceilometer_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ type CeilometerSpecCore struct {
111111
DefaultConfigOverwrite map[string]string `json:"defaultConfigOverwrite,omitempty"`
112112

113113
// NetworkAttachmentDefinitions list of network attachment definitions the service pod gets attached to
114+
// +listType=atomic
114115
NetworkAttachmentDefinitions []string `json:"networkAttachmentDefinitions,omitempty"`
115116

116117
// Whether kube-state-metrics should be deployed

api/v1beta1/conditions.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ const (
181181
// PrometheusUnableToRemoveTLSMessage
182182
PrometheusUnableToRemoveTLSMessage = "Error occured when trying to remove TLS config: %s"
183183

184+
// PrometheusUnableToRemoveNADMessage
185+
PrometheusUnableToRemoveNADMessage = "Error occured when trying to remove NAD config: %s"
186+
184187
//
185188
// LoggingReady condition messages
186189
//

api/v1beta1/metricstorage_types.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ type MetricStorageSpec struct {
9090
// +kubebuilder:default=ctlplane
9191
DataplaneNetwork *infranetworkv1.NetNameStr `json:"dataplaneNetwork"`
9292

93+
// NetworkAttachments is a list of NetworkAttachment resource names to expose the services to the given network
94+
// +kubebuilder:validation:Optional
95+
// +listType=atomic
96+
NetworkAttachments []string `json:"networkAttachments,omitempty"`
97+
9398
// MonitoringStack allows to define a metric storage with
9499
// options supported by Red Hat
95100
// +kubebuilder:validation:Optional
@@ -127,10 +132,13 @@ type MetricStorageStatus struct {
127132
// then the controller has not processed the latest changes injected by
128133
// the openstack-operator in the top-level CR (e.g. the ContainerImage)
129134
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
135+
// NetworkAttachments status of the Prometheus pods
136+
NetworkAttachments map[string]string `json:"networkAttachments,omitempty"`
130137
}
131138

132139
//+kubebuilder:object:root=true
133140
//+kubebuilder:subresource:status
141+
//+kubebuilder:printcolumn:name="NetworkAttachments",type="string",JSONPath=".status.networkAttachments",description="NetworkAttachments"
134142
//+kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[0].status",description="Status"
135143
//+kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[0].message",description="Message"
136144

api/v1beta1/metricstorage_webhook.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func (spec *MetricStorageSpec) Default() {
5959
if *spec.DataplaneNetwork == "" {
6060
*spec.DataplaneNetwork = "ctlplane"
6161
}
62+
6263
if spec.MonitoringStack != nil {
6364
spec.MonitoringStack.Default()
6465
}

0 commit comments

Comments
 (0)