Compare commits
6 Commits
postgres-c
...
postgres-c
Author | SHA1 | Date | |
---|---|---|---|
336a6f2815 | |||
406737ed6a | |||
ffcd5139ef | |||
69a554bd9d | |||
2aacb4115a | |||
56d7b063bd |
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: postgres-cluster
|
name: postgres-cluster
|
||||||
version: 5.0.0
|
version: 5.0.6
|
||||||
description: Cloudnative-pg Cluster
|
description: Cloudnative-pg Cluster
|
||||||
keywords:
|
keywords:
|
||||||
- database
|
- database
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# postgres-cluster
|
# postgres-cluster
|
||||||
|
|
||||||
 
|
 
|
||||||
|
|
||||||
Cloudnative-pg Cluster
|
Cloudnative-pg Cluster
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@ backup:
|
|||||||
barmanObjectStore:
|
barmanObjectStore:
|
||||||
destinationPath: {{ .Values.backup.destinationPath }}
|
destinationPath: {{ .Values.backup.destinationPath }}
|
||||||
endpointURL: {{ .Values.backup.endpointURL }}
|
endpointURL: {{ .Values.backup.endpointURL }}
|
||||||
{{- if .Values.backup.endpointCA }}
|
{{- if .Values.backup.endpointCA.name }}
|
||||||
endpointCA:
|
endpointCA:
|
||||||
name: {{ .Values.backup.endpointCA.name }}
|
name: {{ .Values.backup.endpointCA.name }}
|
||||||
key: {{ .Values.backup.endpointCA.key }}
|
key: {{ .Values.backup.endpointCA.key }}
|
||||||
|
@@ -140,7 +140,7 @@ externalClusters:
|
|||||||
serverName: {{ include "cluster.recoveryServerName" . }}
|
serverName: {{ include "cluster.recoveryServerName" . }}
|
||||||
endpointURL: {{ .Values.recovery.objectStore.endpointURL }}
|
endpointURL: {{ .Values.recovery.objectStore.endpointURL }}
|
||||||
destinationPath: {{ .Values.recovery.objectStore.destinationPath }}
|
destinationPath: {{ .Values.recovery.objectStore.destinationPath }}
|
||||||
{{- if .Values.recovery.objectStore.endpointCA }}
|
{{- if .Values.recovery.objectStore.endpointCA.name }}
|
||||||
endpointCA:
|
endpointCA:
|
||||||
name: {{ .Values.recovery.objectStore.endpointCA.name }}
|
name: {{ .Values.recovery.objectStore.endpointCA.name }}
|
||||||
key: {{ .Values.recovery.objectStore.endpointCA.key }}
|
key: {{ .Values.recovery.objectStore.endpointCA.key }}
|
||||||
|
@@ -9,17 +9,6 @@ Expand the name of the chart.
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{/*
|
|
||||||
Allow the release namespace to be overridden for multi-namespace deployments in combined charts
|
|
||||||
*/}}
|
|
||||||
{{- define "cluster.namespace" -}}
|
|
||||||
{{- if .Values.namespaceOverride -}}
|
|
||||||
{{- .Values.namespaceOverride -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- .Release.Namespace -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Create chart name and version as used by the chart label.
|
Create chart name and version as used by the chart label.
|
||||||
*/}}
|
*/}}
|
||||||
@@ -31,23 +20,37 @@ Create chart name and version as used by the chart label.
|
|||||||
Common labels
|
Common labels
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "cluster.labels" -}}
|
{{- define "cluster.labels" -}}
|
||||||
helm.sh/chart: {{ include "cluster.chart" . }}
|
helm.sh/chart: {{ include "cluster.chart" $ }}
|
||||||
{{ include "cluster.selectorLabels" . }}
|
{{ include "cluster.selectorLabels" $ }}
|
||||||
{{- if .Chart.AppVersion }}
|
{{- if .Chart.AppVersion }}
|
||||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- with .Values.cluster.additionalLabels }}
|
||||||
|
{{ toYaml . }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Selector labels
|
Selector labels
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "cluster.selectorLabels" -}}
|
{{- define "cluster.selectorLabels" -}}
|
||||||
app.kubernetes.io/name: {{ include "cluster.name" . }}
|
app.kubernetes.io/name: {{ include "cluster.name" $ }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/part-of: cloudnative-pg
|
app.kubernetes.io/part-of: cloudnative-pg
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Allow the release namespace to be overridden for multi-namespace deployments in combined charts
|
||||||
|
*/}}
|
||||||
|
{{- define "cluster.namespace" -}}
|
||||||
|
{{- if .Values.namespaceOverride -}}
|
||||||
|
{{- .Values.namespaceOverride -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Release.Namespace -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Whether we need to use TimescaleDB defaults
|
Whether we need to use TimescaleDB defaults
|
||||||
*/}}
|
*/}}
|
||||||
|
@@ -9,15 +9,12 @@ metadata:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "cluster.labels" . | nindent 4 }}
|
{{- include "cluster.labels" . | nindent 4 }}
|
||||||
{{- with .Values.cluster.additionalLabels }}
|
|
||||||
{{ toYaml . | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
spec:
|
||||||
instances: {{ .Values.cluster.instances }}
|
instances: {{ .Values.cluster.instances }}
|
||||||
{{- include "cluster.image" . | nindent 2 }}
|
{{- include "cluster.image" . | nindent 2 }}
|
||||||
imageName: "{{ .Values.cluster.image.repository }}:{{ .Values.cluster.image.tag }}"
|
imageName: "{{ .Values.cluster.image.repository }}:{{ .Values.cluster.image.tag }}"
|
||||||
imagePullPolicy: {{ .Values.cluster.image.imagePullPolicy }}
|
imagePullPolicy: {{ .Values.cluster.imagePullPolicy }}
|
||||||
{{- with .Values.cluster.image.imagePullSecrets }}
|
{{- with .Values.cluster.imagePullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- . | toYaml | nindent 4 }}
|
{{- . | toYaml | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -2,14 +2,11 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "cluster.name" . }}-monitoring
|
name: {{ include "cluster.name" $ }}-monitoring
|
||||||
namespace: {{ include "cluster.namespace" . }}
|
namespace: {{ include "cluster.namespace" $ }}
|
||||||
labels:
|
labels:
|
||||||
cnpg.io/reload: ""
|
cnpg.io/reload: ""
|
||||||
{{- include "cluster.labels" . | nindent 4 }}
|
{{- include "cluster.labels" $ | nindent 4 }}
|
||||||
{{- with .Values.cluster.additionalLabels }}
|
|
||||||
{{ toYaml . | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
data:
|
data:
|
||||||
custom-queries: |
|
custom-queries: |
|
||||||
{{- range .Values.cluster.monitoring.customQueries }}
|
{{- range .Values.cluster.monitoring.customQueries }}
|
||||||
|
@@ -2,13 +2,10 @@
|
|||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
kind: ImageCatalog
|
kind: ImageCatalog
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "cluster.name" . }}-image-catalog
|
name: {{ include "cluster.name" $ }}-image-catalog
|
||||||
namespace: {{ include "cluster.namespace" . }}
|
namespace: {{ include "cluster.namespace" $ }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "cluster.labels" . | nindent 4 }}
|
{{- include "cluster.labels" $ | nindent 4 }}
|
||||||
{{- with .Values.cluster.additionalLabels }}
|
|
||||||
{{ toYaml . | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
spec:
|
||||||
images:
|
images:
|
||||||
{{- range $image := .Values.imageCatalog.images }}
|
{{- range $image := .Values.imageCatalog.images }}
|
||||||
|
@@ -6,10 +6,7 @@ metadata:
|
|||||||
name: {{ include "cluster.name" $ }}-pooler-{{ .name }}
|
name: {{ include "cluster.name" $ }}-pooler-{{ .name }}
|
||||||
namespace: {{ include "cluster.namespace" $ }}
|
namespace: {{ include "cluster.namespace" $ }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "cluster.labels" . | nindent 4 }}
|
{{- include "cluster.labels" $ | nindent 4 }}
|
||||||
{{- with .Values.cluster.additionalLabels }}
|
|
||||||
{{ toYaml . | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
spec:
|
||||||
cluster:
|
cluster:
|
||||||
name: {{ include "cluster.name" $ }}
|
name: {{ include "cluster.name" $ }}
|
||||||
|
@@ -2,13 +2,10 @@
|
|||||||
apiVersion: monitoring.coreos.com/v1
|
apiVersion: monitoring.coreos.com/v1
|
||||||
kind: PrometheusRule
|
kind: PrometheusRule
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "cluster.name" . }}-alert-rules
|
name: {{ include "cluster.name" $ }}-alert-rules
|
||||||
namespace: {{ include "cluster.namespace" . }}
|
namespace: {{ include "cluster.namespace" $ }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "cluster.labels" . | nindent 4 }}
|
{{- include "cluster.labels" $ | nindent 4 }}
|
||||||
{{- with .Values.cluster.additionalLabels }}
|
|
||||||
{{ toYaml . | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
spec:
|
||||||
groups:
|
groups:
|
||||||
- name: cloudnative-pg/{{ include "cluster.name" . }}
|
- name: cloudnative-pg/{{ include "cluster.name" . }}
|
||||||
|
@@ -5,18 +5,15 @@
|
|||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
kind: ScheduledBackup
|
kind: ScheduledBackup
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "cluster.name" $context }}-{{ .name }}-scheduled-backup
|
name: {{ include "cluster.name" $context }}-{{ .name }}-scheduled-backup
|
||||||
namespace: {{ include "cluster.namespace" $ }}
|
namespace: {{ include "cluster.namespace" $context }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "cluster.labels" . | nindent 4 }}
|
{{- include "cluster.labels" $context | nindent 4 }}
|
||||||
{{- with .Values.cluster.additionalLabels }}
|
|
||||||
{{ toYaml . | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
spec:
|
||||||
immediate: true
|
immediate: true
|
||||||
schedule: {{ .schedule | quote }}
|
schedule: {{ .schedule | quote }}
|
||||||
backupOwnerReference: {{ .backupOwnerReference }}
|
backupOwnerReference: {{ .backupOwnerReference }}
|
||||||
cluster:
|
cluster:
|
||||||
name: {{ include "cluster.name" $context }}
|
name: {{ include "cluster.name" $context }}-cluster
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Reference in New Issue
Block a user