Skip to content

Add CNPG cluster chart as vshnpostgresql#14

Closed
mikeshootzz wants to merge 6 commits into
mainfrom
add/cnpg-cluster-chart
Closed

Add CNPG cluster chart as vshnpostgresql#14
mikeshootzz wants to merge 6 commits into
mainfrom
add/cnpg-cluster-chart

Conversation

@mikeshootzz

@mikeshootzz mikeshootzz commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Checklist

  • Chart Version bumped
  • I have run make docs
  • Variables are documented in the values.yaml using the format required by Helm-Docs.
  • PR contains the label that identifies the chart, e.g. chart/<chart-name>
  • PR contains the label that identifies the type of change, which is one of
    [ bug, enhancement, documentation, change, breaking, dependency ]

This copies the upstream helmchart for provisioning a cnpg cluster as-is
without any modifications.
Since the upstream helmcharts for cloud native pg are licensed under the
Apache-2.0 license, we have to give special notice for this chart and
use the same license accordingly.
This adds the barman cloud plugin as a backup option for cnpg.
This aligns the documentation of vshnpostgresql with vshnmariadb
@mikeshootzz mikeshootzz changed the title Add/cnpg cluster chart Add CNPG cluster chart as vshnpostgresql Nov 11, 2025
@mikeshootzz mikeshootzz requested review from a team, Kidswiss, TheBigLee, mdnix and zugao and removed request for a team November 11, 2025 08:58

@zugao zugao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the name should be changed

apiVersion: barmancloud.cnpg.io/v1
kind: ObjectStore
metadata:
name: {{ include "cluster.backups.objectStoreName" . }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's craft the name based on the release name

apiVersion: v1
kind: Secret
metadata:
name: {{ default (printf "%s-barman-plugin-s3-creds" (include "cluster.fullname" .)) .Values.backups.secret.name }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well

kind: Secret
metadata:
{{- if eq .Values.backups.method "plugin" }}
name: {{ .Values.backups.endpointCA.name | default (printf "%s-barman-plugin-ca-bundle" (include "cluster.fullname" .)) | quote }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well

This uses the release name instead of the cluster fullname as a prefix
for the barman object store related resources.
@mikeshootzz mikeshootzz requested a review from zugao November 13, 2025 09:53
name: {{ include "cluster.backups.objectStoreName" . }}
namespace: {{ include "cluster.namespace" . }}
labels: {{ include "cluster.labels" . | nindent 4 }}
spec:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably doesn't make sense to export everything that the CRD has via the chart. Let's just implement what we need for the time being.

This simplifies the object store and its related resources to only
expose what we actually need
@mikeshootzz

Copy link
Copy Markdown
Contributor Author

We'll wait for the upstream implementation to be finished: cloudnative-pg/charts#680 and publish the upstream PR's chart to our GitHub registry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants