feat: add headscale helmfile

This commit is contained in:
2025-06-22 16:22:23 +02:00
parent 7d81828f4a
commit 3d5c6da6d0
6 changed files with 90 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
bases:
- ../envs/environments.yaml.gotmpl
repositories:
- name: headscale
url: https://charts.gabe565.com
commonLabels:
tier: system
releases:
- name: manifests
namespace: headscale-system
chart: manifests
condition: nginx.enabled
missingFileHandler: Info
values:
- ../values/env.yaml
- ../values/env-{{ requiredEnv "ARGOCD_ENV_CLUSTER_NAME" }}.yaml
- ../values/headscale/env.yaml.gotmpl
- ../values/headscale/env-{{ requiredEnv "ARGOCD_ENV_CLUSTER_NAME" }}.yaml.gotmpl
hooks:
- events: [ prepare, cleanup ]
showlogs: true
command: ../bin/helmify
args:
- '{{`{{ if eq .Event.Name "prepare" }}build{{ else }}clean{{ end }}`}}'
- '{{`{{ .Release.Chart }}`}}'
- '{{`{{ .Environment.Name }}`}}'
- ../values/headscale/manifests
- manifests
+1
View File
@@ -88,4 +88,5 @@ spec:
- https://helm.cilium.io - https://helm.cilium.io
- https://chartmuseum.github.io/charts - https://chartmuseum.github.io/charts
- https://dapr.github.io/helm-charts - https://dapr.github.io/helm-charts
- https://charts.gabe565.com
@@ -0,0 +1,3 @@
headscale:
enabled: true
+4
View File
@@ -0,0 +1,4 @@
plume:
enabled: false
autosync: false
+51
View File
@@ -0,0 +1,51 @@
{{- if .Values.clusterConfig.argo.enabled }}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: headscale
namespace: argocd
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: headscale-system
server: 'https://kubernetes.default.svc'
sources:
- repoURL: {{ .Values.clusterConfig.manifests }}
targetRevision: HEAD
path: helmfile.d
plugin:
name: helmfile-cmp
env:
- name: CLUSTER_NAME
value: {{ .Values.clusterConfig.cluster }}
- name: HELMFILE_ENVIRONMENT
value: default
- name: HELMFILE_FILE_PATH
value: headscale.yaml.gotmpl
- repoURL: https://charts.gabe565.com
targetRevision: 0.16.0
chart: headscale
helm:
valueFiles:
- $values/values/headscale/values/values.yaml
- repoURL: {{ .Values.clusterConfig.manifests }}
targetRevision: main
ref: values
project: sys
syncPolicy:
managedNamespaceMetadata:
labels:
component: sys
syncOptions:
- CreateNamespace=true
- ApplyOutOfSyncOnly=true
# - ServerSideApply=true
{{- if .Values.headscale.autosync }}
automated:
prune: true
# selfHeal: false
{{- end }}
{{- end }}