Add Helm chart

This commit is contained in:
2023-09-06 15:59:30 +03:00
parent f6a6e53010
commit e83f211b3a
5 changed files with 79 additions and 0 deletions

33
templates/deployment.yaml Normal file
View File

@@ -0,0 +1,33 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-gin
spec:
replicas: 3
selector:
matchLabels:
app: hello-gin
template:
metadata:
labels:
app: hello-gin
spec:
enableServiceLinks: false
imagePullSecrets:
- name: imgcred
containers:
- name: hello-gin
image: hello-gin
env:
- name: USERNAME
value: {{ .Values.username }}
- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
ports:
- containerPort: 8000
name: http
- containerPort: 8080
name: metrics

25
templates/ingress.yaml Normal file
View File

@@ -0,0 +1,25 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hello-gin
annotations:
kubernetes.io/ingress.class: shared
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
external-dns.alpha.kubernetes.io/target: traefik.codemowers.ee
spec:
rules:
- host: hello-{{ .Values.username }}.codemowers.ee
http:
paths:
- pathType: Prefix
path: "/api/v1/gin"
backend:
service:
name: hello-gin
port:
name: http
tls:
- hosts:
- "*.codemowers.ee"

14
templates/service.yaml Normal file
View File

@@ -0,0 +1,14 @@
---
apiVersion: v1
kind: Service
metadata:
name: hello-gin
labels:
app: hello-gin
spec:
selector:
app: hello-gin
ports:
- protocol: TCP
port: 8000
name: http