Skip to content

Commit

Permalink
Add nova-bigvm prometheus exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
leust committed Dec 23, 2022
1 parent ea82457 commit 550e9d6
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openstack/nova/templates/bigvm-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ spec:
resources:
{{ toYaml .Values.pod.resources.bigvm | indent 12 }}
{{- end }}
ports:
- name: bigvm-exporter
containerPort: {{ required ".Values.nova_bigvm_exporter_port" .Values.nova_bigvm_exporter_port }}
volumeMounts:
- name: etcnova
mountPath: /etc/nova
Expand Down
22 changes: 22 additions & 0 deletions openstack/nova/templates/bigvm-exporter-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.nova_bigvm_enabled -}}
kind: Service
apiVersion: v1

metadata:
name: nova-bigvm-exporter
labels:
system: openstack
type: exporter
component: nova
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: {{ required ".Values.nova_bigvm_exporter_port" .Values.nova_bigvm_exporter_port | quote }}
prometheus.io/targets: {{ required ".Values.alerts.prometheus missing" .Values.alerts.prometheus | quote }}

spec:
selector:
name: nova-bigvm
ports:
- name: bigvm-exporter
port: {{ required ".Values.nova_bigvm_exporter_port" .Values.nova_bigvm_exporter_port }}
{{- end }}
4 changes: 4 additions & 0 deletions openstack/nova/templates/etc/_nova.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ dhcp_domain = openstack.{{ required ".Values.global.region is missing" .Values.g

{{ template "utils.snippets.debug.eventlet_backdoor_ini" "nova" }}

{{- if .Values.nova_bigvm_enabled -}}
bigvm_exporter_listen_port = {{ required ".Values.nova_bigvm_exporter_port" .Values.nova_bigvm_exporter_port }}
{{- end }}

[api]
compute_link_prefix = https://{{include "nova_api_endpoint_host_public" .}}:{{.Values.global.novaApiPortPublic}}
{{- if (.Values.imageVersion | hasPrefix "rocky" | not) }}
Expand Down
1 change: 1 addition & 0 deletions openstack/nova/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ sentry:
enabled: true

nova_bigvm_enabled: true
nova_bigvm_exporter_port: 9847

pre_change_hook:
image: "sapcc/unified-kubernetes-toolbox"
Expand Down

0 comments on commit 550e9d6

Please sign in to comment.