diff --git a/deploy/charts/bottlerocket-update-operator/templates/controller-service.yaml b/deploy/charts/bottlerocket-update-operator/templates/controller-service.yaml index 17389fe0..3f253dc2 100644 --- a/deploy/charts/bottlerocket-update-operator/templates/controller-service.yaml +++ b/deploy/charts/bottlerocket-update-operator/templates/controller-service.yaml @@ -16,5 +16,6 @@ spec: ports: - port: 80 targetPort: 8080 + name: main selector: brupop.bottlerocket.aws/component: brupop-controller diff --git a/deploy/charts/bottlerocket-update-operator/templates/prometheus-serviceMonitor-apiserver.yaml b/deploy/charts/bottlerocket-update-operator/templates/prometheus-serviceMonitor-apiserver.yaml new file mode 100644 index 00000000..8ac245d5 --- /dev/null +++ b/deploy/charts/bottlerocket-update-operator/templates/prometheus-serviceMonitor-apiserver.yaml @@ -0,0 +1,22 @@ +{{- if .Values.prometheus.controller.serviceMonitor.enabled -}} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: brupop-controller + namespace: {{ .Values.namespace }} + labels: + app.kubernetes.io/component: brupop-controller + app.kubernetes.io/managed-by: brupop + app.kubernetes.io/part-of: brupop + brupop.bottlerocket.aws/component: brupop-controller +spec: + endpoints: + - port: main + namespaceSelector: + matchNames: + - {{ .Values.namespace }} + selector: + matchLabels: + brupop.bottlerocket.aws/component: brupop-controller +{{- end }} + diff --git a/deploy/charts/bottlerocket-update-operator/values.yaml b/deploy/charts/bottlerocket-update-operator/values.yaml index 9d077013..114b74e0 100644 --- a/deploy/charts/bottlerocket-update-operator/values.yaml +++ b/deploy/charts/bottlerocket-update-operator/values.yaml @@ -112,6 +112,11 @@ logging: apiserver: tracing_filter: "info" +prometheus: + controller: + serviceMonitor: + enabled: false + resources: agent: resources: