Skip to content

Commit

Permalink
feat: crds survive helm uninstall command (#37)
Browse files Browse the repository at this point in the history
Co-authored-by: Philippe Scorsolini <[email protected]>
Co-authored-by: Marco Nenciarini <[email protected]>
  • Loading branch information
3 people authored Nov 11, 2021
1 parent 7fae1b5 commit c55555f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
fi
- name: Run chart-testing (lint)
run: ct lint --target-branch=main
run: ct lint --target-branch=main --check-version-increment=false
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ helm upgrade --install cnp \
charts/cloud-native-postgresql
```

## Upgrading CRDs

Helm does not support upgrading CRDs, as explained [here](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#some-caveats-and-explanations),
therefore in order to upgrade the operator you'll need to run the following command once
a new chart release is available:

```console
helm template cnp cnp/cloud-native-postgresql -s templates/crds/crds.yaml --include-crds | kubectl apply -f -
```

## Copyright

`cloud-native-postgresql-helm` is distributed under Apache License 2.0.
Expand Down
3 changes: 3 additions & 0 deletions charts/cloud-native-postgresql/templates/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
helm.sh/resource-policy: keep
name: backups.postgresql.k8s.enterprisedb.io
spec:
conversion:
Expand Down Expand Up @@ -425,6 +426,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
helm.sh/resource-policy: keep
name: clusters.postgresql.k8s.enterprisedb.io
spec:
conversion:
Expand Down Expand Up @@ -4464,6 +4466,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
helm.sh/resource-policy: keep
name: scheduledbackups.postgresql.k8s.enterprisedb.io
spec:
conversion:
Expand Down

0 comments on commit c55555f

Please sign in to comment.