feat(secrets): add initial configuration for FluxCD, including sealed secrets and Helm releases

This commit is contained in:
Janis Eccarius
2026-05-30 13:23:19 +02:00
parent cc038fbb27
commit dcdcaff3b0
31 changed files with 730 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: argo-rollouts
namespace: kube-system
spec:
interval: 1h
chart:
spec:
chart: argo-rollouts
version: "2.40.10"
sourceRef:
kind: HelmRepository
name: argo
namespace: flux-system
values:
installCRDs: true
clusterInstall: true
controller:
replicas: 1
dashboard:
enabled: false
+35
View File
@@ -0,0 +1,35 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: cert-manager
namespace: cert-manager
spec:
interval: 1h
chart:
spec:
chart: cert-manager
version: "1.20.2"
sourceRef:
kind: HelmRepository
name: cert-manager
namespace: flux-system
values:
crds:
enabled: true
---
# ClusterIssuer is applied after cert-manager CRDs exist; FluxCD retries on failure
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: cert-issuer
namespace: flux-system
spec:
interval: 2m
retryInterval: 1m
sourceRef:
kind: GitRepository
name: gitops
namespace: flux-system
path: ./cert-manager/htwg-1
prune: true
timeout: 2m
+12
View File
@@ -0,0 +1,12 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: gitops
namespace: flux-system
spec:
interval: 1m
url: ssh://git@git.janis-eccarius.de/NowChess/GitOps.git
ref:
branch: main
secretRef:
name: gitops-ssh
+20
View File
@@ -0,0 +1,20 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: ingress-nginx
namespace: ingress-nginx
spec:
interval: 1h
chart:
spec:
chart: ingress-nginx
version: "4.15.1"
sourceRef:
kind: HelmRepository
name: ingress-nginx
namespace: flux-system
values:
controller:
service:
type: LoadBalancer
externalTrafficPolicy: Cluster
+15
View File
@@ -0,0 +1,15 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- gitrepository.yaml
- namespaces.yaml
- sources.yaml
- cert-manager.yaml
- ingress-nginx.yaml
- sealed-secrets.yaml
- metrics-server.yaml
- redis.yaml
- argo-rollouts.yaml
- nowchess.yaml
- postgres-tunnel.yaml
- secrets.yaml
+27
View File
@@ -0,0 +1,27 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: metrics-server
namespace: kube-system
spec:
interval: 1h
chart:
spec:
chart: metrics-server
version: "3.13.0"
sourceRef:
kind: HelmRepository
name: metrics-server
namespace: flux-system
values:
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 100m
memory: 128Mi
metrics:
enabled: true
serviceMonitor:
enabled: false
+24
View File
@@ -0,0 +1,24 @@
apiVersion: v1
kind: Namespace
metadata:
name: nowchess
---
apiVersion: v1
kind: Namespace
metadata:
name: redis
---
apiVersion: v1
kind: Namespace
metadata:
name: postgres-tunnel
---
apiVersion: v1
kind: Namespace
metadata:
name: cert-manager
---
apiVersion: v1
kind: Namespace
metadata:
name: ingress-nginx
+16
View File
@@ -0,0 +1,16 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: nowchess
namespace: flux-system
spec:
interval: 10m
retryInterval: 2m
sourceRef:
kind: GitRepository
name: gitops
namespace: flux-system
path: ./nowchess/htwg-1-prod
prune: true
targetNamespace: nowchess
timeout: 5m
+15
View File
@@ -0,0 +1,15 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: postgres-tunnel
namespace: flux-system
spec:
interval: 10m
retryInterval: 2m
sourceRef:
kind: GitRepository
name: gitops
namespace: flux-system
path: ./postgres-tunnel/htwg-1
prune: true
timeout: 3m
+33
View File
@@ -0,0 +1,33 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: redis
namespace: redis
spec:
interval: 1h
chart:
spec:
chart: redis
version: "20.x"
sourceRef:
kind: HelmRepository
name: bitnami
namespace: flux-system
values:
architecture: standalone
auth:
enabled: false
image:
registry: docker.io
repository: redis
tag: "8.6.2-trixie"
master:
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 128Mi
persistence:
enabled: false
+17
View File
@@ -0,0 +1,17 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: sealed-secrets
namespace: kube-system
spec:
interval: 1h
chart:
spec:
chart: sealed-secrets
version: "2.16.1"
sourceRef:
kind: HelmRepository
name: sealed-secrets
namespace: flux-system
values:
fullnameOverride: sealed-secrets
+15
View File
@@ -0,0 +1,15 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: secrets
namespace: flux-system
spec:
interval: 10m
retryInterval: 2m
sourceRef:
kind: GitRepository
name: gitops
namespace: flux-system
path: ./secrets/htwg-1
prune: true
timeout: 3m
+53
View File
@@ -0,0 +1,53 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: cert-manager
namespace: flux-system
spec:
interval: 12h
url: https://charts.jetstack.io
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: ingress-nginx
namespace: flux-system
spec:
interval: 12h
url: https://kubernetes.github.io/ingress-nginx
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: sealed-secrets
namespace: flux-system
spec:
interval: 12h
url: https://bitnami-labs.github.io/sealed-secrets
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: metrics-server
namespace: flux-system
spec:
interval: 12h
url: https://kubernetes-sigs.github.io/metrics-server/
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: bitnami
namespace: flux-system
spec:
interval: 12h
url: https://charts.bitnami.com/bitnami
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: argo
namespace: flux-system
spec:
interval: 12h
url: https://argoproj.github.io/argo-helm
+5
View File
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# gotk-components.yaml is generated by: flux install --export > gotk-components.yaml
resources:
- gotk-components.yaml
+15
View File
@@ -0,0 +1,15 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: flux-apps
namespace: flux-system
spec:
interval: 10m
sourceRef:
kind: GitRepository
name: gitops
namespace: flux-system
path: ./htwg-1/flux-apps
prune: true
wait: true
timeout: 5m