Skip to content

Commit e43aff9

Browse files
authored
docs: add helm upgrade instructions (#1481)
1 parent ba4734b commit e43aff9

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

deploy/helm/grafana-operator/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ version: 0.1.3
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "v5.7.0"
24+
appVersion: "v5.8.1"

deploy/helm/grafana-operator/README.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,30 @@ linkTitle: "Helm installation"
77

88
[grafana-operator](https://github.com/grafana/grafana-operator) for Kubernetes to manage Grafana instances and grafana resources.
99

10-
![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v5.7.0](https://img.shields.io/badge/AppVersion-v5.7.0-informational?style=flat-square)
10+
![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v5.8.1](https://img.shields.io/badge/AppVersion-v5.8.1-informational?style=flat-square)
1111

1212
## Installation
1313

1414
This is a OCI helm chart, helm started support OCI in version 3.8.0.
1515

1616
```shell
17-
helm upgrade -i grafana-operator oci://ghcr.io/grafana/helm-charts/grafana-operator --version v5.7.0
17+
helm upgrade -i grafana-operator oci://ghcr.io/grafana/helm-charts/grafana-operator --version v5.8.1
1818
```
1919

2020
Sadly helm OCI charts currently don't support searching for available versions of a helm [oci registry](https://github.com/helm/helm/issues/11000).
2121

22+
## Upgrading
23+
24+
Helm does not provide functionality to update custom resource definitions. This can result in the operator misbehaving when a release contains updates to the custom resource definitions.
25+
To avoid issues due to outdated or missing definitions, run the following command before updating an existing installation:
26+
27+
```shell
28+
kubectl apply --server-side --force-conflicts -f https://github.com/grafana/grafana-operator/releases/download/v5.8.1/crds.yaml
29+
```
30+
31+
The `--server-side` and `--force-conflict` flags are required to avoid running into issues with the `kubectl.kubernetes.io/last-applied-configuration` annotation.
32+
By using server side apply, this annotation is not considered. `--force-conflict` allows kubectl to modify fields previously managed by helm.
33+
2234
## Development
2335

2436
For general and helm specific development instructions please read the [CONTRIBUTING.md](../../../CONTRIBUTING.md)

deploy/helm/grafana-operator/README.md.gotmpl

+12
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ helm upgrade -i grafana-operator oci://ghcr.io/grafana/helm-charts/grafana-opera
1919

2020
Sadly helm OCI charts currently don't support searching for available versions of a helm [oci registry](https://github.com/helm/helm/issues/11000).
2121

22+
## Upgrading
23+
24+
Helm does not provide functionality to update custom resource definitions. This can result in the operator misbehaving when a release contains updates to the custom resource definitions.
25+
To avoid issues due to outdated or missing definitions, run the following command before updating an existing installation:
26+
27+
```shell
28+
kubectl apply --server-side --force-conflicts -f https://github.com/grafana/grafana-operator/releases/download/{{ template "chart.appVersion" . }}/crds.yaml
29+
```
30+
31+
The `--server-side` and `--force-conflict` flags are required to avoid running into issues with the `kubectl.kubernetes.io/last-applied-configuration` annotation.
32+
By using server side apply, this annotation is not considered. `--force-conflict` allows kubectl to modify fields previously managed by helm.
33+
2234
## Development
2335

2436
For general and helm specific development instructions please read the [CONTRIBUTING.md](../../../CONTRIBUTING.md)

0 commit comments

Comments
 (0)