mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-23 14:39:40 -05:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
|
{{- if and .Values.agent (not .Values.preflight.enabled) .Values.prometheus.enabled }}
|
||
|
{{- if .Values.prometheus.serviceMonitor.enabled }}
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: cilium-agent
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
labels:
|
||
|
k8s-app: cilium
|
||
|
spec:
|
||
|
clusterIP: None
|
||
|
type: ClusterIP
|
||
|
selector:
|
||
|
k8s-app: cilium
|
||
|
ports:
|
||
|
- name: metrics
|
||
|
port: {{ .Values.prometheus.port }}
|
||
|
protocol: TCP
|
||
|
targetPort: prometheus
|
||
|
- name: envoy-metrics
|
||
|
port: {{ .Values.proxy.prometheus.port }}
|
||
|
protocol: TCP
|
||
|
targetPort: envoy-metrics
|
||
|
{{- else if .Values.proxy.prometheus.enabled }}
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: cilium-agent
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
annotations:
|
||
|
prometheus.io/scrape: "true"
|
||
|
prometheus.io/port: {{ .Values.proxy.prometheus.port | quote }}
|
||
|
labels:
|
||
|
k8s-app: cilium
|
||
|
spec:
|
||
|
clusterIP: None
|
||
|
type: ClusterIP
|
||
|
selector:
|
||
|
k8s-app: cilium
|
||
|
ports:
|
||
|
- name: envoy-metrics
|
||
|
port: {{ .Values.proxy.prometheus.port }}
|
||
|
protocol: TCP
|
||
|
targetPort: envoy-metrics
|
||
|
{{- end }}
|
||
|
{{- end }}
|