Compare commits
13 Commits
postgres-c
...
postgres-c
Author | SHA1 | Date | |
---|---|---|---|
71dbdbf9df | |||
1e17a769dc | |||
78024a129f | |||
5cca3b2717 | |||
a70137cfbd | |||
dc4df55373 | |||
a3f42e13ce | |||
a48262f115 | |||
bd458a3a3d | |||
3aa9113d24 | |||
1fe8881dfb | |||
fa6067e68b | |||
8a50f22e31 |
66
.gitea/workflows/release-charts-barman-cloud.yml
Normal file
66
.gitea/workflows/release-charts-barman-cloud.yml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
name: release-charts-cloudfbarman-cloudlared
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- "charts/barman-cloud/**"
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
WORKFLOW_DIR: "charts/barman-cloud"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Helm
|
||||||
|
uses: azure/setup-helm@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
version: latest
|
||||||
|
|
||||||
|
- name: Package Helm Chart
|
||||||
|
run: |
|
||||||
|
cd $WORKFLOW_DIR
|
||||||
|
helm dependency build
|
||||||
|
echo "PACKAGE_PATH=$(helm package . | awk '{print $NF}')" >> $GITEA_ENV
|
||||||
|
|
||||||
|
- name: Publish Helm Chart to Harbor
|
||||||
|
run: |
|
||||||
|
helm registry login ${{ vars.REGISTRY_HOST }} -u ${{ vars.REGISTRY_USER }} -p ${{ secrets.REGISTRY_SECRET }}
|
||||||
|
helm push ${{ env.PACKAGE_PATH }} oci://${{ vars.REGISTRY_HOST }}/helm-charts
|
||||||
|
|
||||||
|
- name: Publish Helm Chart to Gitea
|
||||||
|
run: |
|
||||||
|
helm plugin install https://github.com/chartmuseum/helm-push
|
||||||
|
helm repo add --username ${{ gitea.actor }} --password ${{ secrets.REPOSITORY_TOKEN }} helm-charts https://${{ vars.REPOSITORY_HOST }}/api/packages/alexlebens/helm
|
||||||
|
helm cm-push ${{ env.PACKAGE_PATH }} helm-charts
|
||||||
|
|
||||||
|
- name: Extract Chart Metadata
|
||||||
|
run: |
|
||||||
|
cd $WORKFLOW_DIR
|
||||||
|
echo "CHART_VERSION=$(yq '.version' Chart.yaml)" >> $GITEA_ENV
|
||||||
|
echo "CHART_NAME=$(yq '.name' Chart.yaml)" >> $GITEA_ENV
|
||||||
|
|
||||||
|
- name: Release Helm Chart
|
||||||
|
uses: akkuman/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
name: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}
|
||||||
|
tag_name: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}
|
||||||
|
files: |-
|
||||||
|
${{ env.PACKAGE_PATH }}
|
||||||
|
|
||||||
|
- name: Actions Ntfy
|
||||||
|
run: |
|
||||||
|
curl \
|
||||||
|
-H "Authorization: Bearer ${{ secrets.NTFY_CRED }}" \
|
||||||
|
-H "Title: Chart Released: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}" \
|
||||||
|
-H "Content-Type: text/plain" \
|
||||||
|
-d $'Repo: ${{ gitea.repository }}\nCommit: ${{ gitea.sha }}\nRef: ${{ gitea.ref }}\nStatus: ${{ job.status}}' \
|
||||||
|
${{ secrets.NTFY_URL }}
|
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: postgres-cluster
|
name: postgres-cluster
|
||||||
version: 6.3.2
|
version: 6.4.4
|
||||||
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
|
||||||
|
|
||||||
|
@@ -131,6 +131,8 @@ externalClusters:
|
|||||||
- name: {{ include "cluster.recoveryServerName" . }}
|
- name: {{ include "cluster.recoveryServerName" . }}
|
||||||
plugin:
|
plugin:
|
||||||
name: barman-cloud.cloudnative-pg.io
|
name: barman-cloud.cloudnative-pg.io
|
||||||
|
enabled: true
|
||||||
|
isWALArchiver: false
|
||||||
parameters:
|
parameters:
|
||||||
barmanObjectName: "{{ include "cluster.name" . }}-{{ .Values.recovery.objectStore.name }}"
|
barmanObjectName: "{{ include "cluster.name" . }}-{{ .Values.recovery.objectStore.name }}"
|
||||||
serverName: {{ include "cluster.recoveryServerName" . }}
|
serverName: {{ include "cluster.recoveryServerName" . }}
|
||||||
|
@@ -80,7 +80,7 @@ Generate recovery server name
|
|||||||
{{- if .Values.recovery.recoveryServerName -}}
|
{{- if .Values.recovery.recoveryServerName -}}
|
||||||
{{- .Values.recovery.recoveryServerName -}}
|
{{- .Values.recovery.recoveryServerName -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- printf "%s-backup-%s" (include "cluster.name" .) (toString .Values.recovery.recoveryIndex) | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-backup-%s" (include "cluster.name" .) (toString .Values.recovery.objectStore.index) | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
@@ -24,14 +24,23 @@ spec:
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{- range $objectStore := .Values.backup.objectStore }}
|
{{- range $objectStore := .Values.backup.objectStore }}
|
||||||
- name: barman-cloud.cloudnative-pg.io
|
- name: barman-cloud.cloudnative-pg.io
|
||||||
|
enabled: true
|
||||||
isWALArchiver: {{ $objectStore.isWALArchiver | default true }}
|
isWALArchiver: {{ $objectStore.isWALArchiver | default true }}
|
||||||
parameters:
|
parameters:
|
||||||
barmanObjectName: "{{ include "cluster.name" $ }}-{{ $objectStore.name }}-backup"
|
barmanObjectName: "{{ include "cluster.name" $ }}-{{ $objectStore.name }}-backup"
|
||||||
|
{{- if $objectStore.clusterName }}
|
||||||
|
serverName: "{{ $objectStore.clusterName }}-backup-{{ $objectStore.index }}"
|
||||||
|
{{- else }}
|
||||||
|
serverName: "{{ include "cluster.name" $ }}-backup-{{ $objectStore.index }}"
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ if eq .Values.recovery.method "objectStore" }}
|
{{ if eq .Values.recovery.method "objectStore" }}
|
||||||
- name: barman-cloud.cloudnative-pg.io
|
- name: barman-cloud.cloudnative-pg.io
|
||||||
|
enabled: true
|
||||||
|
isWALArchiver: false
|
||||||
parameters:
|
parameters:
|
||||||
barmanObjectName: "{{ include "cluster.name" . }}-{{ .Values.recovery.objectStore.name }}"
|
barmanObjectName: "{{ include "cluster.name" . }}-{{ .Values.recovery.objectStore.name }}"
|
||||||
|
serverName: {{ include "cluster.recoveryServerName" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
storage:
|
storage:
|
||||||
size: {{ .Values.cluster.storage.size }}
|
size: {{ .Values.cluster.storage.size }}
|
||||||
|
@@ -19,11 +19,6 @@ spec:
|
|||||||
name: {{ .endpointCA.name }}
|
name: {{ .endpointCA.name }}
|
||||||
key: {{ .endpointCA.key }}
|
key: {{ .endpointCA.key }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .clusterName }}
|
|
||||||
serverName: "{{ .clusterName }}-backup-{{ .index }}"
|
|
||||||
{{- else }}
|
|
||||||
serverName: "{{ include "cluster.name" $context }}-backup-{{ .index }}"
|
|
||||||
{{- end }}
|
|
||||||
{{- if .wal }}
|
{{- if .wal }}
|
||||||
wal:
|
wal:
|
||||||
compression: {{ .wal.compression | default "snappy" }}
|
compression: {{ .wal.compression | default "snappy" }}
|
||||||
@@ -76,7 +71,6 @@ spec:
|
|||||||
name: {{ .Values.recovery.objectStore.endpointCA.name }}
|
name: {{ .Values.recovery.objectStore.endpointCA.name }}
|
||||||
key: {{ .Values.recovery.objectStore.endpointCA.key }}
|
key: {{ .Values.recovery.objectStore.endpointCA.key }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serverName: {{ include "cluster.recoveryServerName" . }}
|
|
||||||
wal:
|
wal:
|
||||||
compression: {{ .Values.recovery.objectStore.wal.compression }}
|
compression: {{ .Values.recovery.objectStore.wal.compression }}
|
||||||
{{- with .Values.recovery.objectStore.wal.encryption}}
|
{{- with .Values.recovery.objectStore.wal.encryption}}
|
||||||
|
@@ -493,7 +493,7 @@ backup:
|
|||||||
# name: daily-backup
|
# name: daily-backup
|
||||||
|
|
||||||
# # -- Schedule in cron format
|
# # -- Schedule in cron format
|
||||||
# schedule: "0 0 */3 * *"
|
# schedule: "0 0 0 * * *"
|
||||||
|
|
||||||
# # -- Start backup on deployment
|
# # -- Start backup on deployment
|
||||||
# immediate: false
|
# immediate: false
|
||||||
|
Reference in New Issue
Block a user