Erste Implementierung
This commit was merged in pull request #1.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
export KUBECONFIG=$(cd ../../../kubeconfigs; pwd -P)/k3d-develop.yaml
|
||||
export SOPS_AGE_KEY_FILE=$(pwd)/../../../local-k8s/keys/age.agekey
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,31 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1beta1
|
||||
kind: GitRepository
|
||||
metadata:
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 1m0s
|
||||
ref:
|
||||
branch: main
|
||||
secretRef:
|
||||
name: local-git-secret
|
||||
timeout: 20s
|
||||
url: ssh://git@local-git.local-git.svc.cluster.local:2222/srv/git/flux.git
|
||||
---
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
spec:
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: age-key-secret
|
||||
interval: 1m0s
|
||||
path: ./flux/clusters/k3d-develop
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
export WORKDIR=$(dirname $0)
|
||||
|
||||
cd $WORKDIR
|
||||
|
||||
kubectl apply -n flux-system -f flux-components.yaml
|
||||
sops exec-file local-git-secret.yaml "kubectl apply -n flux-system -f {}"
|
||||
|
||||
kubectl create secret -n flux-system generic age-key-secret --from-file age.agekey=../../../../local-k8s/keys/age.agekey --dry-run=client -o yaml | kubectl apply -f-
|
||||
|
||||
kubectl apply -n flux-system -f flux-sync.yaml
|
||||
|
||||
flux reconcile source git -n flux-system flux-system
|
||||
|
||||
cd -
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
# we need dedicated 'flux-components.yaml' in each cluster - otherwise a flux-system update in one cluster
|
||||
# would be populated to all clusters
|
||||
- flux-components.yaml
|
||||
- flux-sync.yaml
|
||||
- local-git-secret.yaml
|
||||
- ../../../base/clusterroles
|
||||
|
||||
namespace: flux-system
|
||||
Reference in New Issue
Block a user