Compare commits

...

2 Commits

Author SHA1 Message Date
b6f346bf7a Substitute cluster env variable 2025-12-02 00:33:51 +01:00
b02fe72253 Added certificate for huizinga.dev 2025-12-02 00:33:24 +01:00
11 changed files with 90 additions and 2 deletions

View File

@@ -3,3 +3,13 @@ kind: Kustomization
resources: resources:
- gotk-components.yaml - gotk-components.yaml
- gotk-sync.yaml - gotk-sync.yaml
patches:
- patch: |
- op: add
path: /spec/postBuild
value:
substitute:
cluster_env: staging
target:
kind: Kustomization
name: flux-system

View File

@@ -6,3 +6,4 @@ resources:
- ../../controllers/cert-manager/cert-manager.yaml - ../../controllers/cert-manager/cert-manager.yaml
- ../../configs/artifacts.yaml - ../../configs/artifacts.yaml
- ../../configs/letsencrypt/letsencrypt.yaml - ../../configs/letsencrypt/letsencrypt.yaml
- ../../configs/certificates/certificates.yaml

View File

@@ -14,3 +14,8 @@ spec:
copy: copy:
- from: "@foundation/configs/letsencrypt/**" - from: "@foundation/configs/letsencrypt/**"
to: "@artifact/" to: "@artifact/"
- name: certificates
originRevision: "@foundation"
copy:
- from: "@foundation/configs/certificates/**"
to: "@artifact/"

View File

@@ -0,0 +1,10 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: huizinga-dev
namespace: certificates
spec:
secretName: huizinga-dev-tls
issuerRef:
name: letsencrypt
kind: ClusterIssuer

View File

@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- certificate-huizinga-dev.yaml

View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: certificates

View File

@@ -0,0 +1,17 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: certificates
namespace: flux-system
spec:
interval: 1h
retryInterval: 2m
timeout: 5m
dependsOn:
- name: letsencrypt
sourceRef:
kind: ExternalArtifact
name: certificates
path: ./${cluster_env}
prune: true
wait: true

View File

@@ -0,0 +1,10 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: huizinga-dev
namespace: certificates
spec:
commonName: "huizinga.dev"
dnsNames:
- "huizinga.dev"
- "*.huizinga.dev"

View File

@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../base
patches:
- path: certificate-huizinga-dev.yaml
target:
kind: Certificate

View File

@@ -0,0 +1,10 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: huizinga-dev
namespace: certificates
spec:
commonName: "staging.huizinga.dev"
dnsNames:
- "staging.huizinga.dev"
- "*.staging.huizinga.dev"

View File

@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../base
patches:
- path: certificate-huizinga-dev.yaml
target:
kind: Certificate