mirror of
https://github.com/LeNei/fullstack-helm-chart.git
synced 2026-02-13 22:56:19 +00:00
Fix chart
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: backend
|
name: fullstack-chart
|
||||||
description: A Helm chart for Kubernetes
|
description: A Helm chart for Kubernetes
|
||||||
|
|
||||||
# A chart can be either an 'application' or a 'library' chart.
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
|||||||
@@ -2,9 +2,11 @@ kind: Ingress
|
|||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Values.api.appName }}
|
name: {{ .Values.api.appName }}
|
||||||
|
{{ if eq .Values.environment "production" }}
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: letsencrypt
|
cert-manager.io/cluster-issuer: letsencrypt
|
||||||
traefik.ingress.kubernetes.io/router.middlewares: "{{ .Release.Namespace }}-redirect-https@kubernetescrd"
|
traefik.ingress.kubernetes.io/router.middlewares: "{{ .Release.Namespace }}-redirect-https@kubernetescrd"
|
||||||
|
{{ end }}
|
||||||
spec:
|
spec:
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.api.host }}
|
- host: {{ .Values.api.host }}
|
||||||
|
|||||||
@@ -4,7 +4,11 @@ metadata:
|
|||||||
name: letsencrypt
|
name: letsencrypt
|
||||||
spec:
|
spec:
|
||||||
acme:
|
acme:
|
||||||
|
{{ if eq .Values.environment "production" }}
|
||||||
server: https://acme-v02.api.letsencrypt.org/directory
|
server: https://acme-v02.api.letsencrypt.org/directory
|
||||||
|
{{ else }}
|
||||||
|
server: https://acme-staging-v02.api.letsencrypt.org/directory
|
||||||
|
{{ end }}
|
||||||
email: {{ .Values.email }}
|
email: {{ .Values.email }}
|
||||||
privateKeySecretRef:
|
privateKeySecretRef:
|
||||||
name: letsencrypt
|
name: letsencrypt
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Values.nextjs.appName }} # Name of the deployment
|
name: {{ .Values.frontend.appName }} # Name of the deployment
|
||||||
labels:
|
labels:
|
||||||
app: {{ .Values.nextjs.appName }} # Name of your application
|
app: {{ .Values.frontend.appName }} # Name of your application
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: {{ .Values.nextjs.appName }} # Name of your application
|
app: {{ .Values.frontend.appName }} # Name of your application
|
||||||
replicas: {{ .Values.nextjs.replicas }} # Number of replicas
|
replicas: 1 # Number of replicas
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: {{ .Values.nextjs.appName }} # Name of your application
|
app: {{ .Values.frontend.appName }} # Name of your application
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
# Containers are the individual pieces of your application that you want
|
# Containers are the individual pieces of your application that you want
|
||||||
# to run.
|
# to run.
|
||||||
- name: {{ .Values.nextjs.appName }} # Name of the container
|
- name: {{ .Values.frontend.appName }} # Name of the container
|
||||||
image: {{ .Values.nextjs.image }}
|
image: {{ .Values.frontend.image }}
|
||||||
ports:
|
ports:
|
||||||
# Ports are the ports that your application uses.
|
# Ports are the ports that your application uses.
|
||||||
- containerPort: {{ .Values.nextjs.containerPort }} # The port that your application uses
|
- containerPort: {{ .Values.frontend.containerPort }} # The port that your application uses
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: docker-regcred
|
- name: docker-regcred
|
||||||
|
|||||||
@@ -1,23 +1,25 @@
|
|||||||
kind: Ingress
|
kind: Ingress
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Values.nextjs.appName }}
|
name: {{ .Values.frontend.appName }}
|
||||||
|
{{ if eq .Values.environment "production" }}
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: letsencrypt
|
cert-manager.io/cluster-issuer: letsencrypt
|
||||||
traefik.ingress.kubernetes.io/router.middlewares: "{{ .Release.Namespace }}-redirect-https@kubernetescrd"
|
traefik.ingress.kubernetes.io/router.middlewares: "{{ .Release.Namespace }}-redirect-https@kubernetescrd"
|
||||||
|
{{ end }}
|
||||||
spec:
|
spec:
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.nextjs.host }}
|
- host: {{ .Values.frontend.host }}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: {{ .Values.nextjs.appName }}
|
name: {{ .Values.frontend.appName }}
|
||||||
port:
|
port:
|
||||||
number: 80
|
number: 80
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- {{ .Values.nextjs.host }}
|
- {{ .Values.frontend.host }}
|
||||||
secretName: {{ .Values.nextjs.host | replace "." "-" }}
|
secretName: {{ .Values.frontend.host | replace "." "-" }}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
email: your-mail@web.com
|
email: your-mail@web.com
|
||||||
|
environment: staging
|
||||||
|
|
||||||
api:
|
api:
|
||||||
appName: nice-name
|
appName: nice-name
|
||||||
|
|||||||
Reference in New Issue
Block a user