diff --git a/README.md b/README.md index 39002d69..6f4803bf 100644 --- a/README.md +++ b/README.md @@ -135,12 +135,13 @@ kubectl --kubeconfig=./kubeconfig create secret generic sops-gpg \ --from-file=sops.asc=/dev/stdin ``` -3. Update files using `envsubst` or by updating them manually +3. Update files using `envsubst` or by updating the files listed below manually ```sh export BOOTSTRAP_GITHUB_REPOSITORY="k8s-at-home/home-cluster" export BOOTSTRAP_METALLB_LB_RANGE="169.254.1.10-169.254.1.20" export BOOTSTRAP_DOMAIN="k8s-at-home.com" +export BOOTSTRAP_DOMAIN_CERT="k8s-at-home" export BOOTSTRAP_CLOUDFLARE_TOKEN="dsKq41iLAbXE37GV" envsubst < ./.sops.yaml diff --git a/cluster/apps/kustomization.yaml b/cluster/apps/kustomization.yaml new file mode 100644 index 00000000..997c4ed9 --- /dev/null +++ b/cluster/apps/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- networking diff --git a/cluster/apps/networking/kustomization.yaml b/cluster/apps/networking/kustomization.yaml new file mode 100644 index 00000000..05fba57c --- /dev/null +++ b/cluster/apps/networking/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- wildcard-certificate diff --git a/cluster/apps/networking/wildcard-certificate/certificate.yaml b/cluster/apps/networking/wildcard-certificate/certificate.yaml new file mode 100644 index 00000000..d1de4478 --- /dev/null +++ b/cluster/apps/networking/wildcard-certificate/certificate.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: "${SECRET_DOMAIN_CERT}" + namespace: networking +spec: + secretName: "${SECRET_DOMAIN_CERT}-tls" + issuerRef: + name: letsencrypt-production + kind: ClusterIssuer + commonName: "${SECRET_DOMAIN}" + dnsNames: + - "${SECRET_DOMAIN}" + - "*.${SECRET_DOMAIN}" diff --git a/cluster/apps/networking/wildcard-certificate/kustomization.yaml b/cluster/apps/networking/wildcard-certificate/kustomization.yaml new file mode 100644 index 00000000..f1aec46e --- /dev/null +++ b/cluster/apps/networking/wildcard-certificate/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- certificate.yaml \ No newline at end of file diff --git a/cluster/base/cluster-secrets.yaml b/cluster/base/cluster-secrets.yaml index 2ea1b1a5..fd587af6 100644 --- a/cluster/base/cluster-secrets.yaml +++ b/cluster/base/cluster-secrets.yaml @@ -6,4 +6,5 @@ metadata: namespace: flux-system stringData: SECRET_DOMAIN: $BOOTSTRAP_DOMAIN + SECRET_DOMAIN_CERT: $BOOTSTRAP_DOMAIN_CERT SECRET_CLOUDFLARE_EMAIL: $BOOTSTRAP_CLOUDFLARE_EMAIL