Skip to content

Commit

Permalink
fix: allow graceful helmrelease takeover of helmfile apps
Browse files Browse the repository at this point in the history
Signed-off-by: Devin Buhl <[email protected]>
  • Loading branch information
onedr0p committed Jan 8, 2025
1 parent e115dd8 commit 71982fb
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 30 deletions.
11 changes: 10 additions & 1 deletion kubernetes/main/apps/flux-system/flux/app/helm-values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
# Graceful Helmfile to HelmRelease takeover
x-shared-labels: &labels
helm.toolkit.fluxcd.io/name: flux
helm.toolkit.fluxcd.io/namespace: flux-system

crds:
annotations:
annotations:
helm.sh/resource-policy: keep

helmController:
Expand All @@ -15,6 +20,7 @@ helmController:
- --feature-gates=OOMWatch=true
- --oom-watch-memory-threshold=95
- --oom-watch-interval=500ms
labels: *labels
resources:
requests:
cpu: 100m
Expand All @@ -34,20 +40,23 @@ kustomizeController:
# Ref: https://fluxcd.io/flux/installation/configuration/vertical-scaling/#increase-the-number-of-workers-and-limits
- --concurrent=10
- --requeue-dependency=5s
labels: *labels
resources:
requests:
cpu: 100m
limits:
memory: 2Gi

notificationController:
labels: *labels
resources:
requests:
cpu: 100m
limits:
memory: 2Gi

sourceController:
labels: *labels
container:
additionalArgs:
# Enable Helm repositories caching
Expand Down
1 change: 1 addition & 0 deletions kubernetes/main/apps/flux-system/flux/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
retries: 3
upgrade:
cleanupOnFail: true
disableWait: true
remediation:
strategy: rollback
retries: 3
Expand Down
4 changes: 4 additions & 0 deletions kubernetes/main/apps/kube-system/cilium/app/helm-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,7 @@ securityContext:
- NET_ADMIN
- SYS_ADMIN
- SYS_RESOURCE
# Graceful Helmfile to HelmRelease takeover
commonLabels:
helm.toolkit.fluxcd.io/name: cilium
helm.toolkit.fluxcd.io/namespace: kube-system
59 changes: 30 additions & 29 deletions kubernetes/main/apps/kube-system/cilium/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,33 @@ spec:
valuesFrom:
- kind: ConfigMap
name: cilium-helm-values
values:
hubble:
enabled: true
metrics:
enabled:
- dns:query
- drop
- tcp
- flow
- port-distribution
- icmp
- http
serviceMonitor:
enabled: true
dashboards:
enabled: true
relay:
enabled: true
rollOutPods: true
prometheus:
serviceMonitor:
enabled: true
ui:
enabled: true
rollOutPods: true
ingress:
enabled: true
className: internal
hosts: ["hubble.devbu.io"]
# Enable Hubble, Hubble Relay and Hubble UI
# values:
# hubble:
# enabled: true
# metrics:
# enabled:
# - dns:query
# - drop
# - tcp
# - flow
# - port-distribution
# - icmp
# - http
# serviceMonitor:
# enabled: true
# dashboards:
# enabled: true
# relay:
# enabled: true
# rollOutPods: true
# prometheus:
# serviceMonitor:
# enabled: true
# ui:
# enabled: true
# rollOutPods: true
# ingress:
# enabled: true
# className: internal
# hosts: ["hubble.devbu.io"]
4 changes: 4 additions & 0 deletions kubernetes/main/apps/kube-system/coredns/app/helm-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
# Graceful Helmfile to HelmRelease takeover
customLabels:
helm.toolkit.fluxcd.io/name: coredns
helm.toolkit.fluxcd.io/namespace: kube-system
4 changes: 4 additions & 0 deletions kubernetes/main/apps/kube-system/spegel/app/helm-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ serviceMonitor:
enabled: true
grafanaDashboard:
enabled: true
# Graceful Helmfile to HelmRelease takeover
commonLabels:
helm.toolkit.fluxcd.io/name: spegel
helm.toolkit.fluxcd.io/namespace: kube-system

0 comments on commit 71982fb

Please sign in to comment.