Add chart
This commit is contained in:
commit
c2be6b76e7
0
backend/main.py
Normal file
0
backend/main.py
Normal file
6
tennotrade-chart/Chart.yaml
Normal file
6
tennotrade-chart/Chart.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: warframe-db
|
||||||
|
description: PostgreSQL (StatefulSet) for Warframe trade backend
|
||||||
|
type: application
|
||||||
|
version: 0.2.0
|
||||||
|
appVersion: "16"
|
||||||
11
tennotrade-chart/templates/service.yaml
Normal file
11
tennotrade-chart/templates/service.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-headless
|
||||||
|
spec:
|
||||||
|
clusterIP: None
|
||||||
|
selector:
|
||||||
|
app: {{ .Release.Name }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.service.port }}
|
||||||
|
targetPort: 5432
|
||||||
42
tennotrade-chart/templates/statefullset.yaml
Normal file
42
tennotrade-chart/templates/statefullset.yaml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-db
|
||||||
|
spec:
|
||||||
|
serviceName: {{ .Release.Name }}-headless
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ .Release.Name }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: postgres
|
||||||
|
image: {{ .Values.image }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 5432
|
||||||
|
env:
|
||||||
|
- name: POSTGRES_USER
|
||||||
|
value: {{ .Values.postgres.user | quote }}
|
||||||
|
- name: POSTGRES_PASSWORD
|
||||||
|
value: {{ .Values.postgres.password | quote }}
|
||||||
|
- name: POSTGRES_DB
|
||||||
|
value: {{ .Values.postgres.database | quote }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /var/lib/postgresql/data
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: data
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- {{ .Values.persistence.accessMode }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.size }}
|
||||||
|
{{- if .Values.persistence.storageClass }}
|
||||||
|
storageClassName: {{ .Values.persistence.storageClass | quote }}
|
||||||
|
{{- end }}
|
||||||
14
tennotrade-chart/values.yaml
Normal file
14
tennotrade-chart/values.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
image: postgres:16
|
||||||
|
postgres:
|
||||||
|
user: wfuser
|
||||||
|
password: wfpass # simple for POC
|
||||||
|
database: wf
|
||||||
|
service:
|
||||||
|
port: 5432
|
||||||
|
|
||||||
|
# Persistence configuration for StatefulSet
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
storageClass: "nfs-client" # empty -> default StorageClass. Set to e.g. 'fast' if needed
|
||||||
|
size: 8Gi
|
||||||
Loading…
x
Reference in New Issue
Block a user