Compare commits

...

43 Commits

Author SHA1 Message Date
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
9f68b30a31 change condition handling 2024-07-08 12:09:29 -05:00
668d50dfdb add conditional check for postinit 2024-07-04 22:52:02 -05:00
93a232947e increment chart 2024-07-04 22:45:41 -05:00
667236239d fix backup fields 2024-07-04 22:45:18 -05:00
875f0c143c fix backup fields 2024-07-04 22:41:31 -05:00
670b6e600c add conditional check for values 2024-07-01 18:08:23 -05:00
6f5b5ffcb4 change value inseration 2024-07-01 18:08:23 -05:00
renovate[bot]
295a7296bc Update cloudflare/cloudflared Docker tag to v2024.6.1 (#60)
* Update cloudflare/cloudflared Docker tag to v2024.6.1

* update chart

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: alexlebens <alexanderlebens@gmail.com>
2024-06-28 17:01:04 -05:00
f1b4020287 change flow control 2024-06-22 18:26:19 -05:00
969357a664 change null handling 2024-06-22 18:22:25 -05:00
22 changed files with 276 additions and 476 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 # 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" ":rebaseStalePrs"
], ],
"timezone": "US/Central", "timezone": "US/Central",
"schedule": [
"every weekday"
],
"labels": [], "labels": [],
"packageRules": [ "packageRules": [
{ {
"description": "Disables for non major Renovate version", "description": "Disables for non major Renovate version",
"matchPaths": [ "matchFileNames": [
".github/renovate-update-notification/Dockerfile" ".github/renovate-update-notification/Dockerfile"
], ],
"matchUpdateTypes": [ "matchUpdateTypes": [
@@ -27,7 +24,7 @@
}, },
{ {
"description": "Generate for major Renovate version", "description": "Generate for major Renovate version",
"matchPaths": [ "matchFileNames": [
".github/renovate-update-notification/Dockerfile" ".github/renovate-update-notification/Dockerfile"
], ],
"matchUpdateTypes": [ "matchUpdateTypes": [

View File

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

View File

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

View File

@@ -3,7 +3,7 @@ existingSecretName: cloudflared-secret
existingSecretKey: cf-tunnel-token existingSecretKey: cf-tunnel-token
image: image:
repository: cloudflare/cloudflared repository: cloudflare/cloudflared
tag: "2024.6.0" tag: "2024.12.2"
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
resources: resources:
requests: requests:

View File

@@ -0,0 +1,18 @@
apiVersion: v2
name: generic-device-plugin
version: 0.1.2
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.5.1
appVersion: 0.1.2

View File

@@ -0,0 +1,16 @@
## Introduction
[Generic Device Plugin](https://github.com/squat/generic-device-plugin)
The generic-device-plugin enables allocating generic Linux devices, such as serial devices, the FUSE device, or video cameras, to Kubernetes Pods.
This chart bootstraps a [Generic Device Plugin](https://github.com/squat/generic-device-plugin) daemonset on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
## Prerequisites
- Kubernetes
- Helm
## Parameters
See the [values files](values.yaml).

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,74 @@
name: generic-device-plugin
image:
repository: ghcr.io/squat/generic-device-plugin
pullPolicy: Always
tag: latest
deviceDomain: squat.ai
service:
listenPort: 8080
resources:
limit:
cpu: 100m
memory: 20Mi
requests:
cpu: 50m
memory: 10Mi
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.2
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 }}
podSpec:
{{- with .Values.cluster.podSpec }}
{{ toYaml . | nindent 4 }}
{{- end }}
podAnnotations:
{{- with .Values.cluster.podAnnotations }}
{{ toYaml . | nindent 4 }}
{{- end }}
podLabels:
{{- with .Values.cluster.podLabels }}
{{ toYaml . | nindent 4 }}
{{- end }}
router:
instances: {{ required "router.instances is required" .Values.cluster.router.instances }}
podSpec:
{{- with .Values.cluster.router.podSpec }}
{{- toYaml . | nindent 6 }}
{{- end }}
podAnnotations:
{{- with .Values.cluster.router.podAnnotations }}
{{- toYaml . | nindent 6 }}
{{- end }}
podLabels:
{{- with .Values.cluster.router.podLabels }}
{{- toYaml . | 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 apiVersion: v2
name: postgres-cluster name: postgres-cluster
version: 3.6.0 version: 3.20.0
description: Chart for cloudnative-pg cluster description: Chart for cloudnative-pg cluster
keywords: keywords:
- database - database
@@ -10,4 +10,4 @@ sources:
maintainers: maintainers:
- name: alexlebens - name: alexlebens
icon: https://avatars.githubusercontent.com/u/100373852?s=48&v=4 icon: https://avatars.githubusercontent.com/u/100373852?s=48&v=4
appVersion: v1.23.1 appVersion: v1.24.1

View File

@@ -11,6 +11,14 @@ backup:
key: ca-bundle.crt key: ca-bundle.crt
{{- end }} {{- end }}
serverName: "{{ include "cluster.name" . }}-backup-{{ .Values.backup.backupIndex }}" 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: s3Credentials:
accessKeyId: accessKeyId:
name: {{ include "cluster.backupCredentials" . }} name: {{ include "cluster.backupCredentials" . }}
@@ -19,12 +27,24 @@ backup:
name: {{ include "cluster.backupCredentials" . }} name: {{ include "cluster.backupCredentials" . }}
key: ACCESS_SECRET_KEY key: ACCESS_SECRET_KEY
wal: wal:
{{- if .Values.backup.wal.compression }}
compression: {{ .Values.backup.wal.compression }} compression: {{ .Values.backup.wal.compression }}
{{- end }}
{{- if .Values.backup.wal.encryption }}
encryption: {{ .Values.backup.wal.encryption }} encryption: {{ .Values.backup.wal.encryption }}
{{- end }}
{{- if .Values.backup.wal.maxParallel }}
maxParallel: {{ .Values.backup.wal.maxParallel }} maxParallel: {{ .Values.backup.wal.maxParallel }}
{{- end }}
data: data:
{{- if .Values.backup.data.compression }}
compression: {{ .Values.backup.data.compression }} compression: {{ .Values.backup.data.compression }}
{{- end }}
{{- if .Values.backup.data.encryption }}
encryption: {{ .Values.backup.data.encryption }} encryption: {{ .Values.backup.data.encryption }}
{{- end }}
{{- if .Values.backup.data.jobs }}
jobs: {{ .Values.backup.data.jobs }} jobs: {{ .Values.backup.data.jobs }}
{{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@@ -7,6 +7,10 @@ bootstrap:
{{- . | toYaml | nindent 4 }} {{- . | toYaml | nindent 4 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if eq .Values.type "tensorchord" }}
dataChecksums: true
{{- end }}
{{- if or (eq .Values.type "postgis") (eq .Values.type "timescaledb") (eq .Values.type "tensorchord") (.Values.cluster.initdb.postInitApplicationSQL) }}
postInitApplicationSQL: postInitApplicationSQL:
{{- if eq .Values.type "postgis" }} {{- if eq .Values.type "postgis" }}
- CREATE EXTENSION IF NOT EXISTS postgis; - CREATE EXTENSION IF NOT EXISTS postgis;
@@ -15,14 +19,29 @@ bootstrap:
- CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder; - CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;
{{- else if eq .Values.type "timescaledb" }} {{- else if eq .Values.type "timescaledb" }}
- CREATE EXTENSION IF NOT EXISTS 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 }} {{- end }}
{{- with .Values.cluster.initdb }} {{- with .Values.cluster.initdb }}
{{- range .postInitApplicationSQL }} {{- range .postInitApplicationSQL }}
{{- printf "- %s" . | nindent 6 }} {{- printf "- %s" . | nindent 6 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }}
{{- else if eq .Values.mode "replica" }} {{- else if eq .Values.mode "replica" }}
initdb: initdb:
{{- if .eq .Values.replica.importType "microservice" }}
{{- with index .Values.replica.importDatabases 0 }}
database: {{- . | quote }}
{{- end }}
{{- end }}
import: import:
type: {{ .Values.replica.importType }} type: {{ .Values.replica.importType }}
databases: databases:
@@ -78,13 +97,25 @@ externalClusters:
name: {{ include "cluster.recoveryCredentials" . }} name: {{ include "cluster.recoveryCredentials" . }}
key: ACCESS_SECRET_KEY key: ACCESS_SECRET_KEY
wal: wal:
{{- if .Values.recovery.wal.compression }}
compression: {{ .Values.recovery.wal.compression }} compression: {{ .Values.recovery.wal.compression }}
{{- end }}
{{- if .Values.recovery.wal.encryption }}
encryption: {{ .Values.recovery.wal.encryption }} encryption: {{ .Values.recovery.wal.encryption }}
{{- end }}
{{- if .Values.recovery.wal.maxParallel }}
maxParallel: {{ .Values.recovery.wal.maxParallel }} maxParallel: {{ .Values.recovery.wal.maxParallel }}
{{- end }}
data: data:
{{- if .Values.recovery.data.compression }}
compression: {{ .Values.recovery.data.compression }} compression: {{ .Values.recovery.data.compression }}
{{- end }}
{{- if .Values.recovery.data.encryption }}
encryption: {{ .Values.recovery.data.encryption }} encryption: {{ .Values.recovery.data.encryption }}
{{- end }}
{{- if .Values.recovery.data.jobs }}
jobs: {{ .Values.recovery.data.jobs }} jobs: {{ .Values.recovery.data.jobs }}
{{- end }}
{{- else }} {{- else }}
{{ fail "Invalid cluster mode!" }} {{ fail "Invalid cluster mode!" }}
{{- end }} {{- end }}

View File

@@ -32,15 +32,26 @@ spec:
affinity: affinity:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
{{- if .Values.cluster.priorityClassName }}
priorityClassName: {{ .Values.cluster.priorityClassName }} priorityClassName: {{ .Values.cluster.priorityClassName }}
{{- end }}
primaryUpdateMethod: {{ .Values.cluster.primaryUpdateMethod }} primaryUpdateMethod: {{ .Values.cluster.primaryUpdateMethod }}
primaryUpdateStrategy: {{ .Values.cluster.primaryUpdateStrategy }} primaryUpdateStrategy: {{ .Values.cluster.primaryUpdateStrategy }}
logLevel: {{ .Values.cluster.logLevel }} logLevel: {{ .Values.cluster.logLevel }}
postgresql: postgresql:
{{- if eq .Values.type "timescaledb" }}
shared_preload_libraries: shared_preload_libraries:
{{- if eq .Values.type "timescaledb" }}
- timescaledb - timescaledb
{{- end }} {{- 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 }} {{- with .Values.cluster.postgresql.parameters }}
parameters: parameters:
{{- toYaml . | nindent 6 }} {{- toYaml . | nindent 6 }}

View File

@@ -6,6 +6,7 @@ nameOverride: ""
# * `postgresql` # * `postgresql`
# * `postgis` # * `postgis`
# * `timescaledb` # * `timescaledb`
# * `tensorchord`
type: postgresql type: postgresql
### ###
@@ -20,7 +21,7 @@ cluster:
image: image:
repository: ghcr.io/cloudnative-pg/postgresql repository: ghcr.io/cloudnative-pg/postgresql
tag: "16.3" tag: "16.6-22"
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# The UID and GID of the postgres user inside the image # The UID and GID of the postgres user inside the image
@@ -77,6 +78,7 @@ cluster:
shared_buffers: 128MB shared_buffers: 128MB
max_slot_wal_keep_size: 2000MB max_slot_wal_keep_size: 2000MB
hot_standby_feedback: "on" hot_standby_feedback: "on"
shared_preload_libraries: []
# BootstrapInitDB is the configuration of the bootstrap process when initdb is used. # 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/bootstrap/
@@ -174,6 +176,13 @@ backup:
# 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: "" backupName: ""
# Tags to add to backups. Add in key value beneath the type.
tags:
backupRetentionPolicy: ""
historyTags:
backupRetentionPolicy: ""
# Configuration for the WAL and data files.
wal: 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 compression: snappy
@@ -190,7 +199,7 @@ backup:
jobs: 2 jobs: 2
# Retention policy for backups # Retention policy for backups
retentionPolicy: "30d" retentionPolicy: "14d"
# Scheduled backup in cron format # Scheduled backup in cron format
schedule: "0 0 0 * * *" schedule: "0 0 0 * * *"