-
Notifications
You must be signed in to change notification settings - Fork 435
Labels
triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Description
- As a result of How to handle upgrade of CRDs with Helm #1325
release notes require a separate manual step to upgrade CRDs like here:# Upgrade the operator image & deployment helm upgrade -i grafana-operator oci://ghcr.io/grafana/helm-charts/grafana-operator --version v5.19.0 # Upgrading CRDs kubectl apply --server-side --force-conflicts -f https://github.com/grafana/grafana-operator/releases/download/v5.19.0/crds.yaml
- It would be great to give user an option to auto-upgrade
grafana-operator
CRDs onhelm upgrade
without extra manual step. - Actually, when we tried to implement auto-upgrade of
grafana-operator
CRDs in our chartkof-operators
, it failed oninvalid ownership metadata
, see the details here, because Helm's specialcrds
directory is an unconditional part ofgrafana-operator
chart here for now. - For example, here is how
victoria-metrics-operator
solved this:- Docs of
crds.plain
value:- check if plain or templated CRDs should be created.
- with this option set to
false
, all CRDs will be rendered from templates. - with this option set to
true
, all CRDs are immutable and require manual upgrade.
- Chart.yaml:
dependencies: - name: crds version: "0.0.*" condition: crds.plain
- crds chart with Helm's special
crds
directory,
which is conditionally installed whencrds.plain: true
- victoria-metrics-operator/templates/crd.yaml template which renders CRDs
whencrds.plain: false
, which leads to auto-install and auto-upgrade of CRDs.- It also compresses CRDs using compact JSON to avoid Helm's limitation:
Secret "sh.helm.release.v1.REDACTED.v6" is invalid: data: Too long: may not be more than 1048576 bytes
- It also compresses CRDs using compact JSON to avoid Helm's limitation:
- Docs of
- Could you please implement the same, or will you accept my PR if I implement this for you?
Metadata
Metadata
Assignees
Labels
triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.