| Abhay Kumar | 733f4fa | 2025-12-09 12:19:11 +0000 | [diff] [blame] | 1 | # Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | --- |
| Abhay Kumar | 2955cea | 2025-12-23 08:31:20 +0000 | [diff] [blame] | 15 | {{- if .Values.serviceMonitor.enable }} |
| Abhay Kumar | 733f4fa | 2025-12-09 12:19:11 +0000 | [diff] [blame] | 16 | apiVersion: monitoring.coreos.com/v1 |
| 17 | kind: ServiceMonitor |
| 18 | metadata: |
| 19 | annotations: |
| 20 | meta.helm.sh/release-name: "{{ .Values.fullNameOverride }}-{{ .Chart.Name }}" |
| 21 | meta.helm.sh/release-namespace: "{{ .Release.Namespace }}" |
| 22 | labels: |
| 23 | app.kubernetes.io/managed-by: {{ quote .Release.Service }} |
| 24 | app.kubernetes.io/name: "{{ .Chart.Name }}" |
| 25 | app.kubernetes.io/part-of: "voltha" |
| 26 | app.kubernetes.io/stack: "{{ .Values.global.stack_name }}" |
| 27 | app: "{{ .Chart.Name }}" |
| 28 | release: "{{ .Release.Name }}" |
| 29 | name: "{{ .Release.Name }}" |
| 30 | namespace: "{{ .Release.Namespace }}" |
| 31 | spec: |
| 32 | endpoints: |
| 33 | - interval: 15s |
| 34 | path: /metrics |
| 35 | port: promserver |
| 36 | namespaceSelector: |
| 37 | matchNames: |
| 38 | - "voltha" |
| 39 | selector: |
| 40 | matchLabels: |
| 41 | app: "{{ .Chart.Name }}" |
| 42 | release: "{{ .Release.Name }}" |
| Abhay Kumar | 2955cea | 2025-12-23 08:31:20 +0000 | [diff] [blame] | 43 | {{- end }} |
| Abhay Kumar | 733f4fa | 2025-12-09 12:19:11 +0000 | [diff] [blame] | 44 | |