Skip to content

Commit

Permalink
restrucutre talos cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
nolte committed Dec 19, 2024
1 parent df05d6b commit afb47ca
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 16 deletions.
21 changes: 21 additions & 0 deletions src/clusters/talos-home-lab/argocd/seed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: seed-job
spec:
destination:
name: in-cluster
namespace: argocd
project: default
source:
path: src/clusters/talos-home-lab
repoURL: https://github.com/nolte/k8s-home-lab.git
targetRevision: master
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- ApplyOutOfSyncOnly=true
- PruneLast=true
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ resource "kubernetes_secret" "home-assistant-creds" {
FRITZBOX_PASSWORD = data.pass_password.fritzbox_password.password
TELEGRAM_API_KEY = data.pass_password.telegram_api_key.password
TELEGRAM_NOTIFICATION_CHAT_ID = data.pass_password.telegram_notification_chat_id.password
INFLUX_TOKEN = data.kubernetes_secret.influxdb.data["admin-token"]
INFLUX_TOKEN = "fX6WaQW3tfT8g7s5RcxOj7kzaZYqGCcaCDHNOdBPMVwhlnN2ypkNY4GQliDEKOZovisI9uKkiAPp4iFImMc9qA==" #data.kubernetes_secret.influxdb.data["admin-token"]
}
}
85 changes: 70 additions & 15 deletions src/clusters/talos-home-lab/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ kind: Kustomization
namespace: argocd

labels:
- includeSelectors: true
pairs:
argocd.argoproj.io/instance: seed-job-talos
- includeSelectors: true
pairs:
argocd.argoproj.io/instance: seed-job

generatorOptions:
disableNameSuffixHash: true
Expand All @@ -18,7 +18,7 @@ patches:
kind: Application
name: .*
version: v1alpha1

- path: ../../kustomization-common/deployment-serverside-patch.yaml
target:
group: argoproj.io
Expand Down Expand Up @@ -54,7 +54,6 @@ patches:
name: cert-wildcard
version: v1alpha1
- patch: |-
- op: replace
path: /spec/sources/0/helm/parameters
Expand All @@ -70,7 +69,6 @@ patches:
name: mosquitto
version: v1alpha1
- patch: |-
- op: replace
path: /spec/sources/0/helm/parameters
Expand Down Expand Up @@ -99,6 +97,29 @@ patches:
name: esphome
version: v1alpha1
- patch: |-
- op: replace
path: /spec/sources/0/helm/parameters
value: []
- op: add
path: /spec/sources/0/helm/parameters/-
value:
name: httpProxy.create
value: "true"
- op: add
path: /spec/sources/0/helm/parameters/-
value:
name: httpProxy.fqdn
value: pihole.just-a-lab.duckdns.org
- op: replace
path: /spec/sources/1/helm/valuesObject/persistentVolumeClaim/enabled
value: true
target:
group: argoproj.io
kind: Application
name: pihole
version: v1alpha1
- patch: |-
- op: replace
path: /spec/sources/0/helm/parameters
Expand Down Expand Up @@ -127,13 +148,45 @@ patches:
# path: /spec/sources/1/helm/parameters/-
# value:
# name: persistence.config.size
# value: "10Gi"
# value: "10Gi"
target:
group: argoproj.io
kind: Application
name: home-assistant
version: v1alpha1
- patch: |-
- op: replace
path: /spec/sources/0/helm/valuesObject/secrets
value: {}
- op: replace
path: /spec/sources/1/helm/valuesObject/provider
value: pihole
- op: replace
path: /spec/sources/1/helm/valuesObject/txtOwnerId
value: smart-home-02
- op: replace
path: /spec/sources/1/helm/valuesObject/domainFilters
value:
- just-a-lab.duckdns.org
- op: replace
path: /spec/sources/1/helm/valuesObject/pihole
value: {}
- op: add
path: /spec/sources/1/helm/valuesObject/pihole/server
value: http://pihole-web.pihole.svc
- op: add
path: /spec/sources/1/helm/valuesObject/pihole/secretName
value: pihole-config
target:
group: argoproj.io
kind: Application
name: external-dns
version: v1alpha1
#

- path: ../../kustomization-common/deployment-patch-privileged-ns.yaml
target:
group: argoproj.io
Expand All @@ -142,12 +195,14 @@ patches:
version: v1alpha1



resources:
- ../../../src/applications/cert-manager-webhook-duckdns/deploy/argocd
- ../../../src/applications/cert-wildcard/deploy/argocd
#- ../../../src/applications/local-path-provisioner/deploy/argocd
- ../../../src/applications/metallb/deploy/argocd
- ../../../src/applications/proxmox-csi-plugin/deploy/argocd
# - ../../../src/applications/podinfo/deploy/argocd
- ../../../src/bundles/05-bootstrapping-ingress
- ../../../src/bundles/smart-home
- ../../../src/applications/cert-manager-webhook-duckdns/deploy/argocd
- ../../../src/applications/cert-wildcard/deploy/argocd
- ../../../src/applications/metallb/deploy/argocd
- ../../../src/applications/external-dns/deploy/argocd
- ../../../src/applications/proxmox-csi-plugin/deploy/argocd
- ../../../src/bundles/05-bootstrapping-ingress
- ../../../src/bundles/smart-home
# - ../../../src/applications/podinfo/deploy/argocd
#- ../../../src/applications/local-path-provisioner/deploy/argocd

0 comments on commit afb47ca

Please sign in to comment.