add cert-manager

This commit is contained in:
Lee 2024-09-21 22:26:30 +01:00
parent 2bdf2de9d1
commit 09d137b092
12 changed files with 90 additions and 37 deletions

View File

@ -1,7 +0,0 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- rbac.yaml
- traefik.yaml
- svc.yaml

View File

@ -0,0 +1,15 @@
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: fascinated-cc
namespace: traefik
spec:
secretName: fascinated-cc
issuerRef:
name: letsencrypt-production
kind: ClusterIssuer
commonName: "*.fascinated.cc"
dnsNames:
- "fascinated.cc"
- "*.fascinated.cc"

View File

@ -0,0 +1,14 @@
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: local-fascinated-cc
namespace: traefik
spec:
secretName: local-fascinated-cc
issuerRef:
name: letsencrypt-production
kind: ClusterIssuer
commonName: "*.local.fascinated.cc"
dnsNames:
- "*.local.fascinated.cc"

View File

@ -0,0 +1,15 @@
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: mcutils-xyz
namespace: traefik
spec:
secretName: mcutils-xyz
issuerRef:
name: letsencrypt-production
kind: ClusterIssuer
commonName: "*.mcutils.xyz"
dnsNames:
- "mcutils.xyz"
- "*.mcutils.xyz"

View File

@ -0,0 +1,23 @@
---
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-production
namespace: cert-manager
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: liam@fascinated.cc
privateKeySecretRef:
name: letsencrypt-production
solvers:
- dns01:
cloudflare:
email: liam@fascinated.cc
apiTokenSecretRef:
name: cloudflare-token-secret
key: cloudflare-token
selector:
dnsZones:
- "fascinated.cc"
- "mcutils.xyz"

View File

@ -0,0 +1,8 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: cert-manager
resources:
- namespace.yaml
- certificates/*.yaml
- issuers.yaml

View File

@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: cert-manager

View File

@ -4,7 +4,6 @@ kind: Kustomization
namespace: traefik-production
resources:
- namespace.yaml
- ../../base/traefik
patchesStrategicMerge:
- traefik-patch.yaml
- rbac.yaml
- traefik.yaml
- service.yaml

View File

@ -12,7 +12,6 @@ spec:
app.kubernetes.io/name: traefik
type: LoadBalancer
loadBalancerIP: 10.0.69.250
externalTrafficPolicy: Local
ports:
- port: 80
name: web

View File

@ -1,23 +0,0 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: traefik
spec:
template:
spec:
containers:
- name: traefik
args:
- "--entryPoints.web.address=:8000/tcp"
- "--entryPoints.websecure.address=:8443/tcp"
- "--ping=true"
- "--global.sendanonymoususage=false"
- "--global.checknewversion=false"
- "--serversTransport.insecureSkipVerify=true"
- "--log.level=INFO"
- "--providers.kubernetescrd"
- "--providers.kubernetescrd.allowCrossNamespace=true"
- "--providers.kubernetescrd.allowExternalNameServices=true"
- "--providers.kubernetesingress.allowCrossNamespace=true"
- "--providers.kubernetesingress.allowExternalNameServices=true"

View File

@ -26,11 +26,16 @@ spec:
args:
- "--entryPoints.web.address=:8000/tcp"
- "--entryPoints.websecure.address=:8443/tcp"
- "--api=true"
- "--api.dashboard=true"
- "--ping=true"
- "--global.sendanonymoususage=false"
- "--global.checknewversion=false"
- "--serversTransport.insecureSkipVerify=true"
- "--log.level=INFO"
- "--providers.kubernetescrd"
- "--providers.kubernetescrd.allowCrossNamespace=true"
- "--providers.kubernetescrd.allowExternalNameServices=true"
- "--providers.kubernetesingress.allowCrossNamespace=true"
- "--providers.kubernetesingress.allowExternalNameServices=true"
readinessProbe:
httpGet:
path: /ping