cluster.fun/manifests/link/link.yaml
Marcus Noble 0b548e271e
HTTPS redirect
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2022-10-04 15:04:00 +01:00

93 lines
2.1 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: urls-map
namespace: link
labels:
app: link
data:
urls.yaml: |
mn: https://marcusnoble.co.uk
whites: https://twitter.com/whites11/status/1484053621448785920
devopsnotts22: https://noti.st/averagemarcus/E8Ldoh/managing-kubernetes-without-losing-your-cool
kubernetes-cool: https://noti.st/averagemarcus/E8Ldoh/managing-kubernetes-without-losing-your-cool
klustered: https://gist.githubusercontent.com/AverageMarcus/e58301ecf3455caa1638c3ffe70ed138/raw/klustered.sh
wonders-and-woes: https://noti.st/averagemarcus/sWywEJ/the-wonders-and-woes-of-webhooks
kubehuddle: https://noti.st/averagemarcus/TqCEd4/the-wonders-and-woes-of-webhooks
---
apiVersion: v1
kind: Service
metadata:
name: link
namespace: link
labels:
app: link
spec:
type: ClusterIP
ports:
- port: 80
targetPort: web
name: web
selector:
app: link
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: link
namespace: link
labels:
app: link
spec:
replicas: 1
selector:
matchLabels:
app: link
template:
metadata:
labels:
app: link
spec:
containers:
- name: web
image: rg.fr-par.scw.cloud/averagemarcus/link:latest
imagePullPolicy: Always
ports:
- containerPort: 5050
name: web
volumeMounts:
- name: config
mountPath: /config
volumes:
- name: config
configMap:
name: urls-map
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: link
namespace: link
annotations:
cert-manager.io/cluster-issuer: letsencrypt
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.tls: "true"
ingress.kubernetes.io/ssl-redirect: "true"
traefik.ingress.kubernetes.io/router.entrypoints: websecure
spec:
tls:
- hosts:
- go-get.link
secretName: link-ingress
rules:
- host: go-get.link
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: link
port:
number: 80