fp/charts/fp/templates/next.yaml
CJ_Clippy 2faa8cfa21
Some checks failed
ci / build (push) Has been cancelled
add scout email
2024-05-31 18:43:44 -08:00

88 lines
1.7 KiB
YAML

{{ if eq .Values.managedBy "tilt" }}
---
apiVersion: chisel-operator.io/v1
kind: ExitNode
metadata:
name: next-exit-node
namespace: futureporn
spec:
host: "{{ .Values.chisel.exitNodeIp }}"
port: 9090
auth: uwu-auth
{{ end }}
---
apiVersion: v1
kind: Service
metadata:
name: next
namespace: futureporn
{{ if eq .Values.managedBy "tilt" }}
# create a tunnel to uwu-exit-node (chisel server)
# this allows us to have SSL in development
annotations:
chisel-operator.io/exit-node-name: "next-exit-node"
{{ end }}
spec:
selector:
app.kubernetes.io/name: next
ports:
- name: web
port: 3000
targetPort: web
protocol: TCP
type: LoadBalancer
---
apiVersion: v1
kind: Pod
metadata:
name: next
namespace: futureporn
labels:
app.kubernetes.io/name: next
spec:
containers:
- name: next
image: "{{ .Values.next.containerName }}"
env:
- name: HOSTNAME
value: 0.0.0.0
ports:
- name: web
containerPort: 3000
resources: {}
restartPolicy: OnFailure
{{ if eq .Values.managedBy "Helm" }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: next
namespace: futureporn
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: "{{ .Values.next.certIssuer }}"
spec:
backend:
serviceName: next
servicePort: 3000
tls:
- secretName: next-tls
hosts:
- "{{ .Values.next.hostname }}"
rules:
- host: "{{ .Values.next.hostname }}"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: next
port:
number: 3000
{{ end }}