mirror of
https://github.com/lordmathis/dev-cluster.git
synced 2025-12-22 16:44:24 +00:00
Restructure deployments
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/base/authelia/release.yaml
|
||||
# /apps/base/authelia/base-release.yaml
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/base/authelia/kustomization.yaml
|
||||
# /apps/base/authelia/kustomization.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: auth
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/base/authelia/namespace.yaml
|
||||
# /apps/base/authelia/namespace.yaml
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/base/authelia/repository.yaml
|
||||
# /apps/base/authelia/repository.yaml
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/prod/authelia/forward-auth-middleware.yaml
|
||||
# /apps/prod/authelia/forward-auth-middleware.yaml
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/prod/authelia/ingress.yaml
|
||||
# /apps/prod/authelia/ingress.yaml
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/prod/authelia/kustomization.yaml
|
||||
# /apps/prod/authelia/kustomization.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: auth
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/prod/authelia/release.yaml
|
||||
# /apps/prod/authelia/release.yaml
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/prod/authelia/users-database.enc.yaml
|
||||
# /apps/prod/authelia/users-database.enc.yaml
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/prod/authelia/values.yaml
|
||||
# /apps/prod/authelia/values.yaml
|
||||
domain: 'example.com'
|
||||
configMap:
|
||||
authentication_backend:
|
||||
6
apps/prod/kustomization.yaml
Normal file
6
apps/prod/kustomization.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
# apps/prod/kustomization.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- authelia
|
||||
- gitea
|
||||
@@ -1,3 +1,4 @@
|
||||
# /clusters/prod/apps.yaml
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
@@ -11,7 +12,7 @@ spec:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
dependsOn:
|
||||
- name: infrastructure
|
||||
- name: infrastructure-configs
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
|
||||
@@ -1,16 +1,48 @@
|
||||
# /clusters/prod/infrastructure.yaml
|
||||
---
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: infrastructure
|
||||
name: infrastructure-core
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 10m0s
|
||||
path: ./infrastructure/prod
|
||||
path: ./infrastructure/core
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
---
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: infrastructure-controllers
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 10m0s
|
||||
path: ./infrastructure/controllers
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
dependsOn:
|
||||
- name: infrastructure-core
|
||||
---
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: infrastructure-configs
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 10m0s
|
||||
path: ./infrastructure/configs
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
dependsOn:
|
||||
- name: infrastructure-controllers
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
name: sops-age
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
# /infrastructure/base/cert-manager/release.yaml
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: cert-manager
|
||||
namespace: cert-manager
|
||||
spec:
|
||||
interval: 12h
|
||||
chart:
|
||||
spec:
|
||||
chart: cert-manager
|
||||
version: "1.x"
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cert-manager
|
||||
namespace: cert-manager
|
||||
interval: 12h
|
||||
values:
|
||||
installCRDs: true
|
||||
@@ -1,8 +0,0 @@
|
||||
# /infrastructure/base/cert-manager/kustomization.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: cert-manager
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- repository.yaml
|
||||
@@ -1,16 +0,0 @@
|
||||
# /infrastructure/base/traefik/release.yaml
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: traefik
|
||||
namespace: traefik
|
||||
spec:
|
||||
interval: 10m
|
||||
chart:
|
||||
spec:
|
||||
chart: traefik
|
||||
version: 28.2.0
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: traefik-helm-repo
|
||||
interval: 10m
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/prod/traefik/certificate.yaml
|
||||
# /infrastructure/configs/cert-manager/certificate.yaml
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/prod/cert-manager/secret.enc.yaml
|
||||
# /infrastructure/configs/cert-manager/secret.enc.yaml
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/prod/cert-manager/issuer.yaml
|
||||
# /infrastructure/configs/cert-manager/issuer.yaml
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
7
infrastructure/configs/cert-manager/kustomization.yaml
Normal file
7
infrastructure/configs/cert-manager/kustomization.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
# /infrastructure/configs/cert-manager/kustomization.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- cloudflare-secret.enc.yaml
|
||||
- issuer.yaml
|
||||
- certificate.yaml
|
||||
@@ -1,8 +1,7 @@
|
||||
# /infrastructure/base/traefik/kustomization.yaml
|
||||
# /infrastructure/controllers/cert-manager/kustomization.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: traefik
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- repository.yaml
|
||||
- release.yaml
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/base/cert-manager/namespace.yaml
|
||||
# /infrastructure/controllers/cert-manager/namespace.yaml
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/prod/cert-manager/release.yaml
|
||||
# /infrastructure/controllers/cert-manager/release.yaml
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/base/cert-manager/repository.yaml
|
||||
# /infrastructure/controllers/cert-manager/repository.yaml
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
6
infrastructure/controllers/kustomization.yaml
Normal file
6
infrastructure/controllers/kustomization.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
# infrastructure/controllers/kustomization.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- cert-manager
|
||||
- traefik
|
||||
@@ -1,8 +1,9 @@
|
||||
# /infrastructure/prod/traefik/kustomization.yaml
|
||||
# /infrastructure/controllers/traefik/kustomization.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../../base/traefik
|
||||
- namespace.yaml
|
||||
- repository.yaml
|
||||
- release.yaml
|
||||
|
||||
configMapGenerator:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/base/traefik/namespace.yaml
|
||||
# /infrastructure/controllers/traefik/namespace.yaml
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/prod/traefik/release.yaml
|
||||
# /infrastructure/controllers/traefik/release.yaml
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/base/traefik/repository.yaml
|
||||
# /infrastructure/controllers/traefik/repository.yaml
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/prod/traefik/values.yaml
|
||||
# /infrastructure/controllers/traefik/values.yaml
|
||||
deployment:
|
||||
additionalVolumes:
|
||||
- name: access-log
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/base/storage-class/kustomization.yaml
|
||||
# /infrastructure/core/kustomization.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
@@ -1,4 +1,4 @@
|
||||
# /infrastructure/base/storage-class/storage-class.yaml
|
||||
# /infrastructure/core/storage-class.yaml
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
@@ -1,9 +0,0 @@
|
||||
# /infrastructure/prod/cert-manager/kustomization.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../../base/cert-manager
|
||||
- secret.enc.yaml
|
||||
- release.yaml
|
||||
- issuer.yaml
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# /infrastructure/prod/kustomization.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../base/storage-class
|
||||
- authelia
|
||||
- cert-manager
|
||||
- traefik
|
||||
Reference in New Issue
Block a user