diff --git a/charts/tennotrade-chart/templates/service.yaml b/charts/tennotrade-chart/templates/service.yaml index d1ae57d..5db90ff 100644 --- a/charts/tennotrade-chart/templates/service.yaml +++ b/charts/tennotrade-chart/templates/service.yaml @@ -1,18 +1,11 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "warframe-db.fullname" . }} - labels: - app.kubernetes.io/name: {{ include "warframe-db.name" . }} - {{- with .Values.service.annotations }} - annotations: -{{ toYaml . | indent 4 }} - {{- end }} + name: {{ include "warframe-db-simple.fullname" . }} spec: - type: {{ .Values.service.type }} - ports: - - name: postgres - port: {{ .Values.service.port }} - targetPort: {{ .Values.postgres.port }} + type: ClusterIP selector: - app.kubernetes.io/name: {{ include "warframe-db.name" . }} + app: {{ include "warframe-db-simple.name" . }} + ports: + - port: {{ .Values.service.port }} + targetPort: 5432 \ No newline at end of file diff --git a/charts/tennotrade-chart/templates/statefullset.yaml b/charts/tennotrade-chart/templates/statefullset.yaml deleted file mode 100644 index 05adbdf..0000000 --- a/charts/tennotrade-chart/templates/statefullset.yaml +++ /dev/null @@ -1,78 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "warframe-db.fullname" . }} - labels: - app.kubernetes.io/name: {{ include "warframe-db.name" . }} -spec: - serviceName: {{ include "warframe-db.fullname" . }}-headless - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: {{ include "warframe-db.name" . }} - template: - metadata: - labels: - app.kubernetes.io/name: {{ include "warframe-db.name" . }} - spec: - securityContext: - fsGroup: 999 # postgres user in official image - containers: - - name: postgres - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: postgres - containerPort: {{ .Values.postgres.port }} - env: - - name: POSTGRES_USER - value: {{ .Values.postgres.user | quote }} - - name: POSTGRES_DB - value: {{ .Values.postgres.database | quote }} - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "warframe-db.fullname" . }} - key: POSTGRES_PASSWORD - volumeMounts: - - name: data - mountPath: /var/lib/postgresql/data - {{- if .Values.probes.enabled }} - readinessProbe: - exec: - command: ["sh","-c","pg_isready -U $POSTGRES_USER -d $POSTGRES_DB -h 127.0.0.1 -p {{ .Values.postgres.port }}"] - initialDelaySeconds: {{ .Values.probes.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.periodSeconds }} - timeoutSeconds: {{ .Values.probes.timeoutSeconds }} - failureThreshold: {{ .Values.probes.failureThreshold }} - livenessProbe: - exec: - command: ["sh","-c","pg_isready -U $POSTGRES_USER -d $POSTGRES_DB -h 127.0.0.1 -p {{ .Values.postgres.port }}"] - initialDelaySeconds: {{ add .Values.probes.initialDelaySeconds 10 }} - periodSeconds: {{ .Values.probes.periodSeconds }} - timeoutSeconds: {{ .Values.probes.timeoutSeconds }} - failureThreshold: {{ .Values.probes.failureThreshold }} - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - volumeClaimTemplates: - - metadata: - name: data - spec: - accessModes: ["ReadWriteOnce"] - resources: - requests: - storage: {{ .Values.persistence.size }} - {{- if .Values.persistence.storageClassName }} - storageClassName: {{ .Values.persistence.storageClassName }} - {{- end }} diff --git a/charts/tennotrade-chart/values.yaml b/charts/tennotrade-chart/values.yaml index 46d5e8a..4469e1d 100644 --- a/charts/tennotrade-chart/values.yaml +++ b/charts/tennotrade-chart/values.yaml @@ -1,34 +1,7 @@ -image: - repository: postgres - tag: "16" - pullPolicy: IfNotPresent - +image: postgres:16 postgres: user: wfuser - password: wfpass # will be stored in a Secret + password: wfpass # simple for POC database: wf - port: 5432 - service: - type: ClusterIP - port: 5432 - # Optional annotations: - annotations: {} - -persistence: - enabled: true - size: 5Gi - storageClassName: "nfs-client" # e.g., nfs-client / longhorn / left empty = default - -resources: {} -nodeSelector: {} -tolerations: [] -affinity: {} - -# Simple liveness/readiness probes (tuned for small clusters) -probes: - enabled: true - initialDelaySeconds: 20 - periodSeconds: 10 - timeoutSeconds: 3 - failureThreshold: 6 + port: 5432 \ No newline at end of file diff --git a/manifests/tennotrade/values.yaml b/manifests/tennotrade/values.yaml index 46d5e8a..4469e1d 100644 --- a/manifests/tennotrade/values.yaml +++ b/manifests/tennotrade/values.yaml @@ -1,34 +1,7 @@ -image: - repository: postgres - tag: "16" - pullPolicy: IfNotPresent - +image: postgres:16 postgres: user: wfuser - password: wfpass # will be stored in a Secret + password: wfpass # simple for POC database: wf - port: 5432 - service: - type: ClusterIP - port: 5432 - # Optional annotations: - annotations: {} - -persistence: - enabled: true - size: 5Gi - storageClassName: "nfs-client" # e.g., nfs-client / longhorn / left empty = default - -resources: {} -nodeSelector: {} -tolerations: [] -affinity: {} - -# Simple liveness/readiness probes (tuned for small clusters) -probes: - enabled: true - initialDelaySeconds: 20 - periodSeconds: 10 - timeoutSeconds: 3 - failureThreshold: 6 + port: 5432 \ No newline at end of file