Initial commit 🚀
This commit is contained in:
1 parent
e55ae1a1f5
commit
5a14609b2d
126 files changed
+2530
No files matched your search
@@ -0,0 +1,56 @@
|
||||
---
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: cluster-apps
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 30m
|
||||
path: ./kubernetes/apps
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: home-kubernetes
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
postBuild:
|
||||
substituteFrom:
|
||||
- kind: ConfigMap
|
||||
name: cluster-settings
|
||||
- kind: Secret
|
||||
name: cluster-secrets
|
||||
- kind: ConfigMap
|
||||
name: cluster-user-settings
|
||||
optional: true
|
||||
- kind: Secret
|
||||
name: cluster-user-secrets
|
||||
optional: true
|
||||
patches:
|
||||
- patch: |-
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: not-used
|
||||
spec:
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
postBuild:
|
||||
substituteFrom:
|
||||
- kind: ConfigMap
|
||||
name: cluster-settings
|
||||
- kind: Secret
|
||||
name: cluster-secrets
|
||||
- kind: ConfigMap
|
||||
name: cluster-user-settings
|
||||
optional: true
|
||||
- kind: Secret
|
||||
name: cluster-user-secrets
|
||||
optional: true
|
||||
target:
|
||||
group: kustomize.toolkit.fluxcd.io
|
||||
kind: Kustomization
|
||||
labelSelector: substitution.flux.home.arpa/disabled notin (true)
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: GitRepository
|
||||
metadata:
|
||||
name: home-kubernetes
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 30m
|
||||
url: "ssh://git@repo.home.arpa:222/infra/home-cluster.git"
|
||||
secretRef:
|
||||
name: github-deploy-key
|
||||
ref:
|
||||
branch: "main"
|
||||
ignore: |
|
||||
# exclude all
|
||||
/*
|
||||
# include kubernetes directory
|
||||
!/kubernetes
|
||||
---
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: cluster
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 30m
|
||||
path: ./kubernetes/flux
|
||||
prune: true
|
||||
wait: false
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: home-kubernetes
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
postBuild:
|
||||
substituteFrom:
|
||||
- kind: ConfigMap
|
||||
name: cluster-settings
|
||||
- kind: Secret
|
||||
name: cluster-secrets
|
||||
@@ -0,0 +1,86 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1beta2
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: flux-manifests
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 10m
|
||||
url: oci://ghcr.io/fluxcd/flux-manifests
|
||||
ref:
|
||||
tag: v2.4.0
|
||||
---
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: flux
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 10m
|
||||
path: ./
|
||||
prune: true
|
||||
wait: true
|
||||
sourceRef:
|
||||
kind: OCIRepository
|
||||
name: flux-manifests
|
||||
patches:
|
||||
# Remove the network policies
|
||||
- patch: |
|
||||
$patch: delete
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: not-used
|
||||
target:
|
||||
group: networking.k8s.io
|
||||
kind: NetworkPolicy
|
||||
# Increase the number of reconciliations that can be performed in parallel and bump the resources limits
|
||||
# https://fluxcd.io/flux/cheatsheets/bootstrap/#increase-the-number-of-workers
|
||||
- patch: |
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/0/args/-
|
||||
value: --concurrent=8
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/0/args/-
|
||||
value: --kube-api-qps=500
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/0/args/-
|
||||
value: --kube-api-burst=1000
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/0/args/-
|
||||
value: --requeue-dependency=5s
|
||||
target:
|
||||
kind: Deployment
|
||||
name: (kustomize-controller|helm-controller|source-controller)
|
||||
- patch: |
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: not-used
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: manager
|
||||
resources:
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 2Gi
|
||||
target:
|
||||
kind: Deployment
|
||||
name: (kustomize-controller|helm-controller|source-controller)
|
||||
# Enable Helm near OOM detection
|
||||
# https://fluxcd.io/flux/cheatsheets/bootstrap/#enable-helm-near-oom-detection
|
||||
- patch: |
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/0/args/-
|
||||
value: --feature-gates=OOMWatch=true
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/0/args/-
|
||||
value: --oom-watch-memory-threshold=95
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/0/args/-
|
||||
value: --oom-watch-interval=500ms
|
||||
target:
|
||||
kind: Deployment
|
||||
name: helm-controller
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./flux.yaml
|
||||
- ./cluster.yaml
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources: []
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: bjw-s
|
||||
namespace: flux-system
|
||||
spec:
|
||||
type: oci
|
||||
interval: 5m
|
||||
url: oci://ghcr.io/bjw-s/helm
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: cilium
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 1h
|
||||
url: https://helm.cilium.io
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: coredns
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 1h
|
||||
url: https://coredns.github.io/helm
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: external-dns
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 1h
|
||||
url: https://kubernetes-sigs.github.io/external-dns
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: ingress-nginx
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 1h
|
||||
url: https://kubernetes.github.io/ingress-nginx
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: jetstack
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 1h
|
||||
url: https://charts.jetstack.io
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: k8s-gateway
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 1h
|
||||
url: https://ori-edge.github.io/k8s_gateway
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./bjw-s.yaml
|
||||
- ./cilium.yaml
|
||||
- ./coredns.yaml
|
||||
- ./jetstack.yaml
|
||||
- ./metrics-server.yaml
|
||||
- ./openebs.yaml
|
||||
- ./postfinance.yaml
|
||||
- ./prometheus-community.yaml
|
||||
- ./spegel.yaml
|
||||
- ./stakater.yaml
|
||||
- ./external-dns.yaml
|
||||
- ./ingress-nginx.yaml
|
||||
- ./k8s-gateway.yaml
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: metrics-server
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 1h
|
||||
url: https://kubernetes-sigs.github.io/metrics-server
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: openebs
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 1h
|
||||
url: https://openebs.github.io/openebs
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: postfinance
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 1h
|
||||
url: https://postfinance.github.io/kubelet-csr-approver
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: prometheus-community
|
||||
namespace: flux-system
|
||||
spec:
|
||||
type: oci
|
||||
interval: 5m
|
||||
url: oci://ghcr.io/prometheus-community/charts
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: spegel
|
||||
namespace: flux-system
|
||||
spec:
|
||||
type: oci
|
||||
interval: 5m
|
||||
url: oci://ghcr.io/spegel-org/helm-charts
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: stakater
|
||||
namespace: flux-system
|
||||
spec:
|
||||
type: oci
|
||||
interval: 5m
|
||||
url: oci://ghcr.io/stakater/charts
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./git
|
||||
- ./helm
|
||||
- ./oci
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources: []
|
||||
@@ -0,0 +1,29 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: cluster-secrets
|
||||
namespace: flux-system
|
||||
stringData:
|
||||
SECRET_DOMAIN: ENC[AES256_GCM,data:F7uKTfNpvYd9yrXO,iv:x6Ms3+jMxGU2WD0SKiMc7hopUNCTWvuFbZ1Z7u5QCCU=,tag:4VxCmlcn8Hxd5sdhw35kwg==,type:str]
|
||||
SECRET_ACME_EMAIL: ENC[AES256_GCM,data:RWTbXM0oxD9MtApScbbXie0ZaS8=,iv:Jk3rxmVObJZwjBy6cfePUvptmVjA2rn2mME3Br03mXU=,tag:XMNKq0q7VB4NhBz89IFuRQ==,type:str]
|
||||
SECRET_CLOUDFLARE_TUNNEL_ID: ENC[AES256_GCM,data:0bnbAM/r1XJ/GOtG+7v0j61HukFFXsT7pJcuU7ofpLvRcN3A,iv:pRfpR8JLWO8b/8cJX1rbu+qD5L/GQTBU/KUZH75zpfE=,tag:tx5KTK72bCfIRtFCnYnCtQ==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1mhnje42sefcfpvgpeppch84g6vgptmd4gukgvr3gueuxy6ph05xqx45jty
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSArN2pTYS9VVTJocU84ejYv
|
||||
Z1dLWVVqTWVCMTU5Tm0zNVpCbGUrRGFMQzBrClhIelkxRllHdTF1eDNJVkhxcm56
|
||||
QlZkMndaN3ZXQ2xHOWYrKzFENEVRWEEKLS0tIG1Wa0lGc3U2QlozTWVYWk9oMTJT
|
||||
enRBc2t2NFJuejVxbWpmS2pHUHlVQ28K3WL+fI6c1V19jQML1ZiOI2bHFBV8z1Vt
|
||||
pGZRRMzzfU36XWZ6R0psNmiKBz0AKD0yAO273NZkvHSBzszLq0h/fA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-11-02T01:13:55Z"
|
||||
mac: ENC[AES256_GCM,data:Es8bjzfZeeg1MdIyZ0fLGjtLRQTye1eXbOdzGU5UbqCt2soLFG5GCok4Rbp167J2xH7oHEyPL6F3IAYkZ9W7BylLPKvWkmqYioJZVIP45zreZzGBO/E038+zis6ozJ4jM4LqpZWF8H8a4LuHAAwbC9hgw64Li2VfyEaCqdmZkS0=,iv:OY5I1yoOac7I9JW0gxAepz1Vyspg/e9BWTTWMaJWtZc=,tag:5VYEo4UG33bVvE6lQGOyNw==,type:str]
|
||||
pgp: []
|
||||
encrypted_regex: ^(data|stringData)$
|
||||
version: 3.9.1
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: cluster-settings
|
||||
namespace: flux-system
|
||||
data:
|
||||
SETTING_EXAMPLE: Global settings for your cluster go in this file, this file is NOT encrypted
|
||||
@@ -0,0 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./cluster-settings.yaml
|
||||
- ./cluster-secrets.sops.yaml
|
||||
Reference in new issue
Block a user