Compare commits

...

57 Commits

Author SHA1 Message Date
5259488c05 chagne resources 2025-01-08 17:39:10 -06:00
09c693d371 reduce resource request 2025-01-08 15:50:21 -06:00
ec6f44c6bc change resource 2025-01-08 15:33:59 -06:00
35f331e29a fix helm/prom bracket interaction 2025-01-08 15:20:28 -06:00
3b0481fcb1 add default rules 2025-01-07 14:22:25 -06:00
e2dfd70dc4 change default resources 2025-01-07 13:45:34 -06:00
ffc253ef7d add description of values 2024-12-30 17:10:54 -06:00
77dd85362e update dependency chart 2024-12-30 17:04:09 -06:00
d5bb83bf84 add description of values 2024-12-30 17:03:45 -06:00
11d3dd927b update dependency chart 2024-12-30 17:00:37 -06:00
1b67b5cbb6 add description of values 2024-12-30 16:59:49 -06:00
56fe199fb9 add precommit hooks 2024-12-30 16:55:01 -06:00
8ec7f590b2 upgrade base image to 17 2024-12-24 21:08:05 -06:00
d2444fb544 set switch for superuser 2024-12-22 17:29:30 -06:00
202a534e8e fix missing field 2024-12-21 23:48:11 -06:00
c36e4e371f reorganize values 2024-12-21 23:40:21 -06:00
1ac9444bb2 fix condition flow 2024-12-21 23:29:50 -06:00
275fcd8568 use cluster values 2024-12-21 23:26:40 -06:00
158d4ca676 change method 2024-12-21 23:22:34 -06:00
32e232d8e2 force hardcoded value for testing 2024-12-21 23:08:17 -06:00
93d2f916fb use value for name 2024-12-21 22:53:59 -06:00
b1a6a2fd39 remove condition 2024-12-21 22:46:17 -06:00
d3307d4f70 use different function 2024-12-21 22:39:52 -06:00
1b7018d3bd fix database naming 2024-12-21 22:31:00 -06:00
b75721ae1d add option to specifiy database name for replica 2024-12-21 22:20:09 -06:00
renovate[bot]
e0e4f6ee8a Update renovate/renovate Docker tag to v39 (#71)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-21 19:55:23 -06:00
renovate[bot]
7dd80d4528 Migrate config .github/renovate.json (#72)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-21 19:55:16 -06:00
24af841f19 update workflows 2024-12-21 18:11:39 -06:00
16211d4c62 remove schedule 2024-12-21 18:11:29 -06:00
513c46c957 change to midnight daily 2024-12-20 19:33:25 -06:00
3fad4e4ff0 update image 2024-12-20 19:25:40 -06:00
1f867e0276 update image 2024-12-20 19:25:03 -06:00
601790ab7a change backup schedule 2024-12-19 14:50:00 -06:00
16ebdda6a4 update image 2024-12-19 13:59:37 -06:00
dbf8f14512 update image 2024-12-19 13:58:37 -06:00
22dcd7a14c update image 2024-12-16 10:31:56 -06:00
8862d97c27 change retention policy 2024-12-12 11:12:58 -06:00
1f4cd543c0 bump chart version 2024-11-23 22:40:06 -06:00
4aac272e98 update image 2024-11-23 22:39:06 -06:00
b8602fb919 update image to 16.6 2024-11-23 22:38:36 -06:00
fb34897269 update image 2024-10-19 00:58:50 -05:00
ec27eff4da add priority class name and tolerations 2024-10-13 12:39:03 -05:00
2b31df483e listen on all addresses 2024-10-12 23:35:08 -05:00
53191f1d68 add generic device plugin 2024-10-12 23:18:07 -05:00
172526fb79 update common chart 2024-10-11 19:03:23 -05:00
5d5aad265a fix settings for tensorchord type 2024-09-28 16:43:45 -05:00
84af71da49 add tag for postgres version 2024-09-28 02:07:28 -05:00
ab3ca49103 add tensorchord type 2024-09-28 02:05:34 -05:00
8b2342d1c2 bump chart version 2024-09-27 21:29:54 -05:00
9107020db2 update chart and image 2024-09-27 21:28:05 -05:00
3ecef5f8d1 add options for tagging 2024-09-27 21:27:01 -05:00
renovate[bot]
e5b1b733fe Update cloudflare/cloudflared Docker tag to v2024.8.3 (#63)
* Update cloudflare/cloudflared Docker tag to v2024.8.3

* update chart

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: alexlebens <alexanderlebens@gmail.com>
2024-08-24 01:30:19 -05:00
843e37e233 update postresql image 2024-08-19 16:42:54 -05:00
ee944a6b83 update image 2024-08-19 16:41:19 -05:00
renovate[bot]
5fe95ea7ad Update renovate/renovate Docker tag to v38 (#62)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-19 16:40:33 -05:00
6a33a670e1 update common chart 2024-08-19 16:40:16 -05:00
27cdfd742e remove mysql-cluster 2024-08-19 15:31:01 -05:00
28 changed files with 542 additions and 554 deletions

View File

@@ -1,2 +1,2 @@
# This file is processed by Renovate bot so that it creates a PR on new major Renovate versions
FROM renovate/renovate:37
FROM renovate/renovate:39

View File

@@ -6,14 +6,11 @@
":rebaseStalePrs"
],
"timezone": "US/Central",
"schedule": [
"every weekday"
],
"labels": [],
"packageRules": [
{
"description": "Disables for non major Renovate version",
"matchPaths": [
"matchFileNames": [
".github/renovate-update-notification/Dockerfile"
],
"matchUpdateTypes": [
@@ -27,7 +24,7 @@
},
{
"description": "Generate for major Renovate version",
"matchPaths": [
"matchFileNames": [
".github/renovate-update-notification/Dockerfile"
],
"matchUpdateTypes": [

View File

@@ -14,11 +14,11 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.13.3
version: latest
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.13"
check-latest: true
- name: Set up chart-testing

19
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,19 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files
- id: check-yaml
exclude: 'charts/'
args:
- --multi
- repo: https://github.com/norwoodj/helm-docs
rev: v1.14.2
hooks:
- id: helm-docs
args:
- --chart-search-root=charts
- --template-files=./_templates.gotmpl
- --template-files=README.md.gotmpl

View File

@@ -1,6 +1,6 @@
apiVersion: v2
name: cloudflared
version: 1.4.1
version: 1.12.4
description: Cloudflared Tunnel
keywords:
- cloudflare
@@ -13,6 +13,6 @@ maintainers:
dependencies:
- name: common
repository: https://bjw-s.github.io/helm-charts/
version: 3.2.1
version: 3.6.0
icon: https://avatars.githubusercontent.com/u/314135?s=48&v=4
appVersion: "2024.6.1"
appVersion: "2024.12.2"

View File

@@ -1,16 +1,35 @@
## Introduction
# cloudflared
[Cloudflared](https://github.com/cloudflare/cloudflared)
![Version: 1.12.4](https://img.shields.io/badge/Version-1.12.4-informational?style=flat-square) ![AppVersion: 2024.12.2](https://img.shields.io/badge/AppVersion-2024.12.2-informational?style=flat-square)
Contains the command-line client for Cloudflare Tunnel, a tunneling daemon that proxies traffic from the Cloudflare network to your origins.
Cloudflared Tunnel
This chart bootstraps a [Cloudflared](https://github.com/cloudflare/cloudflared) tunnel on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
## Maintainers
## Prerequisites
| Name | Email | Url |
| ---- | ------ | --- |
| alexlebens | | |
- Kubernetes
- Helm
## Source Code
## Parameters
* <https://github.com/cloudflare/cloudflared>
* <https://github.com/bjw-s/helm-charts/tree/main/charts/library/common>
See the [values files](values.yaml).
## Requirements
| Repository | Name | Version |
|------------|------|---------|
| https://bjw-s.github.io/helm-charts/ | common | 3.6.0 |
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| existingSecretKey | string | `"cf-tunnel-token"` | Name of key that contains the token in the existingSecret |
| existingSecretName | string | `"cloudflared-secret"` | Name of existing secret that contains Cloudflare token |
| image | object | `{"pullPolicy":"IfNotPresent","repository":"cloudflare/cloudflared","tag":"2024.12.2"}` | Default image |
| name | string | `"cloudflared"` | Name override of release |
| resources | object | `{"requests":{"cpu":"10m","memory":"128Mi"}}` | Default resources |
----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)

View File

@@ -1,11 +1,20 @@
# -- Name override of release
name: cloudflared
# -- Name of existing secret that contains Cloudflare token
existingSecretName: cloudflared-secret
# -- Name of key that contains the token in the existingSecret
existingSecretKey: cf-tunnel-token
# -- Default image
image:
repository: cloudflare/cloudflared
tag: "2024.6.1"
tag: "2024.12.2"
pullPolicy: IfNotPresent
# -- Default resources
resources:
requests:
cpu: 100m
cpu: 10m
memory: 128Mi

View File

@@ -0,0 +1,18 @@
apiVersion: v2
name: generic-device-plugin
version: 0.1.5
description: Generic Device Plugin
keywords:
- generic-device-plugin
- device
- plugin
sources:
- https://github.com/squat/generic-device-plugin
- https://github.com/bjw-s/helm-charts/tree/main/charts/library/common
maintainers:
- name: alexlebens
dependencies:
- name: common
repository: https://bjw-s.github.io/helm-charts/
version: 3.6.0
appVersion: 0.1.5

View File

@@ -0,0 +1,37 @@
# generic-device-plugin
![Version: 0.1.5](https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square) ![AppVersion: 0.1.5](https://img.shields.io/badge/AppVersion-0.1.5-informational?style=flat-square)
Generic Device Plugin
## Maintainers
| Name | Email | Url |
| ---- | ------ | --- |
| alexlebens | | |
## Source Code
* <https://github.com/squat/generic-device-plugin>
* <https://github.com/bjw-s/helm-charts/tree/main/charts/library/common>
## Requirements
| Repository | Name | Version |
|------------|------|---------|
| https://bjw-s.github.io/helm-charts/ | common | 3.6.0 |
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| config | object | `{"data":"devices:\n - name: serial\n groups:\n - paths:\n - path: /dev/ttyUSB*\n - paths:\n - path: /dev/ttyACM*\n - paths:\n - path: /dev/tty.usb*\n - paths:\n - path: /dev/cu.*\n - paths:\n - path: /dev/cuaU*\n - paths:\n - path: /dev/rfcomm*\n - name: video\n groups:\n - paths:\n - path: /dev/video0\n - name: fuse\n groups:\n - count: 10\n paths:\n - path: /dev/fuse\n - name: audio\n groups:\n - count: 10\n paths:\n - path: /dev/snd\n - name: capture\n groups:\n - paths:\n - path: /dev/snd/controlC0\n - path: /dev/snd/pcmC0D0c\n - paths:\n - path: /dev/snd/controlC1\n mountPath: /dev/snd/controlC0\n - path: /dev/snd/pcmC1D0c\n mountPath: /dev/snd/pcmC0D0c\n - paths:\n - path: /dev/snd/controlC2\n mountPath: /dev/snd/controlC0\n - path: /dev/snd/pcmC2D0c\n mountPath: /dev/snd/pcmC0D0c\n - paths:\n - path: /dev/snd/controlC3\n mountPath: /dev/snd/controlC0\n - path: /dev/snd/pcmC3D0c\n mountPath: /dev/snd/pcmC0D0c\n","enabled":true}` | Config map |
| config.data | string | See [values.yaml](./values.yaml) | generic-device-plugin config file [[ref]](https://github.com/squat/generic-device-plugin#usage) |
| deviceDomain | string | `"squat.ai"` | Domain used by devices for identifcation |
| image | object | `{"pullPolicy":"Always","repository":"ghcr.io/squat/generic-device-plugin","tag":"latest"}` | Default image |
| name | string | `"generic-device-plugin"` | Name override of release |
| resources | object | `{"limit":{"cpu":"100m","memory":"20Mi"},"requests":{"cpu":"50m","memory":"10Mi"}}` | Default resources |
| service | object | `{"listenPort":8080}` | Service port |
----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)

View File

@@ -0,0 +1,82 @@
{{ include "bjw-s.common.loader.init" . }}
{{ define "genericDevicePlugin.hardcodedValues" }}
{{ if not .Values.global.nameOverride }}
global:
nameOverride: {{ .Values.name }}
{{ end }}
controllers:
main:
type: daemonset
pod:
priorityClassName: system-node-critical
tolerations:
- operator: "Exists"
effect: "NoExecute"
- operator: "Exists"
effect: "NoSchedule"
containers:
main:
image:
repository: {{ .Values.image.repository }}
tag: {{ .Values.image.tag }}
pullPolicy: {{ .Values.image.pullPolicy }}
args:
- --config=/config/config.yaml
env:
- name: LISTEN
value: :{{ .Values.service.listenPort }}
- name: PLUGIN_DIRECTORY
value: /var/lib/kubelet/device-plugins
- name: DOMAIN
value: {{ .Values.deviceDomain }}
probes:
liveness:
type: HTTP
path: /health
readiness:
type: HTTP
path: /health
startup:
type: HTTP
path: /health
securityContext:
privileged: True
configMaps:
config:
enabled: {{ .Values.config.enabled }}
data:
config.yaml: {{ toYaml .Values.config.data | nindent 8 }}
service:
main:
controller: main
ports:
http:
port: {{ .Values.service.listenPort }}
persistence:
config:
enabled: true
type: configMap
name: {{ .Values.name }}-config
device-plugins:
enabled: true
type: hostPath
hostPath: /var/lib/kubelet/device-plugins
dev:
enabled: true
type: hostPath
hostPath: /dev
serviceMonitor:
main:
serviceName: generic-device-plugin
endpoints:
- port: http
scheme: http
path: /metrics
interval: 30s
scrapeTimeout: 10s
{{ end }}
{{ $_ := mergeOverwrite .Values (include "genericDevicePlugin.hardcodedValues" . | fromYaml) }}
{{/* Render the templates */}}
{{ include "bjw-s.common.loader.generate" . }}

View File

@@ -0,0 +1,80 @@
# -- Name override of release
name: generic-device-plugin
# -- Default image
image:
repository: ghcr.io/squat/generic-device-plugin
pullPolicy: Always
tag: latest
# -- Domain used by devices for identifcation
deviceDomain: squat.ai
# -- Service port
service:
listenPort: 8080
# -- Default resources
resources:
limit:
cpu: 100m
memory: 20Mi
requests:
cpu: 50m
memory: 10Mi
# -- Config map
config:
enabled: true
# -- generic-device-plugin config file [[ref]](https://github.com/squat/generic-device-plugin#usage)
# @default -- See [values.yaml](./values.yaml)
data: |
devices:
- name: serial
groups:
- paths:
- path: /dev/ttyUSB*
- paths:
- path: /dev/ttyACM*
- paths:
- path: /dev/tty.usb*
- paths:
- path: /dev/cu.*
- paths:
- path: /dev/cuaU*
- paths:
- path: /dev/rfcomm*
- name: video
groups:
- paths:
- path: /dev/video0
- name: fuse
groups:
- count: 10
paths:
- path: /dev/fuse
- name: audio
groups:
- count: 10
paths:
- path: /dev/snd
- name: capture
groups:
- paths:
- path: /dev/snd/controlC0
- path: /dev/snd/pcmC0D0c
- paths:
- path: /dev/snd/controlC1
mountPath: /dev/snd/controlC0
- path: /dev/snd/pcmC1D0c
mountPath: /dev/snd/pcmC0D0c
- paths:
- path: /dev/snd/controlC2
mountPath: /dev/snd/controlC0
- path: /dev/snd/pcmC2D0c
mountPath: /dev/snd/pcmC0D0c
- paths:
- path: /dev/snd/controlC3
mountPath: /dev/snd/controlC0
- path: /dev/snd/pcmC3D0c
mountPath: /dev/snd/pcmC0D0c

View File

@@ -1,15 +0,0 @@
apiVersion: v2
name: mysql-cluster
version: 0.2.4
description: Chart for a mysql cluster
keywords:
- database
- mysql
sources:
- https://dev.mysql.com/
- https://github.com/mysql/mysql-operator
- https://github.com/mysql/mysql-operator/tree/trunk/helm/mysql-innodbcluster
maintainers:
- name: alexlebens
icon: https://avatars.githubusercontent.com/u/2452804?s=48&v=4
appVersion: 8.4.0

View File

@@ -1,17 +0,0 @@
## Introduction
[MySQL Operator](https://dev.mysql.com/doc/mysql-operator/en/)
MySQL Operator for Kubernetes manages MySQL InnoDB Cluster setups inside a Kubernetes Cluster. MySQL Operator for Kubernetes manages the full lifecycle with setup and maintenance including automating upgrades and backups.
This chart bootstraps a [MySQL InnoDB](https://dev.mysql.com/doc/mysql-operator/en/mysql-operator-innodbcluster.html) cluster on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
## Prerequisites
- Kubernetes
- Helm
- MySQL Operator
## Parameters
See the [values files](values.yaml).

View File

@@ -1,72 +0,0 @@
{{- define "cluster.backup" -}}
{{- if and .Values.backup.enabled .Values.backup.profiles }}
backupProfiles:
{{- $isDumpInstance := false }}
{{- $isSnapshot := false }}
{{- range $_, $profile := .Values.backup.profiles }}
- name: {{ $profile.name | quote }}
{{- if hasKey $profile "podAnnotations" }}
podAnnotations:
{{ toYaml $profile.podAnnotations | nindent 6 }}
{{- end }}
{{- if hasKey $profile "podLabels" }}
podLabels:
{{ toYaml $profile.podLabels | nindent 6 }}
{{- end }}
{{- $isDumpInstance = hasKey $profile "dumpInstance" }}
{{- $isSnapshot = hasKey $profile "snapshot" }}
{{- if or $isDumpInstance $isSnapshot }}
{{- $backupProfile := ternary $profile.dumpInstance $profile.snapshot $isDumpInstance }}
{{- if $isDumpInstance }}
dumpInstance:
{{- else if $isSnapshot }}
snapshot:
{{- else }}
{{- fail "Unsupported or unspecified backup type, must be either snapshot or dumpInstance" }}
{{ end }}
{{- if not (hasKey $backupProfile "storage") }}
{{- fail "backup profile $profile.name has no storage section" }}
{{- else if hasKey $backupProfile.storage "s3" }}
storage:
s3:
{{- if $backupProfile.storage.s3.prefix }}
prefix: {{ $backupProfile.storage.s3.prefix }}
{{- end }}
bucketName: {{ required "bucketName is required" $backupProfile.storage.s3.bucketName }}
config: {{ required "config is required" $backupProfile.storage.s3.config }}
{{- if $backupProfile.storage.s3.profile }}
profile: {{ $backupProfile.storage.s3.profile }}
{{- end }}
{{- if $backupProfile.storage.s3.endpoint }}
endpoint: {{ $backupProfile.storage.s3.endpoint }}
{{- end }}
{{- else if hasKey $backupProfile.storage "persistentVolumeClaim" }}
storage:
persistentVolumeClaim: {{ toYaml $backupProfile.storage.persistentVolumeClaim | nindent 12}}
{{- else -}}
{{- fail "Backup profile $profile.name has empty storage section - neither s3 nor persistentVolumeClaim defined" }}
{{- end -}}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.backup.schedules }}
backupSchedules:
{{- range $_, $schedule := .Values.backup.schedules }}
- name: {{ $schedule.name | quote }}
enabled: {{ $schedule.enabled }}
schedule: {{ quote $schedule.schedule }}
{{- if ($schedule).timeZone }}
timeZone: {{ quote $schedule.timeZone }}
{{- end }}
deleteBackupData: {{ $schedule.deleteBackupData }}
backupProfileName: {{ $schedule.backupProfileName }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,64 +0,0 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "cluster.name" -}}
{{- if .Values.global.nameOverride }}
{{- .Values.global.nameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-mysql-%s" .Release.Name ((semver .Values.cluster.image.version).Major | toString) | trunc 63 | trimSuffix "-" -}}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "cluster.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Check for invalid versions
*/}}
{{- $minimalVersion := "8.0.27" }}
{{- $forbiddenVersions := list "8.0.29" }}
{{- $serverVersion := .Values.serverVersion | default .Chart.AppVersion }}
{{- if lt $serverVersion $minimalVersion }}
{{- $err := printf "It is not possible to use MySQL version %s . Please, use %s or above" $serverVersion $minimalVersion }}
{{- fail $err }}
{{- end }}
{{- if has $serverVersion $forbiddenVersions }}
{{- $err := printf "It is not possible to use MySQL version %s . Please, use %s or above except %v" $serverVersion $minimalVersion $forbiddenVersions }}
{{- fail $err }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "cluster.labels" -}}
helm.sh/chart: {{ include "cluster.chart" . }}
{{ include "cluster.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "cluster.selectorLabels" -}}
app.kubernetes.io/name: {{ include "cluster.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: cloudnative-pg
{{- end }}
{{/*
Create the name of the service account to use.
*/}}
{{- define "mysql.serviceAccountName" -}}
{{- if .Values.serviceAccount.enabled -}}
{{ default (include "cluster.name" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -1,47 +0,0 @@
{{- define "cluster.init" -}}
{{- if eq .Values.mode "clone" }}
{{- with .Values.clone }}
initDB:
clone:
donorUrl: {{ required "clone donorUrl is required" .donorUrl }}
rootUser: {{ .rootUser | default "root" }}
secretKeyRef:
name: {{ required "clone credentials is required" .exisitingCredentialsSecret }}
{{- end }}
{{- end }}
{{- if eq .Values.mode "recovery" }}
{{- with .Values.recovery }}
initDB:
dump:
{{- if .name }}
name: {{ .name | quote }}
{{- end }}
{{- if .path }}
path: {{ .path | quote }}
{{- end }}
{{- if .options }}
options: {{ toYaml .options | nindent 8 }}
{{- end }}
storage:
{{- if eq .type "s3" }}
s3:
prefix: {{ required "s3 prefix is required" .s3.prefix }}
bucketName: {{ required "s3 bucketName is required" .s3.bucketName }}
config: {{ required "s3 config is required" .s3.config }}
{{- if .s3.profile }}
profile: {{ .s3.profile }}
{{- end }}
{{- if .s3.endpoint }}
endpoint: {{ .s3.endpoint }}
{{- end }}
{{- end }}
{{- if eq .type "pvc" }}
persistentVolumeClaim:
{{ toYaml .persistentVolumeClaim | nindent 10}}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,75 +0,0 @@
apiVersion: mysql.oracle.com/v2
kind: InnoDBCluster
metadata:
name: {{ include "cluster.name" . }}-cluster
namespace: {{ .Release.Namespace }}
annotations:
{{- with .Values.global.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "cluster.labels" . | nindent 4 }}
{{- include "cluster.selectorLabels" . | nindent 4 }}
{{- with .Values.global.labels }}
{{ toYaml . | nindent 4 }}
{{- end }}
spec:
instances: {{ required "serverInstances is required" .Values.cluster.serverInstances }}
baseServerId: {{ required "baseServerId is required" .Values.cluster.baseServerId }}
serviceAccountName: {{ include "mysql.serviceAccountName" . }}
imagePullPolicy : {{ .Values.cluster.image.pullPolicy }}
version: {{ .Values.cluster.image.version }}
tlsUseSelfSigned: true
secretName: {{ .Values.cluster.exisitingCredentialsSecret }}
{{- if .Values.cluster.podSpec }}
podSpec:
{{ toYaml .Values.cluster.podSpec | nindent 4 }}
{{- end }}
{{- if .Values.cluster.podAnnotations }}
podAnnotations:
{{ toYaml .Values.cluster.podAnnotations | nindent 4 }}
{{- end }}
{{- if .Values.cluster.podLabels }}
podLabels:
{{ toYaml .Values.cluster.podLabels | nindent 4 }}
{{- end }}
router:
instances: {{ required "router.instances is required" .Values.cluster.router.instances }}
{{- if .Values.cluster.router.podSpec }}
podSpec:
{{- toYaml .Values.cluster.router.podSpec | nindent 6 }}
{{- end }}
{{- if .Values.cluster.router.podAnnotations }}
podAnnotations:
{{- toYaml .Values.cluster.router.podAnnotations | nindent 6 }}
{{- end }}
{{- if .Values.cluster.router.podLabels }}
podLabels:
{{- toYaml .Values.cluster.router.podLabels | nindent 6 }}
{{- end }}
tlsSecretName: {{ include "cluster.name" . }}-router-tls
logs:
{{- with .Values.cluster.logs }}
{{ toYaml . | nindent 4 }}
{{- end }}
mycnf: |
{{ .Values.cluster.serverConfig.mycnf | indent 4 }}
{{- if .Values.cluster.datadirVolumeClaimTemplate }}
{{- with .Values.cluster.datadirVolumeClaimTemplate }}
datadirVolumeClaimTemplate:
{{- if .storageClassName }}
storageClassName: {{ .storageClassName | quote }}
{{- end}}
{{- if .accessModes }}
accessModes: [ "{{ .accessModes }}" ]
{{- end }}
{{- if .size }}
resources:
requests:
storage: "{{ .size }}"
{{- end }}
{{- end }}
{{- end }}
{{ include "cluster.init" . | nindent 2 }}
{{ include "cluster.backup" . | nindent 2 }}

View File

@@ -1,21 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "mysql.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "cluster.labels" . | nindent 4 }}
{{- include "cluster.selectorLabels" . | nindent 4 }}
{{- with .Values.global.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.serviceAccount.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- with .Values.global.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.serviceAccount.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}

View File

@@ -1,147 +0,0 @@
global:
nameOverride:
labels: {}
annotations: {}
serviceAccount:
enabled: true
labels: {}
annotations: {}
name: ""
###
# Cluster mode of operation. Available modes:
# * `standalone` - Default mode. Creates new or updates an existing cluster.
# * `recovery` - Same as standalone but creates a cluster from a backup
# * `clone` - Create database as a replica from another cluster
mode: standalone
##
# Cluster spec
#
# Reference: https://dev.mysql.com/doc/mysql-operator/en/mysql-operator-properties.html#mysql-operator-spec-innodbclusterspecinitdbdumpstorages3
#
cluster:
serverInstances: 1
baseServerId: 1000
# Existing secret that contains the keys "rootUser", "rootHost", and "rootPassword"
exisitingCredentialsSecret: ""
image:
version: 8.4.0
pullPolicy: IfNotPresent
router:
instances: 1
podSpec: {}
podAnnotations: {}
podLabels: {}
logs:
error:
collect: false
general:
enabled: false
collect: false
slowQuery:
enabled: false
longQueryTime: 2.5
serverConfig:
mycnf: |
[mysqld]
core_file
local_infile=off
mysql_native_password=ON
datadirVolumeClaimTemplate:
storageClassName: ""
accessModes: ""
size: ""
podSpec:
containers:
- name: mysql
resources:
limits:
memory: 1024Mi
cpu: 1000m
requests:
memory: 512Mi
cpu: 100m
podAnnotations: {}
podLabels: {}
##
# Recovery database from storage
#
recovery:
# * `s3` - Restores from s3 object store
# * `pvc` - Restores from persistent volume claim
type:
# -- Name of the dump. Not used by the operator, but a descriptive hint for the cluster administrator
name: ""
# -- Path to the dump in the PVC. Use when specifying persistentVolumeClaim. Omit for ociObjectStorage, S3, or azure.
path: ""
# -- A dictionary of key-value pairs passed directly to MySQL Shell's loadDump()
options: {}
s3:
# -- Path in the bucket where the dump files are stored
prefix: ""
# -- Name of a Secret with S3 configuration and credentials as contained in ~/.aws/config
config: ""
# -- Name of the S3 bucket where the dump is stored
bucketName: ""
# -- Override endpoint URL
endpoint: ""
persistentVolumeClaim: {}
##
# Clone database from another instance
#
clone:
donorUrl: ""
rootUser: root
exisitingCredentialsSecret: ""
##
# Backup database to pvc or s3
#
backup:
enabled: false
profiles:
## -- Example profile that back ups to local pvc
# - name: pvc-backup
# dumpInstance:
# storage:
# persistentVolumeClaim:
# claimName: backup-volume-claim
## -- Example profile that back ups to s3 endpoint
# - name: s3-backup
# snapshot:
# storage:
# s3:
# prefix: ""
# config: ""
# bucketName: ""
# endpoint: ""
schedules:
## -- Example schedule that backups daily
# - name: schedule-daily
# enabled: true
# schedule: "0 0 0 * * *"
# timeZone: "US/Central"
# deleteBackupData: false
# backupProfileName:

View File

@@ -1,6 +1,6 @@
apiVersion: v2
name: postgres-cluster
version: 3.8.4
version: 4.1.3
description: Chart for cloudnative-pg cluster
keywords:
- database
@@ -10,4 +10,4 @@ sources:
maintainers:
- name: alexlebens
icon: https://avatars.githubusercontent.com/u/100373852?s=48&v=4
appVersion: v1.23.1
appVersion: v1.25.0

View File

@@ -1,17 +1,82 @@
## Introduction
# postgres-cluster
[CloudNative PG](https://github.com/cloudnative-pg/cloudnative-pg)
![Version: 4.1.3](https://img.shields.io/badge/Version-4.1.3-informational?style=flat-square) ![AppVersion: v1.25.0](https://img.shields.io/badge/AppVersion-v1.25.0-informational?style=flat-square)
CloudNativePG is the Kubernetes operator that covers the full lifecycle of a highly available PostgreSQL database cluster with a primary/standby architecture, using native streaming replication.
Chart for cloudnative-pg cluster
This chart bootstraps a [CNPG](https://github.com/cloudnative-pg/cloudnative-pg) cluster on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
## Maintainers
## Prerequisites
| Name | Email | Url |
| ---- | ------ | --- |
| alexlebens | | |
- Kubernetes
- Helm
- CloudNative PG Operator
## Source Code
## Parameters
* <https://github.com/cloudnative-pg/cloudnative-pg>
See the [values files](values.yaml).
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| backup.backupIndex | int | `1` | Generate external cluster name, creates: postgresql-{{ .Release.Name }}-cluster-backup-index-{{ .Values.backups.backupIndex }}" |
| backup.backupName | string | `""` | Name of the backup cluster in the object store, defaults to "cluster.name" |
| backup.data.compression | string | `"snappy"` | Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. |
| backup.data.encryption | string | `""` | Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`. |
| backup.data.jobs | int | `2` | Number of data files to be archived or restored in parallel. |
| backup.destinationPath | string | `""` | S3 path starting with "s3://" |
| backup.enabled | bool | `false` | |
| backup.endpointCA | string | `""` | Specifies secret that contains a CA bundle to validate a privately signed certificate, should contain the key ca-bundle.crt |
| backup.endpointCredentials | string | `""` | Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY |
| backup.endpointURL | string | `""` | S3 endpoint starting with "https://" |
| backup.historyTags.backupRetentionPolicy | string | `""` | |
| backup.retentionPolicy | string | `"14d"` | Retention policy for backups |
| backup.schedule | string | `"0 0 0 * * *"` | Scheduled backup in cron format |
| backup.tags | object | `{"backupRetentionPolicy":""}` | Tags to add to backups. Add in key value beneath the type. |
| backup.wal.compression | string | `"snappy"` | WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. |
| backup.wal.encryption | string | `""` | Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`. |
| backup.wal.maxParallel | int | `2` | Number of WAL files to be archived or restored in parallel. |
| bootstrap | object | `{"initdb":{}}` | Bootstrap is the configuration of the bootstrap process when initdb is used. See: https://cloudnative-pg.io/documentation/current/bootstrap/ See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-bootstrapinitdb |
| bootstrap.initdb | object | `{}` | Example values database: app owner: app secret: "" # Name of the secret containing the initial credentials for the owner of the user database. If empty a new secret will be created from scratch postInitApplicationSQL: - CREATE TABLE IF NOT EXISTS example; |
| cluster.additionalLabels | object | `{}` | |
| cluster.affinity | object | `{"enablePodAntiAffinity":true,"topologyKey":"kubernetes.io/hostname"}` | See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-AffinityConfiguration |
| cluster.annotations | object | `{}` | |
| cluster.enableSuperuserAccess | bool | `false` | Create secret containing credentials of superuser |
| cluster.image | object | `{"pullPolicy":"IfNotPresent","repository":"ghcr.io/cloudnative-pg/postgresql","tag":"17.2-22"}` | Default image |
| cluster.instances | int | `3` | |
| cluster.logLevel | string | `"info"` | |
| cluster.monitoring | object | `{"enabled":false,"podMonitor":{"enabled":true},"prometheusRule":{"enableDefaultRules":true,"enabled":false,"excludeRules":[]}}` | Enable default monitoring and alert rules |
| cluster.postgresGID | int | `26` | |
| cluster.postgresUID | int | `26` | The UID and GID of the postgres user inside the image |
| cluster.postgresql | object | `{"parameters":{"hot_standby_feedback":"on","max_slot_wal_keep_size":"2000MB","shared_buffers":"128MB"},"shared_preload_libraries":[]}` | Parameters to be set for the database itself See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-PostgresConfiguration |
| cluster.primaryUpdateMethod | string | `"switchover"` | Method to follow to upgrade the primary server during a rolling update procedure, after all replicas have been successfully updated. It can be switchover (default) or in-place (restart). |
| cluster.primaryUpdateStrategy | string | `"unsupervised"` | Strategy to follow to upgrade the primary server during a rolling update procedure, after all replicas have been successfully updated: it can be automated (unsupervised - default) or manual (supervised) |
| cluster.priorityClassName | string | `""` | |
| cluster.resources | object | `{"limits":{"cpu":"1","hugepages-2Mi":"256Mi"},"requests":{"cpu":"100m","memory":"256Mi"}}` | Default resources |
| cluster.storage.size | string | `"10Gi"` | |
| cluster.storage.storageClass | string | `""` | |
| cluster.walStorage | object | `{"size":"2Gi","storageClass":""}` | Default storage size |
| mode | string | `"standalone"` | Cluster mode of operation. Available modes: * `standalone` - Default mode. Creates new or updates an existing CNPG cluster. * `recovery` - Same as standalone but creates a cluster from a backup, object store or via pg_basebackup * `replica` - Create database as a replica from another CNPG cluster |
| nameOverride | string | `""` | Override the name of the cluster |
| recovery | object | `{"data":{"compression":"snappy","encryption":"","jobs":2},"destinationPath":"","endpointCA":"","endpointCredentials":"","endpointURL":"","pitrTarget":{"time":""},"recoveryIndex":1,"recoveryInstanceName":"","recoveryServerName":"","wal":{"compression":"snappy","encryption":"","maxParallel":2}}` | Recovery settings when booting cluster from external cluster |
| recovery.data.compression | string | `"snappy"` | Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. |
| recovery.data.encryption | string | `""` | Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`. |
| recovery.data.jobs | int | `2` | Number of data files to be archived or restored in parallel. |
| recovery.endpointCA | string | `""` | Specifies secret that contains a CA bundle to validate a privately signed certificate, should contain the key ca-bundle.crt |
| recovery.endpointCredentials | string | `""` | Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY |
| recovery.endpointURL | string | `""` | S3 https endpoint and the s3:// path |
| recovery.pitrTarget | object | `{"time":""}` | Point in time recovery target in RFC3339 format |
| recovery.recoveryIndex | int | `1` | Generate external cluster name, uses: {{ .Release.Name }}postgresql-<major version>-cluster-backup-index-{{ .Values.recovery.recoveryIndex }} |
| recovery.recoveryInstanceName | string | `""` | Name of the recovery cluster in the object store, defaults to ".Release.Name" |
| recovery.recoveryServerName | string | `""` | Name of the recovery cluster in the object store, defaults to "cluster.name" |
| recovery.wal.compression | string | `"snappy"` | WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`. |
| recovery.wal.encryption | string | `""` | Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`. |
| recovery.wal.maxParallel | int | `2` | Number of WAL files to be archived or restored in parallel. |
| replica.externalCluster | object | `{"connectionParameters":{"dbname":"app","host":"postgresql","user":"app"},"password":{"key":"password","name":"postgresql"}}` | External cluster connection, password specifies a secret name and the key containing the password value |
| replica.importDatabases | list | `["app"]` | If type microservice only one database is allowed, default is app as standard in cnpg clusters |
| replica.importRoles | list | `[]` | If type microservice no roles are imported and ignored |
| replica.importType | string | `"microservice"` | See [here](https://cloudnative-pg.io/documentation/current/database_import/) for different import types * `microservice` - Single database import as expected from cnpg clusters * `monolith` - Import multiple databases and roles |
| replica.postImportApplicationSQL | list | `[]` | If import type is monolith postImportApplicationSQL is not supported and ignored |
| type | string | `"postgresql"` | Type of the CNPG database. Available types: * `postgresql` * `postgis` * `timescaledb` * `tensorchord` |
----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)

View File

@@ -11,6 +11,14 @@ backup:
key: ca-bundle.crt
{{- end }}
serverName: "{{ include "cluster.name" . }}-backup-{{ .Values.backup.backupIndex }}"
tags:
{{- with .Values.backup.tags }}
{{- . | toYaml | nindent 6 }}
{{- end }}
historyTags:
{{- with .Values.backup.historyTags }}
{{- . | toYaml | nindent 6 }}
{{- end }}
s3Credentials:
accessKeyId:
name: {{ include "cluster.backupCredentials" . }}

View File

@@ -2,12 +2,15 @@
bootstrap:
{{- if eq .Values.mode "standalone" }}
initdb:
{{- with .Values.cluster.initdb }}
{{- with .Values.bootstrap.initdb }}
{{- with (omit . "postInitApplicationSQL") }}
{{- . | toYaml | nindent 4 }}
{{- end }}
{{- end }}
{{- if or (eq .Values.type "postgis") (eq .Values.type "timescaledb") (.Values.cluster.initdb.postInitApplicationSQL) }}
{{- if eq .Values.type "tensorchord" }}
dataChecksums: true
{{- end }}
{{- if or (eq .Values.type "postgis") (eq .Values.type "timescaledb") (eq .Values.type "tensorchord") (.Values.bootstrap.initdb.postInitApplicationSQL) }}
postInitApplicationSQL:
{{- if eq .Values.type "postgis" }}
- CREATE EXTENSION IF NOT EXISTS postgis;
@@ -16,8 +19,17 @@ bootstrap:
- CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;
{{- else if eq .Values.type "timescaledb" }}
- CREATE EXTENSION IF NOT EXISTS timescaledb;
{{- else if eq .Values.type "tensorchord" }}
- ALTER SYSTEM SET search_path TO "$user", public, vectors;
- SET search_path TO "$user", public, vectors;
- CREATE EXTENSION IF NOT EXISTS "vectors";
- CREATE EXTENSION IF NOT EXISTS "cube";
- CREATE EXTENSION IF NOT EXISTS "earthdistance";
- ALTER SCHEMA vectors OWNER TO "app";
- GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA vectors TO "app";
- GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "app";
{{- end }}
{{- with .Values.cluster.initdb }}
{{- with .Values.bootstrap.initdb }}
{{- range .postInitApplicationSQL }}
{{- printf "- %s" . | nindent 6 }}
{{- end }}
@@ -49,6 +61,11 @@ bootstrap:
{{- end }}
source:
externalCluster: "{{ include "cluster.name" . }}-cluster"
{{- with .Values.bootstrap.initdb }}
{{- with (omit . "postInitApplicationSQL") }}
{{- . | toYaml | nindent 4 }}
{{- end }}
{{- end }}
externalClusters:
- name: "{{ include "cluster.name" . }}-cluster"
{{- with .Values.replica.externalCluster }}

View File

@@ -18,6 +18,7 @@ spec:
imagePullPolicy: {{ .Values.cluster.image.pullPolicy }}
postgresUID: {{ .Values.cluster.postgresUID }}
postgresGID: {{ .Values.cluster.postgresGID }}
enableSuperuserAccess: {{ .Values.cluster.enableSuperuserAccess }}
walStorage:
size: {{ .Values.cluster.walStorage.size }}
storageClass: {{ .Values.cluster.walStorage.storageClass }}
@@ -43,6 +44,15 @@ spec:
shared_preload_libraries:
- timescaledb
{{- end }}
{{- if eq .Values.type "tensorchord" }}
shared_preload_libraries:
- vectors.so
enableAlterSystem: true
{{- end }}
{{- with .Values.cluster.postgresql.shared_preload_libraries }}
shared_preload_libraries:
{{- toYaml . | nindent 6 }}
{{ end }}
{{- with .Values.cluster.postgresql.parameters }}
parameters:
{{- toYaml . | nindent 6 }}
@@ -51,4 +61,5 @@ spec:
enablePodMonitor: {{ and .Values.cluster.monitoring.enabled .Values.cluster.monitoring.podMonitor.enabled }}
{{ include "cluster.bootstrap" . | nindent 2 }}
{{ include "cluster.backup" . | nindent 2 }}

View File

@@ -14,10 +14,10 @@ spec:
- name: cloudnative-pg/{{ include "cluster.name" . }}
rules:
{{- $dict := dict "excludeRules" .Values.cluster.monitoring.prometheusRule.excludeRules -}}
{{- $_ := set $dict "value" "{{ $value }}" -}}
{{- $_ := set $dict "value" "{{`{{`}} $value {{`}}`}}" -}}
{{- $_ := set $dict "namespace" .Release.Namespace -}}
{{- $_ := set $dict "cluster" (printf "%s-cluster" (include "cluster.name" .) ) -}}
{{- $_ := set $dict "labels" (dict "job" "{{ $labels.job }}" "node" "{{ $labels.node }}" "pod" "{{ $labels.pod }}") -}}
{{- $_ := set $dict "labels" (dict "job" "{{`{{`}} $labels.job {{`}}`}}" "node" "{{`{{`}} $labels.node {{`}}`}}" "pod" "{{`{{`}} $labels.pod {{`}}`}}") -}}
{{- $_ := set $dict "podSelector" (printf "%s-cluster-([1-9][0-9]*)$" (include "cluster.name" .) ) -}}
{{- $_ := set $dict "Values" .Values -}}
{{- $_ := set $dict "Template" .Template -}}
@@ -27,4 +27,71 @@ spec:
- {{ $tpl }}
{{- end -}}
{{- end -}}
{{- if .Values.cluster.monitoring.prometheusRule.enableDefaultRules }}
- name: cloudnative-pg/default-rules
rules:
- alert: LongRunningTransaction
annotations:
description: Pod {{`{{`}} $labels.pod {{`}}`}} is taking more than 5 minutes (300 seconds) for a query.
summary: A query is taking longer than 5 minutes.
expr: |-
cnpg_backends_max_tx_duration_seconds > 300
for: 1m
labels:
severity: warning
- alert: BackendsWaiting
annotations:
description: Pod {{`{{`}} $labels.pod {{`}}`}} has been waiting for longer than 5 minutes
summary: If a backend is waiting for longer than 5 minutes
expr: |-
cnpg_backends_waiting_total > 300
for: 1m
labels:
severity: warning
- alert: PGDatabaseXidAge
annotations:
description: Over 300,000,000 transactions from frozen xid on pod {{`{{`}} $labels.pod {{`}}`}}
summary: Number of transactions from the frozen XID to the current one
expr: |-
cnpg_pg_database_xid_age > 300000000
for: 1m
labels:
severity: warning
- alert: PGReplication
annotations:
description: Standby is lagging behind by over 300 seconds (5 minutes)
summary: The standby is lagging behind the primary
expr: |-
cnpg_pg_replication_lag > 300
for: 1m
labels:
severity: warning
- alert: LastFailedArchiveTime
annotations:
description: Archiving failed for {{`{{`}} $labels.pod {{`}}`}}
summary: Checks the last time archiving failed. Will be < 0 when it has not failed.
expr: |-
(cnpg_pg_stat_archiver_last_failed_time - cnpg_pg_stat_archiver_last_archived_time) > 1
for: 1m
labels:
severity: warning
- alert: DatabaseDeadlockConflicts
annotations:
description: There are over 10 deadlock conflicts in {{`{{`}} $labels.pod {{`}}`}}
summary: Checks the number of database conflicts
expr: |-
cnpg_pg_stat_database_deadlocks > 10
for: 1m
labels:
severity: warning
- alert: ReplicaFailingReplication
annotations:
description: Replica {{`{{`}} $labels.pod {{`}}`}} is failing to replicate
summary: Checks if the replica is failing to replicate
expr: |-
cnpg_pg_replication_in_recovery > cnpg_pg_replication_is_wal_receiver_up
for: 1m
labels:
severity: warning
{{- end }}
{{ end }}

View File

@@ -1,15 +1,14 @@
# -- Override the name of the cluster
nameOverride: ""
###
# -- Type of the CNPG database. Available types:
# * `postgresql`
# * `postgis`
# * `timescaledb`
# * `tensorchord`
type: postgresql
###
# Cluster mode of operation. Available modes:
# -- Cluster mode of operation. Available modes:
# * `standalone` - Default mode. Creates new or updates an existing CNPG cluster.
# * `recovery` - Same as standalone but creates a cluster from a backup, object store or via pg_basebackup
# * `replica` - Create database as a replica from another CNPG cluster
@@ -18,15 +17,20 @@ mode: standalone
cluster:
instances: 3
# -- Default image
image:
repository: ghcr.io/cloudnative-pg/postgresql
tag: "16.3"
tag: "17.2-22"
pullPolicy: IfNotPresent
# The UID and GID of the postgres user inside the image
# -- The UID and GID of the postgres user inside the image
postgresUID: 26
postgresGID: 26
# -- Create secret containing credentials of superuser
enableSuperuserAccess: false
# -- Default storage size
walStorage:
size: 2Gi
storageClass: ""
@@ -34,116 +38,123 @@ cluster:
size: 10Gi
storageClass: ""
# -- Default resources
resources:
requests:
memory: 256Mi
cpu: 10m
cpu: 100m
limits:
memory: 1Gi
cpu: 800m
cpu: '1'
hugepages-2Mi: 256Mi
# See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-AffinityConfiguration
# -- See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-AffinityConfiguration
affinity:
enablePodAntiAffinity: true
topologyKey: kubernetes.io/hostname
additionalLabels: {}
annotations: {}
priorityClassName: ""
# Method to follow to upgrade the primary server during a rolling update procedure, after all replicas have been
# -- Method to follow to upgrade the primary server during a rolling update procedure, after all replicas have been
# successfully updated. It can be switchover (default) or in-place (restart).
primaryUpdateMethod: switchover
# Strategy to follow to upgrade the primary server during a rolling update procedure, after all replicas have been
# -- Strategy to follow to upgrade the primary server during a rolling update procedure, after all replicas have been
# successfully updated: it can be automated (unsupervised - default) or manual (supervised)
primaryUpdateStrategy: unsupervised
logLevel: "info"
# -- Enable default monitoring and alert rules
monitoring:
enabled: false
podMonitor:
enabled: true
prometheusRule:
enabled: false
enableDefaultRules: true
excludeRules: []
# -- Parameters to be set for the database itself
# See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-PostgresConfiguration
postgresql:
parameters:
shared_buffers: 128MB
max_slot_wal_keep_size: 2000MB
hot_standby_feedback: "on"
shared_preload_libraries: []
# BootstrapInitDB is the configuration of the bootstrap process when initdb is used.
# See: https://cloudnative-pg.io/documentation/current/bootstrap/
# See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-bootstrapinitdb
initdb: {}
# -- Bootstrap is the configuration of the bootstrap process when initdb is used.
# See: https://cloudnative-pg.io/documentation/current/bootstrap/
# See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-bootstrapinitdb
bootstrap:
# -- Example values
# database: app
# owner: app
# secret: "" # Name of the secret containing the initial credentials for the owner of the user database. If empty a new secret will be created from scratch
# postInitApplicationSQL:
# - CREATE TABLE IF NOT EXISTS example;
initdb: {}
# -- Recovery settings when booting cluster from external cluster
recovery:
# Point in time recovery target in RFC3339 format
# -- Point in time recovery target in RFC3339 format
pitrTarget:
time: ""
# S3 https endpoint and the s3:// path
# -- S3 https endpoint and the s3:// path
endpointURL: ""
destinationPath: ""
# Specifies secret that contains a CA bundle to validate a privately signed certificate, should contain the key ca-bundle.crt
# -- Specifies secret that contains a CA bundle to validate a privately signed certificate, should contain the key ca-bundle.crt
endpointCA: ""
# Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY
# -- Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY
endpointCredentials: ""
# Generate external cluster name, uses: {{ .Release.Name }}postgresql-<major version>-cluster-backup-index-{{ .Values.recovery.recoveryIndex }}
# -- Generate external cluster name, uses: {{ .Release.Name }}postgresql-<major version>-cluster-backup-index-{{ .Values.recovery.recoveryIndex }}
recoveryIndex: 1
# Name of the recovery cluster in the object store, defaults to "cluster.name"
# -- Name of the recovery cluster in the object store, defaults to "cluster.name"
recoveryServerName: ""
# Name of the recovery cluster in the object store, defaults to ".Release.Name"
# -- Name of the recovery cluster in the object store, defaults to ".Release.Name"
recoveryInstanceName: ""
wal:
# WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`.
# -- WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`.
compression: snappy
# Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`.
# -- Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`.
encryption: ""
# Number of WAL files to be archived or restored in parallel.
# -- Number of WAL files to be archived or restored in parallel.
maxParallel: 2
data:
# Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`.
# -- Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`.
compression: snappy
# Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`.
# -- Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`.
encryption: ""
# Number of data files to be archived or restored in parallel.
# -- Number of data files to be archived or restored in parallel.
jobs: 2
replica:
# See https://cloudnative-pg.io/documentation/current/database_import/
# -- See [here](https://cloudnative-pg.io/documentation/current/database_import/) for different import types
# * `microservice` - Single database import as expected from cnpg clusters
# * `monolith` - Import multiple databases and roles
importType: microservice
# If type microservice only one database is allowed, default is app as standard in cnpg clusters
# -- If type microservice only one database is allowed, default is app as standard in cnpg clusters
importDatabases:
- app
# If type microservice no roles are imported and ignored
# -- If type microservice no roles are imported and ignored
importRoles: []
# If import type is monolith postImportApplicationSQL is not supported and ignored
# -- If import type is monolith postImportApplicationSQL is not supported and ignored
postImportApplicationSQL: []
# External cluster connection, password specifies a secret name and the key containing the password value
# -- External cluster connection, password specifies a secret name and the key containing the password value
externalCluster:
connectionParameters:
host: postgresql
@@ -156,41 +167,47 @@ replica:
backup:
enabled: false
# S3 endpoint starting with "https://"
# -- S3 endpoint starting with "https://"
endpointURL: ""
# S3 path starting with "s3://"
# -- S3 path starting with "s3://"
destinationPath: ""
# Specifies secret that contains a CA bundle to validate a privately signed certificate, should contain the key ca-bundle.crt
# -- Specifies secret that contains a CA bundle to validate a privately signed certificate, should contain the key ca-bundle.crt
endpointCA: ""
# Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY
# -- Specifies secret that contains S3 credentials, should contain the keys ACCESS_KEY_ID and ACCESS_SECRET_KEY
endpointCredentials: ""
# Generate external cluster name, creates: postgresql-{{ .Release.Name }}-cluster-backup-index-{{ .Values.backups.backupIndex }}"
# -- Generate external cluster name, creates: postgresql-{{ .Release.Name }}-cluster-backup-index-{{ .Values.backups.backupIndex }}"
backupIndex: 1
# Name of the backup cluster in the object store, defaults to "cluster.name"
# -- Name of the backup cluster in the object store, defaults to "cluster.name"
backupName: ""
# -- Tags to add to backups. Add in key value beneath the type.
tags:
backupRetentionPolicy: ""
historyTags:
backupRetentionPolicy: ""
wal:
# WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`.
# -- WAL compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`.
compression: snappy
# Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`.
# -- Whether to instruct the storage provider to encrypt WAL files. One of `` (use the storage container default), `AES256` or `aws:kms`.
encryption: ""
# Number of WAL files to be archived or restored in parallel.
# -- Number of WAL files to be archived or restored in parallel.
maxParallel: 2
data:
# Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`.
# -- Data compression method. One of `` (for no compression), `gzip`, `bzip2` or `snappy`.
compression: snappy
# Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`.
# -- Whether to instruct the storage provider to encrypt data files. One of `` (use the storage container default), `AES256` or `aws:kms`.
encryption: ""
# Number of data files to be archived or restored in parallel.
# -- Number of data files to be archived or restored in parallel.
jobs: 2
# Retention policy for backups
retentionPolicy: "30d"
# -- Retention policy for backups
retentionPolicy: "14d"
# Scheduled backup in cron format
# -- Scheduled backup in cron format
schedule: "0 0 0 * * *"