improve Cilium metrics support (#6513)

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
This commit is contained in:
Arthur Outhenin-Chalandre 2020-08-18 09:35:29 +02:00 committed by GitHub
parent ef3e98807e
commit bedb411d06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 1 deletions

View file

@ -22,6 +22,7 @@ cilium_cpu_requests: 100m
cilium_tunnel_mode: vxlan
# Optional features
cilium_enable_prometheus: false
cilium_enable_hubble_metrics: false
# Enable if you want to make use of hostPort mappings
cilium_enable_portmap: false
# Monitor aggregation level (none/low/medium/maximum)

View file

@ -20,6 +20,11 @@ spec:
type: RollingUpdate
template:
metadata:
{% if cilium_enable_prometheus %}
annotations:
prometheus.io/port: "6942"
prometheus.io/scrape: "true"
{% endif %}
labels:
io.cilium/app: operator
name: cilium-operator
@ -93,6 +98,13 @@ spec:
image: "{{ cilium_operator_image_repo }}:{{ cilium_operator_image_tag }}"
imagePullPolicy: {{ k8s_image_pull_policy }}
name: cilium-operator
{% if cilium_enable_prometheus %}
ports:
- containerPort: 6942
hostPort: 6942
name: prometheus
protocol: TCP
{% endif %}
livenessProbe:
httpGet:
{% if cilium_enable_ipv4 %}

View file

@ -85,12 +85,20 @@ spec:
successThreshold: 1
timeoutSeconds: 5
name: cilium-agent
{% if cilium_enable_prometheus %}
{% if cilium_enable_prometheus or cilium_enable_hubble_metrics %}
ports:
{% endif %}
{% if cilium_enable_prometheus %}
- containerPort: 9090
hostPort: 9090
name: prometheus
protocol: TCP
{% endif %}
{% if cilium_enable_hubble_metrics %}
- containerPort: 9091
hostPort: 9091
name: hubble-metrics
protocol: TCP
{% endif %}
readinessProbe:
httpGet: