Skip to content

Commit f21001f

Browse files
committed
Enable OVNController/OVSVswitchd Metrics
Depends-On: openstack-k8s-operators/ovn-operator#481 Related-Issue: https://issues.redhat.com/browse/OSPRH-12560 Signed-off-by: Yatin Karel <ykarel@redhat.com>
1 parent cf133b3 commit f21001f

9 files changed

Lines changed: 16 additions & 7 deletions

File tree

apis/bases/core.openstack.org_openstackcontrolplanes.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11781,6 +11781,9 @@ spec:
1178111781
default: random
1178211782
type: string
1178311783
type: object
11784+
metricsEnabled:
11785+
default: true
11786+
type: boolean
1178411787
networkAttachment:
1178511788
type: string
1178611789
nicMappings:

apis/go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,5 @@ replace github.com/openshift/api => github.com/openshift/api v0.0.0-202408300231
116116

117117
// custom RabbitmqClusterSpecCore for OpenStackControlplane (v2.9.0_patches_tag_n)
118118
replace github.com/rabbitmq/cluster-operator/v2 => github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20250717122149-12f70b7f3d8d //allow-merging
119+
120+
replace github.com/openstack-k8s-operators/ovn-operator/api => github.com/karelyatin/ovn-operator/api v0.0.0-20250911115953-1211c59a693f

apis/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm
6767
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
6868
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
6969
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
70+
github.com/karelyatin/ovn-operator/api v0.0.0-20250911115953-1211c59a693f h1:ZpmOUmgDEyy8RKVxloS3KoS6z73FJTSu4UtYsk9E8M4=
71+
github.com/karelyatin/ovn-operator/api v0.0.0-20250911115953-1211c59a693f/go.mod h1:K6h5wmoAsxwzq7VSItwMg36RVsexLidHNNuSfK5mbSc=
7072
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
7173
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
7274
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
@@ -130,8 +132,6 @@ github.com/openstack-k8s-operators/octavia-operator/api v0.6.1-0.20250825101633-
130132
github.com/openstack-k8s-operators/octavia-operator/api v0.6.1-0.20250825101633-a6da364cfa8e/go.mod h1:cpuJ720zrbnpvvMQLCiwnsS5RJXwHZmzLsigCRhhiIQ=
131133
github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.6.1-0.20250828035545-163d345f0ecb h1:MH2h0C65QhSmVGPMEloufuSuKLR1t193AELvtpicNwE=
132134
github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.6.1-0.20250828035545-163d345f0ecb/go.mod h1:15x01xs3dolD9G/X+V3kW2EsE4a6/Z/hFgJHcN3Yg9Y=
133-
github.com/openstack-k8s-operators/ovn-operator/api v0.6.1-0.20250905123257-bfe70a8d4538 h1:BLMcjUrh2y+u7efuvqFAWpeYyjqZbAcHPhigtnNhitU=
134-
github.com/openstack-k8s-operators/ovn-operator/api v0.6.1-0.20250905123257-bfe70a8d4538/go.mod h1:K6h5wmoAsxwzq7VSItwMg36RVsexLidHNNuSfK5mbSc=
135135
github.com/openstack-k8s-operators/placement-operator/api v0.6.1-0.20250905081434-85ee919b626c h1:thTQEtjo25kEYW+woLiPpvByMmWkI/jhh+sWokJtLN4=
136136
github.com/openstack-k8s-operators/placement-operator/api v0.6.1-0.20250905081434-85ee919b626c/go.mod h1:qs5IDS8g5krd05ts6sQ+37nP652K7bduJW90j1HMFcc=
137137
github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20250717122149-12f70b7f3d8d h1:0KCWljk2IEJ+aWNK+RiGpIdu51KPXrYA5RfyUcV4Mb4=

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11781,6 +11781,9 @@ spec:
1178111781
default: random
1178211782
type: string
1178311783
type: object
11784+
metricsEnabled:
11785+
default: true
11786+
type: boolean
1178411787
networkAttachment:
1178511788
type: string
1178611789
nicMappings:

config/operator/manager_operator_images.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ spec:
4343
value: quay.io/openstack-k8s-operators/octavia-operator@sha256:28e954bf561874e96dd9d376cdfecddb297ac0f165c733327ad55f42d68896c8
4444
- name: RELATED_IMAGE_OPENSTACK_BAREMETAL_OPERATOR_MANAGER_IMAGE_URL
4545
value: quay.io/openstack-k8s-operators/openstack-baremetal-operator@sha256:1148bd6f8ff420abb56012407628d97f287265b17b9ac81b358cdfbe6f1eb87b
46-
- name: RELATED_IMAGE_OVN_OPERATOR_MANAGER_IMAGE_URL
47-
value: quay.io/openstack-k8s-operators/ovn-operator@sha256:913f38aafcad94c46daf2eae66dfa72410aea7652ffe1f34344f5971e75e0dce
4846
- name: RELATED_IMAGE_PLACEMENT_OPERATOR_MANAGER_IMAGE_URL
4947
value: quay.io/openstack-k8s-operators/placement-operator@sha256:bd227f00edf8b53aa653270a3d15adbbc8258c3e6bf909c0cca8f4c65070548b
5048
- name: RELATED_IMAGE_RABBITMQ_CLUSTER_OPERATOR_MANAGER_IMAGE_URL

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,5 @@ replace github.com/openshift/api => github.com/openshift/api v0.0.0-202408300231
128128

129129
// custom RabbitmqClusterSpecCore for OpenStackControlplane (v2.9.0_patches_tag_n)
130130
replace github.com/rabbitmq/cluster-operator/v2 => github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20250717122149-12f70b7f3d8d //allow-merging
131+
132+
replace github.com/openstack-k8s-operators/ovn-operator/api => github.com/karelyatin/ovn-operator/api v0.0.0-20250911115953-1211c59a693f

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
7171
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
7272
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.7.7 h1:z4P744DR+PIpkjwXSEc6TvN3L6LVzmUquFgmNm8wSUc=
7373
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.7.7/go.mod h1:CM7HAH5PNuIsqjMN0fGc1ydM74Uj+0VZFhob620nklw=
74+
github.com/karelyatin/ovn-operator/api v0.0.0-20250911115953-1211c59a693f h1:ZpmOUmgDEyy8RKVxloS3KoS6z73FJTSu4UtYsk9E8M4=
75+
github.com/karelyatin/ovn-operator/api v0.0.0-20250911115953-1211c59a693f/go.mod h1:K6h5wmoAsxwzq7VSItwMg36RVsexLidHNNuSfK5mbSc=
7476
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
7577
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
7678
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
@@ -140,8 +142,6 @@ github.com/openstack-k8s-operators/octavia-operator/api v0.6.1-0.20250825101633-
140142
github.com/openstack-k8s-operators/octavia-operator/api v0.6.1-0.20250825101633-a6da364cfa8e/go.mod h1:cpuJ720zrbnpvvMQLCiwnsS5RJXwHZmzLsigCRhhiIQ=
141143
github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.6.1-0.20250828035545-163d345f0ecb h1:MH2h0C65QhSmVGPMEloufuSuKLR1t193AELvtpicNwE=
142144
github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.6.1-0.20250828035545-163d345f0ecb/go.mod h1:15x01xs3dolD9G/X+V3kW2EsE4a6/Z/hFgJHcN3Yg9Y=
143-
github.com/openstack-k8s-operators/ovn-operator/api v0.6.1-0.20250905123257-bfe70a8d4538 h1:BLMcjUrh2y+u7efuvqFAWpeYyjqZbAcHPhigtnNhitU=
144-
github.com/openstack-k8s-operators/ovn-operator/api v0.6.1-0.20250905123257-bfe70a8d4538/go.mod h1:K6h5wmoAsxwzq7VSItwMg36RVsexLidHNNuSfK5mbSc=
145145
github.com/openstack-k8s-operators/placement-operator/api v0.6.1-0.20250905081434-85ee919b626c h1:thTQEtjo25kEYW+woLiPpvByMmWkI/jhh+sWokJtLN4=
146146
github.com/openstack-k8s-operators/placement-operator/api v0.6.1-0.20250905081434-85ee919b626c/go.mod h1:qs5IDS8g5krd05ts6sQ+37nP652K7bduJW90j1HMFcc=
147147
github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20250717122149-12f70b7f3d8d h1:0KCWljk2IEJ+aWNK+RiGpIdu51KPXrYA5RfyUcV4Mb4=

hack/export_operator_related_images.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export RELATED_IMAGE_NEUTRON_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-op
1515
export RELATED_IMAGE_NOVA_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/nova-operator@sha256:1d198c76f354fb15c60111882c2cca2f8fee4d4893d1785397ed00ee879b0ab9
1616
export RELATED_IMAGE_OCTAVIA_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/octavia-operator@sha256:28e954bf561874e96dd9d376cdfecddb297ac0f165c733327ad55f42d68896c8
1717
export RELATED_IMAGE_OPENSTACK_BAREMETAL_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/openstack-baremetal-operator@sha256:1148bd6f8ff420abb56012407628d97f287265b17b9ac81b358cdfbe6f1eb87b
18-
export RELATED_IMAGE_OVN_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/ovn-operator@sha256:913f38aafcad94c46daf2eae66dfa72410aea7652ffe1f34344f5971e75e0dce
1918
export RELATED_IMAGE_PLACEMENT_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/placement-operator@sha256:bd227f00edf8b53aa653270a3d15adbbc8258c3e6bf909c0cca8f4c65070548b
2019
export RELATED_IMAGE_RABBITMQ_CLUSTER_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/rabbitmq-cluster-operator@sha256:225524223bf2a7f3a4ce95958fc9ca6fdab02745fb70374e8ff5bf1ddaceda4b
2120
export RELATED_IMAGE_SWIFT_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/swift-operator@sha256:60aecc02f350443839570b4a7c746daad0d86db91b1216d29339dad0c44e8623

pkg/openstack/ovn.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ func ReconcileOVNController(ctx context.Context, instance *corev1beta1.OpenStack
430430

431431
OVNController.Spec.OvnContainerImage = *version.Status.ContainerImages.OvnControllerImage
432432
OVNController.Spec.OvsContainerImage = *version.Status.ContainerImages.OvnControllerOvsImage
433+
OVNController.Spec.ExporterImage = *getImg(version.Status.ContainerImages.OpenstackNetworkExporterImage, &missingImageDefault)
433434

434435
err := controllerutil.SetControllerReference(helper.GetBeforeObject(), OVNController, helper.GetScheme())
435436
if err != nil {
@@ -456,6 +457,7 @@ func ReconcileOVNController(ctx context.Context, instance *corev1beta1.OpenStack
456457
Log.Info("OVN Controller ready condition is true")
457458
instance.Status.ContainerImages.OvnControllerImage = version.Status.ContainerImages.OvnControllerImage
458459
instance.Status.ContainerImages.OvnControllerOvsImage = version.Status.ContainerImages.OvnControllerOvsImage
460+
instance.Status.ContainerImages.OpenstackNetworkExporterImage = version.Status.ContainerImages.OpenstackNetworkExporterImage
459461
return true, nil
460462
} else {
461463
return false, nil

0 commit comments

Comments
 (0)