Skip to content

Commit

Permalink
Merge pull request #123 from projectsyn/feat/hubble-metrics
Browse files Browse the repository at this point in the history
Enable some hubble metrics by default
  • Loading branch information
HappyTetrahedron authored Jul 11, 2024
2 parents f89cb0c + 53c53f4 commit d8af06e
Show file tree
Hide file tree
Showing 22 changed files with 279 additions and 0 deletions.
7 changes: 7 additions & 0 deletions class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ parameters:
endpointRoutes:
enabled: true
hubble:
metrics:
enabled:
- 'httpV2:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity'
- 'dns:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity'
- 'drop:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity'
serviceMonitor:
enabled: true
relay:
enabled: true
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ spec:
hostPort: 9964
name: envoy-metrics
protocol: TCP
- containerPort: 9965
hostPort: 9965
name: hubble-metrics
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ data:
enable-health-check-nodeport: 'true'
enable-health-checking: 'true'
enable-hubble: 'true'
enable-hubble-open-metrics: 'false'
enable-ipv4: 'true'
enable-ipv4-big-tcp: 'false'
enable-ipv4-masquerade: 'true'
Expand All @@ -59,6 +60,10 @@ data:
hubble-export-file-max-backups: '5'
hubble-export-file-max-size-mb: '10'
hubble-listen-address: :4244
hubble-metrics: httpV2:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity
dns:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity
drop:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity
hubble-metrics-server: :9965
hubble-socket-path: /var/run/cilium/hubble.sock
identity-allocation-mode: crd
identity-gc-interval: 15m0s
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
annotations: null
labels:
app.kubernetes.io/name: hubble
app.kubernetes.io/part-of: cilium
k8s-app: hubble
name: hubble-metrics
namespace: cilium
spec:
clusterIP: None
ports:
- name: hubble-metrics
port: 9965
protocol: TCP
targetPort: hubble-metrics
selector:
k8s-app: cilium
type: ClusterIP
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app.kubernetes.io/part-of: cilium
name: hubble
namespace: cilium
spec:
endpoints:
- honorLabels: true
interval: 10s
path: /metrics
port: hubble-metrics
relabelings:
- replacement: ${1}
sourceLabels:
- __meta_kubernetes_pod_node_name
targetLabel: node
namespaceSelector:
matchNames:
- cilium
selector:
matchLabels:
k8s-app: hubble
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ spec:
hostPort: 9964
name: envoy-metrics
protocol: TCP
- containerPort: 9965
hostPort: 9965
name: hubble-metrics
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ data:
enable-health-check-nodeport: 'true'
enable-health-checking: 'true'
enable-hubble: 'true'
enable-hubble-open-metrics: 'false'
enable-ipv4: 'true'
enable-ipv4-big-tcp: 'false'
enable-ipv4-masquerade: 'true'
Expand All @@ -58,6 +59,10 @@ data:
hubble-export-file-max-backups: '5'
hubble-export-file-max-size-mb: '10'
hubble-listen-address: :4244
hubble-metrics: httpV2:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity
dns:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity
drop:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity
hubble-metrics-server: :9965
hubble-socket-path: /var/run/cilium/hubble.sock
identity-allocation-mode: crd
identity-gc-interval: 15m0s
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
annotations: null
labels:
app.kubernetes.io/name: hubble
app.kubernetes.io/part-of: cilium
k8s-app: hubble
name: hubble-metrics
namespace: cilium
spec:
clusterIP: None
ports:
- name: hubble-metrics
port: 9965
protocol: TCP
targetPort: hubble-metrics
selector:
k8s-app: cilium
type: ClusterIP
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app.kubernetes.io/part-of: cilium
name: hubble
namespace: cilium
spec:
endpoints:
- honorLabels: true
interval: 10s
path: /metrics
port: hubble-metrics
relabelings:
- replacement: ${1}
sourceLabels:
- __meta_kubernetes_pod_node_name
targetLabel: node
namespaceSelector:
matchNames:
- cilium
selector:
matchLabels:
k8s-app: hubble
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ spec:
hostPort: 9964
name: envoy-metrics
protocol: TCP
- containerPort: 9965
hostPort: 9965
name: hubble-metrics
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ data:
enable-health-check-nodeport: 'true'
enable-health-checking: 'true'
enable-hubble: 'true'
enable-hubble-open-metrics: 'false'
enable-ipv4: 'true'
enable-ipv4-big-tcp: 'false'
enable-ipv4-egress-gateway: 'true'
Expand All @@ -59,6 +60,10 @@ data:
hubble-export-file-max-backups: '5'
hubble-export-file-max-size-mb: '10'
hubble-listen-address: :4244
hubble-metrics: httpV2:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity
dns:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity
drop:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity
hubble-metrics-server: :9965
hubble-socket-path: /var/run/cilium/hubble.sock
identity-allocation-mode: crd
identity-gc-interval: 15m0s
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
annotations: null
labels:
app.kubernetes.io/name: hubble
app.kubernetes.io/part-of: cilium
k8s-app: hubble
name: hubble-metrics
namespace: cilium
spec:
clusterIP: None
ports:
- name: hubble-metrics
port: 9965
protocol: TCP
targetPort: hubble-metrics
selector:
k8s-app: cilium
type: ClusterIP
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app.kubernetes.io/part-of: cilium
name: hubble
namespace: cilium
spec:
endpoints:
- honorLabels: true
interval: 10s
path: /metrics
port: hubble-metrics
relabelings:
- replacement: ${1}
sourceLabels:
- __meta_kubernetes_pod_node_name
targetLabel: node
namespaceSelector:
matchNames:
- cilium
selector:
matchLabels:
k8s-app: hubble
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ spec:
hostPort: 9964
name: envoy-metrics
protocol: TCP
- containerPort: 9965
hostPort: 9965
name: hubble-metrics
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ data:
enable-health-check-nodeport: 'true'
enable-health-checking: 'true'
enable-hubble: 'true'
enable-hubble-open-metrics: 'false'
enable-ipv4: 'true'
enable-ipv4-big-tcp: 'false'
enable-ipv4-masquerade: 'true'
Expand All @@ -58,6 +59,10 @@ data:
hubble-export-file-max-backups: '5'
hubble-export-file-max-size-mb: '10'
hubble-listen-address: :4244
hubble-metrics: httpV2:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity
dns:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity
drop:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity
hubble-metrics-server: :9965
hubble-socket-path: /var/run/cilium/hubble.sock
identity-allocation-mode: crd
identity-gc-interval: 15m0s
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
annotations: null
labels:
app.kubernetes.io/name: hubble
app.kubernetes.io/part-of: cilium
k8s-app: hubble
name: hubble-metrics
namespace: cilium
spec:
clusterIP: None
ports:
- name: hubble-metrics
port: 9965
protocol: TCP
targetPort: hubble-metrics
selector:
k8s-app: cilium
type: ClusterIP
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app.kubernetes.io/part-of: cilium
name: hubble
namespace: cilium
spec:
endpoints:
- honorLabels: true
interval: 10s
path: /metrics
port: hubble-metrics
relabelings:
- replacement: ${1}
sourceLabels:
- __meta_kubernetes_pod_node_name
targetLabel: node
namespaceSelector:
matchNames:
- cilium
selector:
matchLabels:
k8s-app: hubble
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ spec:
hostPort: 9964
name: envoy-metrics
protocol: TCP
- containerPort: 9965
hostPort: 9965
name: hubble-metrics
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ data:
enable-health-check-nodeport: 'true'
enable-health-checking: 'true'
enable-hubble: 'true'
enable-hubble-open-metrics: 'false'
enable-ipv4: 'true'
enable-ipv4-big-tcp: 'false'
enable-ipv4-masquerade: 'true'
Expand All @@ -58,6 +59,10 @@ data:
hubble-export-file-max-backups: '5'
hubble-export-file-max-size-mb: '10'
hubble-listen-address: :4244
hubble-metrics: httpV2:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity
dns:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity
drop:sourceContext=workload|namespace|reserved-identity;destinationContext=workload|namespace|reserved-identity
hubble-metrics-server: :9965
hubble-socket-path: /var/run/cilium/hubble.sock
identity-allocation-mode: crd
identity-gc-interval: 15m0s
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
annotations: null
labels:
app.kubernetes.io/name: hubble
app.kubernetes.io/part-of: cilium
k8s-app: hubble
name: hubble-metrics
namespace: cilium
spec:
clusterIP: None
ports:
- name: hubble-metrics
port: 9965
protocol: TCP
targetPort: hubble-metrics
selector:
k8s-app: cilium
type: ClusterIP
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app.kubernetes.io/part-of: cilium
name: hubble
namespace: cilium
spec:
endpoints:
- honorLabels: true
interval: 10s
path: /metrics
port: hubble-metrics
relabelings:
- replacement: ${1}
sourceLabels:
- __meta_kubernetes_pod_node_name
targetLabel: node
namespaceSelector:
matchNames:
- cilium
selector:
matchLabels:
k8s-app: hubble
Loading

0 comments on commit d8af06e

Please sign in to comment.