feat: initial Helm chart scaffold for lunarfront per-customer deployments
This commit is contained in:
58
charts/lunarfront/templates/deployment.yaml
Normal file
58
charts/lunarfront/templates/deployment.yaml
Normal file
@@ -0,0 +1,58 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: lunarfront
|
||||
namespace: {{ .Values.customer.name }}
|
||||
labels:
|
||||
app: lunarfront
|
||||
customer: {{ .Values.customer.name }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: lunarfront
|
||||
customer: {{ .Values.customer.name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: lunarfront
|
||||
customer: {{ .Values.customer.name }}
|
||||
spec:
|
||||
containers:
|
||||
- name: backend
|
||||
image: "{{ .Values.image.backend.repository }}:{{ .Values.image.backend.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.backend.pullPolicy }}
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.database.secretName }}
|
||||
key: url
|
||||
- name: REDIS_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.redis.secretName }}
|
||||
key: url
|
||||
- name: JWT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.auth.secretName }}
|
||||
key: secret
|
||||
resources:
|
||||
{{- toYaml .Values.resources.backend | nindent 12 }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /v1/health
|
||||
port: 8000
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 30
|
||||
|
||||
- name: frontend
|
||||
image: "{{ .Values.image.frontend.repository }}:{{ .Values.image.frontend.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.frontend.pullPolicy }}
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
{{- toYaml .Values.resources.frontend | nindent 12 }}
|
||||
24
charts/lunarfront/templates/ingress.yaml
Normal file
24
charts/lunarfront/templates/ingress.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: lunarfront
|
||||
namespace: {{ .Values.customer.name }}
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .Values.customer.domain }}
|
||||
secretName: lunarfront-tls
|
||||
rules:
|
||||
- host: {{ .Values.customer.domain }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: lunarfront
|
||||
port:
|
||||
number: 80
|
||||
13
charts/lunarfront/templates/service.yaml
Normal file
13
charts/lunarfront/templates/service.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: lunarfront
|
||||
namespace: {{ .Values.customer.name }}
|
||||
spec:
|
||||
selector:
|
||||
app: lunarfront
|
||||
customer: {{ .Values.customer.name }}
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 80
|
||||
Reference in New Issue
Block a user