Skip to content

Commit e7bb88a

Browse files
committed
feat: release helm charts to grafana/helm-charts
1 parent b07526a commit e7bb88a

File tree

5 files changed

+42
-12
lines changed

5 files changed

+42
-12
lines changed

.github/workflows/release.yaml

+14-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010
packages: write
1111

1212
jobs:
13-
helm:
13+
helm-oci:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Clone repo
@@ -32,6 +32,19 @@ jobs:
3232
helm package --app-version ${{ github.ref_name }} --version ${{ github.ref_name }} grafana-operator
3333
helm push grafana-operator-${{ github.ref_name }}.tgz ${{ env.HELM_REPO }}
3434
35+
helm-charts-repo:
36+
permissions:
37+
contents: write
38+
uses: grafana/helm-charts/.github/workflows/update-helm-repo.yaml@main
39+
with:
40+
charts_dir: deploy/helm
41+
cr_configfile: deploy/helm/cr.yaml
42+
ct_configfile: deploy/helm/ct.yaml
43+
helm_tag_prefix: helm
44+
secrets:
45+
github_app_id: ${{ secrets.GRAFANA_OPERATOR_HELM_RELEASE_APP_ID }}
46+
github_app_pem: ${{ secrets.GRAFANA_OPERATOR_HELM_RELEASE_PEM_KEY }}
47+
3548
kustomize:
3649
runs-on: ubuntu-latest
3750
steps:

Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -420,3 +420,11 @@ API_REF_GEN=$(GOBIN)/crdoc
420420
else
421421
API_REF_GEN=$(shell which crdoc)
422422
endif
423+
424+
.PHONY: prep-release
425+
prep-release: yq
426+
$(YQ) -i '.version="v$(VERSION)"' deploy/helm/grafana-operator/Chart.yaml
427+
$(YQ) -i '.appVersion="v$(VERSION)"' deploy/helm/grafana-operator/Chart.yaml
428+
$(YQ) -i '.params.version="v$(VERSION)"' hugo/config.yaml
429+
sed -i 's/--version v5.*/--version v$(VERSION)/g' README.md
430+
make helm/docs

deploy/helm/cr.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
git-repo: helm-charts
2+
owner: grafana
3+
skip-existing: true
4+
release-name-template: "{{ .Name }}-{{ .Version }}"
5+
6+
generate-release-notes: true

deploy/helm/ct.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
remote: origin
3+
target-branch: main
4+
chart-dirs:
5+
- deploy/helm
6+
chart-repos:
7+
- grafana=https://grafana.github.io/helm-charts
8+
helm-extra-args: --timeout 600s
9+
check-version-increment: false
10+
validate-maintainers: false
11+
validate-yaml: true
+3-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apiVersion: v2
22
name: grafana-operator
33
description: A Helm chart for Kubernetes
4-
54
# A chart can be either an 'application' or a 'library' chart.
65
#
76
# Application charts are a collection of templates that can be packaged into versioned archives
@@ -11,14 +10,7 @@ description: A Helm chart for Kubernetes
1110
# a dependency of application charts to inject those utilities and functions into the rendering
1211
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
1312
type: application
14-
15-
# This is the chart version. This version number should be incremented each time you make changes
16-
# to the chart and its templates, including the app version.
17-
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.3.0
19-
20-
# This is the version number of the application being deployed. This version number should be
21-
# incremented each time you make changes to the application. Versions are not expected to
22-
# follow Semantic Versioning. They should reflect the version the application is using.
23-
# It is recommended to use it with quotes.
13+
# We keep the version and appVersion in sync as most updates also include
14+
# changes to the CRDs which are bundled with the helm resources
15+
version: v5.14.0
2416
appVersion: "v5.14.0"

0 commit comments

Comments
 (0)