initial commit
This commit is contained in:
parent
ebd5bb09fd
commit
3046604b64
26 changed files with 1535 additions and 82 deletions
6
helm/go-mad/Chart.lock
Normal file
6
helm/go-mad/Chart.lock
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
dependencies:
|
||||
- name: postgresql
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 16.7.27
|
||||
digest: sha256:e8b999a3aaad6328a13d0c666207650897b69c61367c947d363b2acbe0ea1b42
|
||||
generated: "2026-10-04T17:23:41.006015619+02:00"
|
||||
|
|
@ -3,4 +3,9 @@ name: go-mad
|
|||
description: A web application for managing tenant database connections and migrations
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "1.0"
|
||||
appVersion: "1.0"
|
||||
dependencies:
|
||||
- name: postgresql
|
||||
version: "16.x.x"
|
||||
repository: "https://charts.bitnami.com/bitnami"
|
||||
condition: postgresql.enabled
|
||||
BIN
helm/go-mad/charts/postgresql-16.7.27.tgz
Normal file
BIN
helm/go-mad/charts/postgresql-16.7.27.tgz
Normal file
Binary file not shown.
|
|
@ -3,5 +3,9 @@ go-mad
|
|||
{{- end -}}
|
||||
|
||||
{{- define "go-mad.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride -}}
|
||||
{{- else -}}
|
||||
{{- .Release.Name -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
{{- $fullName := include "go-mad.fullname" . }}
|
||||
{{- $values := index .Values "go-mad" }}
|
||||
{{- $pgName := printf "%s-postgresql" .Release.Name }}
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
|
@ -29,7 +30,7 @@ spec:
|
|||
- containerPort: {{ $values.serverPort | int }}
|
||||
env:
|
||||
- name: GO_MAD_DATABASE_URL
|
||||
value: "{{ $values.databaseURL }}"
|
||||
value: "postgres://mad:{{ .Values.postgresql.auth.password }}@{{ $pgName }}:5432/mad?sslmode=disable"
|
||||
- name: GO_MAD_SERVER_PORT
|
||||
value: "{{ $values.serverPort }}"
|
||||
- name: GO_MAD_JWT_SECRET
|
||||
|
|
|
|||
38
helm/go-mad/templates/ingress.yaml
Normal file
38
helm/go-mad/templates/ingress.yaml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "go-mad.fullname" . }}
|
||||
{{- $firstHost := first .Values.ingress.hosts -}}
|
||||
{{- $firstPath := first $firstHost.paths -}}
|
||||
{{- $ingressPath := $firstPath.path -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "go-mad.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
ingressClassName: {{ .Values.ingress.className }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- toYaml .Values.ingress.tls | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .host }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
pathType: {{ .pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $.Values.service.port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
61
helm/go-mad/values-dev.yaml
Normal file
61
helm/go-mad/values-dev.yaml
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
# Development values for go-mad
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: batty1039.startdedicated.net:5000/go-mad
|
||||
pullPolicy: Always
|
||||
tag: "latest"
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8080
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 256Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
|
||||
postgresql:
|
||||
enabled: true
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/postgresql
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
auth:
|
||||
username: mad
|
||||
password: mad
|
||||
database: mad
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 2Gi
|
||||
|
||||
go-mad:
|
||||
serverPort: 8080
|
||||
jwtSecret: "dev-jwt-secret-change-me-to-32-plus-chars"
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
className: nginx
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-staging
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
hosts:
|
||||
- host: mad-dev.urpi.be
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- secretName: go-mad-tls
|
||||
hosts:
|
||||
- mad-dev.urpi.be
|
||||
|
||||
certManager:
|
||||
enabled: true
|
||||
issuerRef:
|
||||
name: letsencrypt-staging
|
||||
kind: ClusterIssuer
|
||||
60
helm/go-mad/values-lcl.yaml
Normal file
60
helm/go-mad/values-lcl.yaml
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
# Local (LCL) values for go-mad.
|
||||
# Deployed to namespace go-insane-lcl, served at https://mad-lcl.intern-urpi.be
|
||||
# by the docker TLS edge (dev-infrastructure/config/traefik/tls.yaml).
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: localhost:5000/go-mad
|
||||
pullPolicy: IfNotPresent
|
||||
tag: "0.0.1"
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8080
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 256Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
|
||||
postgresql:
|
||||
enabled: true
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/postgresql
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
auth:
|
||||
username: mad
|
||||
password: mad
|
||||
database: mad
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 2Gi
|
||||
|
||||
go-mad:
|
||||
serverPort: 8080
|
||||
jwtSecret: "lcl-jwt-secret-change-me-to-32-plus-chars"
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
className: traefik
|
||||
annotations: {}
|
||||
hosts:
|
||||
- host: mad-lcl.intern-urpi.be
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- secretName: local-dev-cert
|
||||
hosts:
|
||||
- mad-lcl.intern-urpi.be
|
||||
|
||||
# No cert-manager in the local cluster. The local CA certificate is provided
|
||||
# through the local-dev-cert secret (dev-infrastructure/k8s).
|
||||
certManager:
|
||||
enabled: false
|
||||
68
helm/go-mad/values-prd.yaml
Normal file
68
helm/go-mad/values-prd.yaml
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
# Production values for go-mad
|
||||
replicaCount: 2
|
||||
|
||||
image:
|
||||
repository: batty1039.startdedicated.net:5000/go-mad
|
||||
pullPolicy: Always
|
||||
tag: "latest"
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8080
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 512Mi
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
|
||||
postgresql:
|
||||
enabled: true
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/postgresql
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
auth:
|
||||
username: mad
|
||||
password: mad
|
||||
database: mad
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 20Gi
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 512Mi
|
||||
|
||||
go-mad:
|
||||
serverPort: 8080
|
||||
jwtSecret: "" # Set via --set or secret
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
className: nginx
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
hosts:
|
||||
- host: mad.urpi.be
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- secretName: go-mad-tls
|
||||
hosts:
|
||||
- mad.urpi.be
|
||||
|
||||
certManager:
|
||||
enabled: true
|
||||
issuerRef:
|
||||
name: letsencrypt-prod
|
||||
kind: ClusterIssuer
|
||||
61
helm/go-mad/values-tst.yaml
Normal file
61
helm/go-mad/values-tst.yaml
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
# TST values for go-mad
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: batty1039.startdedicated.net:5000/go-mad
|
||||
pullPolicy: Always
|
||||
tag: "latest"
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8080
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 750m
|
||||
memory: 384Mi
|
||||
requests:
|
||||
cpu: 150m
|
||||
memory: 256Mi
|
||||
|
||||
postgresql:
|
||||
enabled: true
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/postgresql
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
auth:
|
||||
username: mad
|
||||
password: mad
|
||||
database: mad
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 5Gi
|
||||
|
||||
go-mad:
|
||||
serverPort: 8080
|
||||
jwtSecret: "tst-jwt-secret-change-me"
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
className: nginx
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-staging
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
hosts:
|
||||
- host: mad-tst.intern-urpi.be
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- secretName: go-mad-tls
|
||||
hosts:
|
||||
- mad-tst.intern-urpi.be
|
||||
|
||||
certManager:
|
||||
enabled: true
|
||||
issuerRef:
|
||||
name: letsencrypt-staging
|
||||
kind: ClusterIssuer
|
||||
|
|
@ -1,8 +1,11 @@
|
|||
# Default values for go-mad
|
||||
# This is a base configuration - use values-dev.yaml or values-prd.yaml for deployment
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: batty1039.startdedicated.net:5000/go-mad
|
||||
pullPolicy: IfNotPresent
|
||||
pullPolicy: Always
|
||||
tag: "latest"
|
||||
|
||||
service:
|
||||
|
|
@ -17,37 +20,48 @@ resources:
|
|||
cpu: 100m
|
||||
memory: 128Mi
|
||||
|
||||
database:
|
||||
# Database configuration (uses bitnami/postgresql subchart)
|
||||
postgresql:
|
||||
enabled: true
|
||||
postgresql:
|
||||
enabled: true
|
||||
auth:
|
||||
username: mad
|
||||
password: mad
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/postgresql
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
auth:
|
||||
username: mad
|
||||
password: mad
|
||||
database: mad
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 8Gi
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-related: ...
|
||||
hosts:
|
||||
- host: go-mad.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: []
|
||||
# - secretName: go-mad-tls
|
||||
# hosts:
|
||||
# - go-mad.local
|
||||
|
||||
# Application configuration
|
||||
go-mad:
|
||||
databaseURL: "postgres://mad:mad@go-guess-postgresql:5432/mad?sslmode=disable"
|
||||
serverPort: 8080
|
||||
jwtSecret: "change-me-to-a-32-plus-char-secret"
|
||||
|
||||
web:
|
||||
# Ingress configuration
|
||||
ingress:
|
||||
enabled: true
|
||||
type: serving
|
||||
port: 8080
|
||||
className: nginx
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
hosts:
|
||||
- host: mad.urpi.be
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- secretName: go-mad-tls
|
||||
hosts:
|
||||
- mad.urpi.be
|
||||
|
||||
# Cert-manager configuration
|
||||
certManager:
|
||||
enabled: true
|
||||
issuerRef:
|
||||
name: letsencrypt-prod
|
||||
kind: ClusterIssuer
|
||||
Loading…
Add table
Add a link
Reference in a new issue