fp/charts/fp/templates/next.yaml
CJ_Clippy 9464d0208a
Some checks are pending
ci / build (push) Waiting to run
use .Release.Service
2024-06-20 21:01:30 -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: chisel
{{ end }}
---
apiVersion: v1
kind: Service
metadata:
name: next
namespace: futureporn
{{ if eq .Values.managedBy "tilt" }}
# create a tunnel to chisel-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.imageName }}"
env:
- name: HOSTNAME
value: 0.0.0.0
ports:
- name: web
containerPort: 3000
resources: {}
restartPolicy: OnFailure
{{ if eq .Release.Service "Helm" }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: next
namespace: futureporn
annotations:
kubernetes.io/ingress.class: traefik
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 }}