mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
ops(k8s): init metallb, move cloudflare-operator to follow same layout
This commit is contained in:
parent
e95cec051f
commit
2a1c9513a0
10 changed files with 59 additions and 21 deletions
|
|
@ -10,11 +10,11 @@ helm --namespace=kube-system install coredns coredns/coredns --set service.clust
|
||||||
echo "Installing ArgoCD (GitOps)"
|
echo "Installing ArgoCD (GitOps)"
|
||||||
helm repo add argo https://argoproj.github.io/argo-helm
|
helm repo add argo https://argoproj.github.io/argo-helm
|
||||||
helm install argocd argo/argo-cd --namespace argocd --create-namespace
|
helm install argocd argo/argo-cd --namespace argocd --create-namespace
|
||||||
echo "Generating an age keyfile for sops-secrets-operator, the next line will be the public key, please add it to .sops.yaml"
|
echo "Installing sops-secrets-operator"
|
||||||
rage-keygen -o keys.txt 2>&1 | awk '{ print $3 }'
|
#echo "Generating an age keyfile for sops-secrets-operator, the next line will be the public key, please add it to .sops.yaml"
|
||||||
|
#rage-keygen -o keys.txt 2>&1 | awk '{ print $3 }'
|
||||||
kubectl create ns sops
|
kubectl create ns sops
|
||||||
kubectl create secret generic sops-age-key-file --from-file=keys.txt -o yaml --dry-run=client -n sops > sops-age-key-file.yaml
|
kubectl create secret generic sops-age-key-file --from-file=keys.txt -o yaml --dry-run=client -n sops > sops-age-key-file.yaml
|
||||||
kubectl apply -f sops-age-key-file.yaml -n sops
|
kubectl apply -f sops-age-key-file.yaml -n sops
|
||||||
echo "Installing sops-secrets-operator"
|
|
||||||
helm repo add sops-secrets-operator https://inloco.github.io/sops-secrets-operator
|
helm repo add sops-secrets-operator https://inloco.github.io/sops-secrets-operator
|
||||||
helm install sops-secrets-operator sops-secrets-operator/sops-secrets-operator --namespace sops --values sops-values.yaml
|
helm install sops-secrets-operator sops-secrets-operator/sops-secrets-operator --namespace sops --values sops-values.yaml
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
apiVersion: argoproj.io/v1alpha1
|
|
||||||
kind: Application
|
|
||||||
metadata:
|
|
||||||
name: cloudflare-operator-app
|
|
||||||
namespace: argocd
|
|
||||||
spec:
|
|
||||||
destination:
|
|
||||||
namespace: cloudflare-operator-system
|
|
||||||
name: in-cluster
|
|
||||||
project: system
|
|
||||||
source:
|
|
||||||
repoURL: "https://github.com/gensokyo-zone/infrastructure"
|
|
||||||
path: k8s/system/cloudflare-operator
|
|
||||||
targetRevision: main
|
|
||||||
17
k8s/system/cloudflare-operator/application.yaml
Normal file
17
k8s/system/cloudflare-operator/application.yaml
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: cloudflare-operator-app
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
namespace: cloudflare-operator-system
|
||||||
|
name: in-cluster
|
||||||
|
project: system
|
||||||
|
sources:
|
||||||
|
- repoURL: "https://github.com/gensokyo-zone/infrastructure"
|
||||||
|
path: k8s/system/cloudflare-operator/manifests
|
||||||
|
targetRevision: main
|
||||||
|
- repoURL: "https://github.com/adyanth/cloudflare-operator"
|
||||||
|
path: config/default
|
||||||
|
targetRevision: v0.10.2
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- https://github.com/adyanth/cloudflare-operator.git//config/default?ref=v0.10.2
|
- application.yaml
|
||||||
- sopssecret.yaml
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- application.yaml
|
- sopssecret.yaml
|
||||||
|
|
@ -2,7 +2,7 @@ apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: local-path-provisioner
|
name: local-path-provisioner
|
||||||
namespace: kube-system
|
namespace: argocd
|
||||||
spec:
|
spec:
|
||||||
project: system
|
project: system
|
||||||
source:
|
source:
|
||||||
|
|
|
||||||
23
k8s/system/metallb/application.yaml
Normal file
23
k8s/system/metallb/application.yaml
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
https://metallb.github.io/metallb
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: metallb
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
project: system
|
||||||
|
sources:
|
||||||
|
- repoURL: "https://metallb.github.io/metallb"
|
||||||
|
targetRevision: v26.0.x
|
||||||
|
chart: metallb
|
||||||
|
helm:
|
||||||
|
valuesObject:
|
||||||
|
- repoURL: "https://github.com/gensokyo-zone/infrastructure"
|
||||||
|
path: k8s/system/metallb/manifests
|
||||||
|
targetRevision: main
|
||||||
|
destination:
|
||||||
|
namespace: metallb-system
|
||||||
|
name: in-cluster
|
||||||
|
syncPolicy:
|
||||||
|
syncOptions:
|
||||||
|
- ServerSideApply=true
|
||||||
8
k8s/system/metallb/manifests/ipaddresspool.yaml
Normal file
8
k8s/system/metallb/manifests/ipaddresspool.yaml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
apiVersion: metallb.io/v1beta1
|
||||||
|
kind: IPAddressPool
|
||||||
|
metadata:
|
||||||
|
name: lan-services
|
||||||
|
namespace: metallb-system
|
||||||
|
spec:
|
||||||
|
addresses:
|
||||||
|
- 10.69.0.0/16
|
||||||
5
k8s/system/metallb/manifests/l2advertisement.yaml
Normal file
5
k8s/system/metallb/manifests/l2advertisement.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
apiVersion: metallb.io/v1beta1
|
||||||
|
kind: L2Advertisement
|
||||||
|
metadata:
|
||||||
|
name: l2
|
||||||
|
namespace: metallb-system
|
||||||
Loading…
Add table
Add a link
Reference in a new issue