fix: configure gateway

also add a cluster-issuer for ingresses
This commit is contained in:
Vegard Hagen
2024-07-21 23:20:29 +02:00
parent 127290d99b
commit d7f90f34e1
9 changed files with 69 additions and 2 deletions
@@ -9,4 +9,6 @@ configMapGenerator:
resources:
- sonarr/pvc.yaml
- sonarr/svc.yaml
- sonarr/http-route.yaml
- sonarr/deployment.yaml
@@ -0,0 +1,19 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: sonarr-http-route
namespace: arr
spec:
parentRefs:
- name: euclid
namespace: gateway
hostnames:
- "sonarr.euclid.stonegarden.dev"
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: sonarr
port: 80
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: sonarr
namespace: arr
spec:
type: ClusterIP
selector:
app: sonarr
ports:
- port: 80
targetPort: http
@@ -0,0 +1,12 @@
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
name: cloudflare-api-token
namespace: cert-manager
spec:
encryptedData:
api-token: AgAkBs31x8nied64Eox/WA/H1FFXgIKNO5Zx6xo56+Kq5smMih6gAf86tRFtQ7FNWjGfkqQs1a3VYB2Ov2Grbu76SJtX5p1Om01aaLedVhhfe/Vk9buC7auh71sIjhoQdKVnqoHtRjNBohKjk7LN/WTmmYGO+ChWKqk+JJLpR/dlNMEfFxG7HB4U4sRRqoKfw2QYiOYm7bhqu5My5kAhJcq0DSaCE9m6Kd4C5bX86t5C/aJXHm6UZa/bvY8/jbCOFC42+zX/Pm7E/0Awu47HPPzCOYhN4Ev569eYT7hORNAM7BlsxY4uXcDKhdJoRMzzJtaAvhc+YRtyusAqHoNKYRjAUjyPnjEQ5io/URBT5pEYV5z5p5Z4DNlCo6ACtv9bIYWuOOSRVOhDkbY/EZKYcSsUMcaKKL2QRfPqfhCAqqs1ZkqeWbn/c5BpkMEyk6DVPmF7l73MjmbRfZqNnJtjG1gglC3+ZORipgthWT9x55FTeUNUIs7t33LFuG3Zw9yuKQgziMEyr50jkMW/Q36YkGBAh0oO1S6STE4yFCzLnffFOyO/BBwz78weiyx925YEg0tmg0Q9Kc8RICThL+Le+QaU6fsVnOwce/gyQp+Pikk6ETXg+UIsHogRCLJhvea2V/+9DoOhdqnu2FDjmFmWhnpA8ACmXOiiymnLMUC+9QD2Q/+dz4GK8KKFqEkwvU6Un/OFgED/+z5NF4xWsa9Lsf986EX9Y7Dd3JADiVtbTTQoGXL/sCLSFBaW
template:
metadata:
name: cloudflare-api-token
namespace: cert-manager
@@ -0,0 +1,16 @@
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: cloudflare-cluster-issuer
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: [email protected]
privateKeySecretRef:
name: cloudflare-key
solvers:
- dns01:
cloudflare:
apiTokenSecretRef:
name: cloudflare-api-token
key: api-token
@@ -3,6 +3,8 @@ kind: Kustomization
resources:
- ns.yaml
- cloudflare-api-token.yaml
- cluster-issuer.yaml
helmCharts:
- name: cert-manager
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/experimental-install.yaml
@@ -8,7 +8,7 @@ resources:
helmCharts:
- name: cilium
repo: https://helm.cilium.io
version: 1.15.5
version: 1.15.7
releaseName: "cilium"
includeCRDs: true
namespace: kube-system
@@ -2,7 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/experimental-install.yaml
- gateway-class.yaml
- ns.yaml
- cloudflare-api-token.yaml