mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 20:23:39 +09:00
Bump the vendored cloudnative-pg chart 0.27.1 -> 0.29.0 (operator + CRDs 1.28.1-patched-to-1.28.2 -> 1.30.0) and drop the hand-maintained cloudnative-pg-1.28.2.patch entirely — 0.29.0 is a published chart, so no version-alignment patch is needed. Why this is required -------------------- Database read-replica autoscaling (community proposal design-proposals/database-horizontal-autoscaling) drives the CNPG Cluster scale subresource with a stock HPA (via KEDA). That only works when the subresource serves status.selector, which cloudnative-pg#8996 added and shipped in CNPG 1.28.4 / 1.29.2 / 1.30.0. cozystack shipped 1.28.2, whose scale subresource has no selector, so the HPA fails with InvalidSelector. Why 1.30.0 and not 1.28.4 ------------------------- The floor is >= 1.28.4, but the upstream chart repo publishes no chart for 1.28.4 (the 1.28 line stops at chart 0.27.1 / appVersion 1.28.1), so 1.28.4 could only be reached by hand-patching the 0.27.1 chart's operator image and CRDs up to the backport. A live PoC on a dev cluster proved that path is broken: the 1.28.4 operator running under the 0.27.1 (1.28.1) chart templates crash-loops on a missing RBAC grant it needs but the older chart does not provide — endpointslices.discovery.k8s.io is forbidden: ... cannot list resource "endpointslices" — so status.selector is never populated and the HPA still cannot scale. The hand-patch would have to port the operator's RBAC (and any other template delta) from 1.28.1 to 1.28.4 by hand, with no published chart to diff against. 1.30.0 (chart 0.29.0) is the only published chart that carries the selector together with matching RBAC/CRDs/templates, and the 1.28 line is EOL (2026-06-30), so 1.30.0 also keeps us on a supported release. cozystack uses the barman-cloud plugin (not native barman, removed in 1.31) and no CNPG Poolers, so the 1.30 deprecations and the known pooler bug do not apply. Update the version-guard unittest to 1.30.0 and assert the clusters CRD scale subresource carries labelSelectorPath: .status.selector. Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
140 lines
3.9 KiB
Go Template
140 lines
3.9 KiB
Go Template
{{ template "chart.header" . }}
|
|
|
|
|
|
{{ template "chart.deprecationWarning" . }}
|
|
|
|
|
|
{{ template "chart.badgesSection" . }}
|
|
|
|
|
|
{{ template "chart.description" . }}
|
|
|
|
|
|
{{ template "chart.homepageLine" . }}
|
|
|
|
|
|
About this chart
|
|
----------------
|
|
|
|
Helm chart to install the [CloudNativePG operator](https://cloudnative-pg.io), originally created and sponsored
|
|
by [EDB](https://www.enterprisedb.com/) to manage PostgreSQL workloads on any supported Kubernetes cluster
|
|
running in private, public, or hybrid cloud environments.
|
|
|
|
**NOTE**: this chart supports only the latest point release of the CloudNativePG operator.
|
|
|
|
The chart installs only the operator (controller manager, webhooks, RBAC and CRDs). To provision a PostgreSQL
|
|
`Cluster` resource, use the companion [`cluster`](https://github.com/cloudnative-pg/charts/tree/main/charts/cluster) chart
|
|
(see the [Cluster chart README](https://github.com/cloudnative-pg/charts/blob/main/charts/cluster/README.md) for details)
|
|
or apply your own `Cluster` manifest.
|
|
|
|
|
|
Getting Started
|
|
---------------
|
|
|
|
### Add the chart repository
|
|
|
|
```console
|
|
helm repo add cnpg https://cloudnative-pg.github.io/charts
|
|
helm repo update
|
|
```
|
|
|
|
### Install the operator
|
|
|
|
```console
|
|
helm upgrade --install cnpg \
|
|
--namespace cnpg-system \
|
|
--create-namespace \
|
|
cnpg/cloudnative-pg
|
|
```
|
|
|
|
### Install with custom parameters
|
|
|
|
You can override individual chart values from the command line with `--set`.
|
|
For example, to enable the Prometheus `PodMonitor`:
|
|
|
|
```console
|
|
helm upgrade --install cnpg \
|
|
--namespace cnpg-system \
|
|
--create-namespace \
|
|
--set monitoring.podMonitorEnabled=true \
|
|
cnpg/cloudnative-pg
|
|
```
|
|
|
|
> **Note**
|
|
> Enabling the `PodMonitor` requires the Prometheus Operator CRDs to be installed in the cluster.
|
|
> Without them the install fails with `no matches for kind "PodMonitor"`.
|
|
|
|
See the [Values](#values) section below for the full list of configurable parameters.
|
|
|
|
### Verify the installation
|
|
|
|
```console
|
|
kubectl -n cnpg-system get deploy
|
|
kubectl -n cnpg-system rollout status deploy/cnpg-cloudnative-pg
|
|
```
|
|
|
|
|
|
Single namespace installation
|
|
-----------------------------
|
|
|
|
It is possible to limit the operator's capabilities to solely the namespace in which it has been installed.
|
|
With this restriction, the cluster-level permissions required by the operator will be substantially reduced,
|
|
and the security profile of the installation will be enhanced.
|
|
|
|
You can install the operator in single-namespace mode by setting the `config.clusterWide` flag to `false`,
|
|
as in the following example:
|
|
|
|
```console
|
|
helm upgrade --install cnpg \
|
|
--namespace cnpg-system \
|
|
--create-namespace \
|
|
--set config.clusterWide=false \
|
|
cnpg/cloudnative-pg
|
|
```
|
|
|
|
**IMPORTANT**: the single-namespace installation mode can't coexist with the cluster-wide operator. Otherwise
|
|
there would be collisions when managing the resources in the namespace watched by the single-namespace
|
|
operator. It is up to the user to ensure there is no collision between operators.
|
|
|
|
|
|
Uninstalling
|
|
------------
|
|
|
|
```console
|
|
helm uninstall cnpg --namespace cnpg-system
|
|
```
|
|
|
|
> **Warning**
|
|
> Uninstalling the chart does not remove the CRDs. Deleting them cascade-deletes every `Cluster` (and other
|
|
> CloudNativePG) resource across the whole cluster, together with the PostgreSQL data stored in their PVCs.
|
|
> This is irreversible, so only delete the CRDs if you intend to permanently remove all managed databases.
|
|
|
|
|
|
{{ template "chart.sourcesSection" . }}
|
|
|
|
|
|
{{ template "chart.requirementsSection" . }}
|
|
|
|
|
|
{{ template "chart.valuesSection" . }}
|
|
|
|
|
|
{{ template "chart.maintainersSection" . }}
|
|
|
|
Contributing
|
|
------------
|
|
|
|
Please read the [code of conduct](https://github.com/cloudnative-pg/charts/blob/main/CODE-OF-CONDUCT.md) and the
|
|
[guidelines](https://github.com/cloudnative-pg/charts/blob/main/CONTRIBUTING.md) to contribute to the project.
|
|
|
|
|
|
Copyright
|
|
---------
|
|
|
|
Helm charts for CloudNativePG are distributed under [Apache License 2.0](./LICENSE).
|
|
|
|
|
|
{{- if not .SkipVersionFooter }}
|
|
{{ template "helm-docs.versionFooter" . }}
|
|
{{- end }}
|