@ -37,6 +37,12 @@ This helm chart started off with components from multiple open-source projects.
|
||||
|
||||
- Grafana as the visualization frontend
|
||||
|
||||
- Service monitors
|
||||
|
||||
- Calico, _if Selected_
|
||||
|
||||
> enable calico metrics with `kubectl patch felixconfiguration default --type merge --patch '{"spec":{"prometheusMetricsEnabled": true}}'`
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
|
20
templates/Service-CalicoMetrics.yaml
Normal file
20
templates/Service-CalicoMetrics.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
{{- if eq .Values.nfc_monitoring.kubernetes.networking "calico" -}}
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: calico-metrics
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: calico-node
|
||||
spec:
|
||||
clusterIP: None
|
||||
selector:
|
||||
k8s-app: calico-node
|
||||
ports:
|
||||
- port: 9091
|
||||
name: metrics
|
||||
targetPort: 9091
|
||||
|
||||
{{- end -}}
|
36
templates/ServiceMonitor-Calico.yaml
Normal file
36
templates/ServiceMonitor-Calico.yaml
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
{{- if eq .Values.nfc_monitoring.kubernetes.networking "calico" -}}
|
||||
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: calico
|
||||
app.kubernetes.io/component: networking
|
||||
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
||||
app.kubernetes.io/version: {{ $.Chart.Version }}
|
||||
app.kubernetes.io/managed-by: {{ $.Release.Service }}
|
||||
k8s-app: calico-node
|
||||
name: calico
|
||||
namespace: kube-system
|
||||
spec:
|
||||
endpoints:
|
||||
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||
interval: 15s
|
||||
port: metrics
|
||||
relabelings:
|
||||
- action: replace
|
||||
regex: (.*)
|
||||
replacement: $1
|
||||
sourceLabels:
|
||||
- __meta_kubernetes_pod_node_name
|
||||
targetLabel: instance
|
||||
scheme: http
|
||||
# tlsConfig:
|
||||
# insecureSkipVerify: true
|
||||
jobLabel: app.kubernetes.io/name
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: calico-node
|
||||
|
||||
{{- end -}}
|
Reference in New Issue
Block a user