Fix chart

This commit is contained in:
LeNei
2023-11-18 17:13:48 +01:00
parent 1001e8f8c6
commit d4bb190eee
6 changed files with 28 additions and 19 deletions

View File

@@ -2,9 +2,11 @@ kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: {{ .Values.api.appName }}
{{ if eq .Values.environment "production" }}
annotations:
cert-manager.io/cluster-issuer: letsencrypt
traefik.ingress.kubernetes.io/router.middlewares: "{{ .Release.Namespace }}-redirect-https@kubernetescrd"
{{ end }}
spec:
rules:
- host: {{ .Values.api.host }}

View File

@@ -4,7 +4,11 @@ metadata:
name: letsencrypt
spec:
acme:
{{ if eq .Values.environment "production" }}
server: https://acme-v02.api.letsencrypt.org/directory
{{ else }}
server: https://acme-staging-v02.api.letsencrypt.org/directory
{{ end }}
email: {{ .Values.email }}
privateKeySecretRef:
name: letsencrypt

View File

@@ -1,26 +1,26 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.nextjs.appName }} # Name of the deployment
name: {{ .Values.frontend.appName }} # Name of the deployment
labels:
app: {{ .Values.nextjs.appName }} # Name of your application
app: {{ .Values.frontend.appName }} # Name of your application
spec:
selector:
matchLabels:
app: {{ .Values.nextjs.appName }} # Name of your application
replicas: {{ .Values.nextjs.replicas }} # Number of replicas
app: {{ .Values.frontend.appName }} # Name of your application
replicas: 1 # Number of replicas
template:
metadata:
labels:
app: {{ .Values.nextjs.appName }} # Name of your application
app: {{ .Values.frontend.appName }} # Name of your application
spec:
containers:
# Containers are the individual pieces of your application that you want
# to run.
- name: {{ .Values.nextjs.appName }} # Name of the container
image: {{ .Values.nextjs.image }}
ports:
# Ports are the ports that your application uses.
- containerPort: {{ .Values.nextjs.containerPort }} # The port that your application uses
# Containers are the individual pieces of your application that you want
# to run.
- name: {{ .Values.frontend.appName }} # Name of the container
image: {{ .Values.frontend.image }}
ports:
# Ports are the ports that your application uses.
- containerPort: {{ .Values.frontend.containerPort }} # The port that your application uses
imagePullSecrets:
- name: docker-regcred

View File

@@ -1,23 +1,25 @@
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: {{ .Values.nextjs.appName }}
name: {{ .Values.frontend.appName }}
{{ if eq .Values.environment "production" }}
annotations:
cert-manager.io/cluster-issuer: letsencrypt
traefik.ingress.kubernetes.io/router.middlewares: "{{ .Release.Namespace }}-redirect-https@kubernetescrd"
{{ end }}
spec:
rules:
- host: {{ .Values.nextjs.host }}
- host: {{ .Values.frontend.host }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Values.nextjs.appName }}
name: {{ .Values.frontend.appName }}
port:
number: 80
tls:
- hosts:
- {{ .Values.nextjs.host }}
secretName: {{ .Values.nextjs.host | replace "." "-" }}
- hosts:
- {{ .Values.frontend.host }}
secretName: {{ .Values.frontend.host | replace "." "-" }}