Skip to content

Commit

Permalink
switch back to metallb until cilium/cilium#25477 is deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
mrwulf committed Jun 9, 2023
1 parent eb9c122 commit bbf1042
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cluster/core/kube-system/cilium/helm-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ spec:
annotations: {}

bgpControlPlane:
enabled: true
enabled: false
bgp:
enabled: false
announce:
Expand Down
91 changes: 91 additions & 0 deletions cluster/core/kube-system/cilium/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
apiVersion: v1
kind: Service
metadata:
name: cilium-agent
namespace: kube-system
labels:
k8s-app: cilium
spec:
clusterIP: None
type: ClusterIP
selector:
k8s-app: cilium
ports:
- name: metrics
port: 9962
protocol: TCP
targetPort: prometheus
- name: hubble-metrics
port: 9965
protocol: TCP
targetPort: hubble-metrics
---
#
# Source: cilium/templates/cilium-agent/servicemonitor.yaml
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: cilium-agent
namespace: kube-system
spec:
selector:
matchLabels:
k8s-app: cilium
namespaceSelector:
matchNames:
- kube-system
endpoints:
- port: metrics
interval: 10s
honorLabels: true
path: /metrics
relabelings:
- action: replace
sourceLabels:
- __meta_kubernetes_pod_name
targetLabel: instance
- action: replace
regex: ^(.*)$
replacement: $1
separator: ;
sourceLabels:
- __meta_kubernetes_endpoint_node_name
targetLabel: node
targetLabels:
- k8s-app

---
#
# Source: cilium/templates/cilium-agent/servicemonitor.yaml
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: cilium-agent-hubble-metrics
namespace: kube-system
spec:
selector:
matchLabels:
k8s-app: cilium
namespaceSelector:
matchNames:
- kube-system
endpoints:
- port: hubble-metrics
interval: 10s
honorLabels: true
path: /metrics
relabelings:
- action: replace
sourceLabels:
- __meta_kubernetes_pod_name
targetLabel: instance
- action: replace
regex: ^(.*)$
replacement: $1
separator: ;
sourceLabels:
- __meta_kubernetes_endpoint_node_name
targetLabel: node
targetLabels:
- k8s-app
2 changes: 1 addition & 1 deletion cluster/core/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resources:
- kube-system
- cert-manager
- flux-system
# - metallb-system
- metallb-system
- node-system
- security
- storage
2 changes: 1 addition & 1 deletion cluster/core/metallb-system/bgp-resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
namespace: metallb-system
spec:
addresses:
- 10.0.10.1-10.0.10.20 # "${METALLB_LB_RANGE}"
- "${NETWORK_LB_RANGE}"
---
apiVersion: metallb.io/v1beta1
kind: BGPAdvertisement
Expand Down
2 changes: 1 addition & 1 deletion cluster/core/metallb-system/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ kind: Kustomization
resources:
- helm-release.yaml
- l2-resources.yaml
# - bgp-resources.yaml
- bgp-resources.yaml
2 changes: 1 addition & 1 deletion cluster/core/metallb-system/l2-resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
namespace: metallb-system
spec:
addresses:
- "${METALLB_LB_RANGE_OLD}"
- "${NETWORK_LB_RANGE_OLD}"
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
Expand Down

0 comments on commit bbf1042

Please sign in to comment.