-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update from pg operator from zalando to cncf for relate in kbm
- Loading branch information
1 parent
75ecc54
commit 66d3c0a
Showing
2 changed files
with
108 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 98 additions & 20 deletions
118
argocd-helm-charts/relate/charts/relate/templates/postgres.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,100 @@ | ||
apiVersion: "acid.zalan.do/v1" | ||
kind: postgresql | ||
{{- if not (.Values.postgresql).enabled }} | ||
|
||
apiVersion: postgresql.cnpg.io/v1 | ||
kind: Cluster | ||
metadata: | ||
name: obmondo-postgresql | ||
namespace: relate | ||
labels: | ||
velero.io/exclude-from-backup: "true" | ||
{{ if (.Values.cnpg).recover }} | ||
name: relate-pgsql-recover | ||
{{ else }} | ||
name: relate-pgsql | ||
{{ end }} | ||
spec: | ||
enableLogicalBackup: {{ .Values.postgresql.logicalBackup | default "true" }} | ||
teamId: obmondo | ||
volume: | ||
size: {{ .Values.postgresql.size }} | ||
numberOfInstances: 1 | ||
users: | ||
relate_admin: # database owner | ||
- superuser | ||
- createdb | ||
databases: | ||
relate: relate_admin | ||
postgresql: | ||
version: "14" | ||
enableMasterLoadBalancer: false | ||
instances: {{ ((.Values.cnpg).instance) | default 1 }} | ||
{{ if (.Values.cnpg).recover }} | ||
bootstrap: | ||
recovery: relate-pgsql | ||
{{ else }} | ||
bootstrap: | ||
initdb: | ||
database: relate | ||
owner: relate | ||
{{ end }} | ||
resources: | ||
limits: | ||
memory: {{ (((.Values.cnpg).resources).limits).memory | default "800Mi" }} | ||
requests: | ||
memory: {{ (((.Values.cnpg).resources).requests).memory | default "500Mi" }} | ||
cpu: {{ (((.Values.cnpg).resources).requests).cpu | default "100m" }} | ||
storage: | ||
size: {{ (.Values.cnpg).size | default "4Gi" }} | ||
{{- if (.Values.cnpg).storageClass }} | ||
storageClass: {{ (.Values.cnpg).storageClass }} | ||
{{- end }} | ||
{{- if (.Values.cnpg).recover }} | ||
externalClusters: | ||
name: relate-pgsql | ||
barmanObjectStore: | ||
destinationPath: {{ ((.Values.cnpg).backup).destinationPath }} | ||
endpointURL: {{ ((.Values.cnpg).backup).endpointURL }} | ||
{{- if eq ((.Values.cnpg).backup).cloud "aws" }} | ||
s3Credentials: | ||
accessKeyId: | ||
name: relate-pgsql-backup-creds | ||
key: ACCESS_KEY_ID | ||
secretAccessKey: | ||
name: relate-pgsql-backup-creds | ||
key: ACCESS_SECRET_KEY | ||
{{- end }} | ||
{{- if eq ((.Values.cnpg).backup).cloud "azure" }} | ||
azureCredentials: | ||
connectionString: | ||
name: relate-pgsql-backup-creds | ||
key: AZURE_CONNECTION_STRING | ||
storageAccount: | ||
name: relate-pgsql-backup-creds | ||
key: AZURE_STORAGE_ACCOUNT | ||
storageKey: | ||
name: relate-pgsql-backup-creds | ||
key: AZURE_STORAGE_KEY | ||
storageSasToken: | ||
name: relate-pgsql-backup-creds | ||
key: AZURE_STORAGE_SAS_TOKEN | ||
{{- end }} | ||
wal: | ||
maxParallel: 8 | ||
{{- end }} | ||
{{- if (.Values.cnpg).backup }} | ||
backup: | ||
barmanObjectStore: | ||
destinationPath: {{ ((.Values.cnpg).backup).destinationPath }} | ||
endpointURL: {{ ((.Values.cnpg).backup).endpointURL }} | ||
{{- if eq ((.Values.cnpg).backup).cloud "aws" }} | ||
s3Credentials: | ||
accessKeyId: | ||
name: relate-pgsql-backup-creds | ||
key: ACCESS_KEY_ID | ||
secretAccessKey: | ||
name: relate-pgsql-backup-creds | ||
key: ACCESS_SECRET_KEY | ||
{{- end }} | ||
{{- if eq ((.Values.cnpg).backup).cloud "azure" }} | ||
azureCredentials: | ||
connectionString: | ||
name: relate-pgsql-backup-creds | ||
key: AZURE_CONNECTION_STRING | ||
storageAccount: | ||
name: relate-pgsql-backup-creds | ||
key: AZURE_STORAGE_ACCOUNT | ||
storageKey: | ||
name: relate-pgsql-backup-creds | ||
key: AZURE_STORAGE_KEY | ||
storageSasToken: | ||
name: relate-pgsql-backup-creds | ||
key: AZURE_STORAGE_SAS_TOKEN | ||
{{- end }} | ||
wal: | ||
compression: gzip | ||
encryption: AES256 | ||
retentionPolicy: "30d" | ||
{{ end }} | ||
{{ end }} |