Merged
Conversation
Add git-sync sidecar to server and worker pods that syncs the assets directory from the homelab repo into /media via sparse checkout. This allows custom branding logos to be managed in git. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
--- kubernetes/apps/auth/authentik/app Kustomization: flux-system/cluster-apps-authentik HelmRelease: auth/authentik
+++ kubernetes/apps/auth/authentik/app Kustomization: flux-system/cluster-apps-authentik HelmRelease: auth/authentik
@@ -61,12 +61,27 @@
envFrom:
- secretRef:
name: authentik-external
postgresql:
enabled: false
server:
+ extraContainers:
+ - args:
+ - --repo=https://github.com/FreekingDean/homelab
+ - --ref=main
+ - --root=/media
+ - --link=current
+ - --period=60s
+ - --sparse-checkout-file=/etc/git-sync/sparse-checkout
+ image: registry.k8s.io/git-sync/git-sync:v4.4.1
+ name: git-sync
+ volumeMounts:
+ - mountPath: /media
+ name: media
+ - mountPath: /etc/git-sync
+ name: git-sync-sparse
ingress:
annotations:
hajimari.io/icon: mdi:shield-lock
public.ingress.home.arpa: 'true'
enabled: true
hosts:
@@ -78,13 +93,46 @@
secretName: deangalvin-dev-production-tls
metrics:
enabled: true
serviceMonitor:
enabled: true
replicas: 2
+ volumeMounts:
+ - mountPath: /media
+ name: media
+ volumes:
+ - emptyDir: {}
+ name: media
+ - configMap:
+ name: authentik-git-sync-sparse
+ name: git-sync-sparse
worker:
+ extraContainers:
+ - args:
+ - --repo=https://github.com/FreekingDean/homelab
+ - --ref=main
+ - --root=/media
+ - --link=current
+ - --period=60s
+ - --sparse-checkout-file=/etc/git-sync/sparse-checkout
+ image: registry.k8s.io/git-sync/git-sync:v4.4.1
+ name: git-sync
+ volumeMounts:
+ - mountPath: /media
+ name: media
+ - mountPath: /etc/git-sync
+ name: git-sync-sparse
metrics:
enabled: true
serviceMonitor:
enabled: true
replicas: 2
+ volumeMounts:
+ - mountPath: /media
+ name: media
+ volumes:
+ - emptyDir: {}
+ name: media
+ - configMap:
+ name: authentik-git-sync-sparse
+ name: git-sync-sparse
--- kubernetes/apps/auth/authentik/app Kustomization: flux-system/cluster-apps-authentik ConfigMap: auth/authentik-git-sync-sparse
+++ kubernetes/apps/auth/authentik/app Kustomization: flux-system/cluster-apps-authentik ConfigMap: auth/authentik-git-sync-sparse
@@ -0,0 +1,13 @@
+---
+apiVersion: v1
+data:
+ sparse-checkout: |
+ kubernetes/apps/auth/authentik/assets
+kind: ConfigMap
+metadata:
+ labels:
+ kustomize.toolkit.fluxcd.io/name: cluster-apps-authentik
+ kustomize.toolkit.fluxcd.io/namespace: flux-system
+ name: authentik-git-sync-sparse
+ namespace: auth
+ |
--- HelmRelease: auth/authentik Deployment: auth/authentik-server
+++ HelmRelease: auth/authentik Deployment: auth/authentik-server
@@ -58,12 +58,15 @@
value: 0.0.0.0:9300
envFrom:
- secretRef:
name: authentik
- secretRef:
name: authentik-external
+ volumeMounts:
+ - mountPath: /media
+ name: media
ports:
- name: http
containerPort: 9000
protocol: TCP
- name: https
containerPort: 9443
@@ -96,19 +99,39 @@
port: http
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 3
resources: {}
+ - args:
+ - --repo=https://github.com/FreekingDean/homelab
+ - --ref=main
+ - --root=/media
+ - --link=current
+ - --period=60s
+ - --sparse-checkout-file=/etc/git-sync/sparse-checkout
+ image: registry.k8s.io/git-sync/git-sync:v4.4.1
+ name: git-sync
+ volumeMounts:
+ - mountPath: /media
+ name: media
+ - mountPath: /etc/git-sync
+ name: git-sync-sparse
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/name: authentik
app.kubernetes.io/instance: authentik
app.kubernetes.io/component: server
topologyKey: kubernetes.io/hostname
+ volumes:
+ - emptyDir: {}
+ name: media
+ - configMap:
+ name: authentik-git-sync-sparse
+ name: git-sync-sparse
enableServiceLinks: true
--- HelmRelease: auth/authentik Deployment: auth/authentik-worker
+++ HelmRelease: auth/authentik Deployment: auth/authentik-worker
@@ -57,12 +57,15 @@
value: 0.0.0.0:9300
envFrom:
- secretRef:
name: authentik
- secretRef:
name: authentik-external
+ volumeMounts:
+ - mountPath: /media
+ name: media
ports:
- name: http
containerPort: 9000
protocol: TCP
- name: metrics
containerPort: 9300
@@ -95,19 +98,39 @@
failureThreshold: 60
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 3
resources: {}
+ - args:
+ - --repo=https://github.com/FreekingDean/homelab
+ - --ref=main
+ - --root=/media
+ - --link=current
+ - --period=60s
+ - --sparse-checkout-file=/etc/git-sync/sparse-checkout
+ image: registry.k8s.io/git-sync/git-sync:v4.4.1
+ name: git-sync
+ volumeMounts:
+ - mountPath: /media
+ name: media
+ - mountPath: /etc/git-sync
+ name: git-sync-sparse
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/name: authentik
app.kubernetes.io/instance: authentik
app.kubernetes.io/component: worker
topologyKey: kubernetes.io/hostname
+ volumes:
+ - emptyDir: {}
+ name: media
+ - configMap:
+ name: authentik-git-sync-sparse
+ name: git-sync-sparse
enableServiceLinks: true
|
FreekingDean
added a commit
that referenced
this pull request
Mar 11, 2026
This reverts commit ddadd90.
FreekingDean
added a commit
that referenced
this pull request
Mar 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds authentik logos & assets