Skip to content

Commit

Permalink
feat: release helm charts to grafana/helm-charts
Browse files Browse the repository at this point in the history
  • Loading branch information
theSuess committed Oct 28, 2024
1 parent b07526a commit 65da74c
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 12 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
packages: write

jobs:
helm:
helm-oci:
runs-on: ubuntu-latest
steps:
- name: Clone repo
Expand All @@ -32,6 +32,19 @@ jobs:
helm package --app-version ${{ github.ref_name }} --version ${{ github.ref_name }} grafana-operator
helm push grafana-operator-${{ github.ref_name }}.tgz ${{ env.HELM_REPO }}
helm-charts-repo:
permissions:
contents: write
uses: grafana/helm-charts/.github/workflows/update-helm-repo.yaml@main
with:
charts_dir: deploy/helm
cr_configfile: deploy/helm/cr.yaml
ct_configfile: deploy/helm/ct.yaml
helm_tag_prefix: helm
secrets:
github_app_id: ${{ secrets.GRAFANA_OPERATOR_HELM_RELEASE_APP_ID }}
github_app_pem: ${{ secrets.GRAFANA_OPERATOR_HELM_RELEASE_PEM_KEY }}

kustomize:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -420,3 +420,11 @@ API_REF_GEN=$(GOBIN)/crdoc
else
API_REF_GEN=$(shell which crdoc)
endif

.PHONY: prep-release
prep-release: yq
$(YQ) -i '.version="v$(VERSION)"' deploy/helm/grafana-operator/Chart.yaml
$(YQ) -i '.appVersion="v$(VERSION)"' deploy/helm/grafana-operator/Chart.yaml
$(YQ) -i '.params.version="v$(VERSION)"' hugo/config.yaml
sed -i 's/--version v5.*/--version v$(VERSION)/g' README.md
make helm/docs
6 changes: 6 additions & 0 deletions deploy/helm/cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
git-repo: helm-charts
owner: grafana
skip-existing: true
release-name-template: "{{ .Name }}-{{ .Version }}"

generate-release-notes: true
12 changes: 12 additions & 0 deletions deploy/helm/ct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
remote: origin
target-branch: main
chart-dirs:
- deploy/helm
chart-repos:
- grafana=https://grafana.github.io/helm-charts
helm-extra-args: --timeout 600s
check-version-increment: false
validate-maintainers: false
validate-yaml: true
validate-schema-chart: true
14 changes: 3 additions & 11 deletions deploy/helm/grafana-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: v2
name: grafana-operator
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
Expand All @@ -11,14 +10,7 @@ description: A Helm chart for Kubernetes
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
# We keep the version and appVersion in sync as most updates also include
# changes to the CRDs which are bundled with the helm resources
version: v5.14.0
appVersion: "v5.14.0"

0 comments on commit 65da74c

Please sign in to comment.