mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-08 21:14:56 +09:00
35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
---
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
kind: Cluster
|
|
metadata:
|
|
name: {{ .Values.harbor.fullnameOverride }}-db
|
|
spec:
|
|
instances: {{ .Values.db.replicas }}
|
|
{{- $existingCluster := lookup "postgresql.cnpg.io/v1" "Cluster" .Release.Namespace (printf "%s-db" .Values.harbor.fullnameOverride) }}
|
|
{{- $image := dig "spec" "imageName" "ghcr.io/cloudnative-pg/postgresql:17.7-standard-trixie" $existingCluster }}
|
|
imageName: {{ if regexMatch ":17\\." $image }}ghcr.io/cloudnative-pg/postgresql:17.7-standard-trixie{{ else if regexMatch ":[0-9]+\\.[0-9]+$" $image }}{{ printf "%s-standard-trixie" $image }}{{ else }}{{ $image }}{{ end }}
|
|
storage:
|
|
size: {{ .Values.db.size }}
|
|
{{- with .Values.db.storageClass }}
|
|
storageClass: {{ . }}
|
|
{{- end }}
|
|
bootstrap:
|
|
initdb:
|
|
database: app
|
|
owner: app
|
|
encoding: UTF8
|
|
localeCollate: en_US.UTF-8
|
|
localeCType: en_US.UTF-8
|
|
monitoring:
|
|
enablePodMonitor: true
|
|
resources:
|
|
limits:
|
|
cpu: "1"
|
|
memory: 2048Mi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 512Mi
|
|
inheritedMetadata:
|
|
labels:
|
|
policy.cozystack.io/allow-to-apiserver: "true"
|