Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Publish helm chart as OCI artifact #405

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/helm-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: helm_release

on:
push:
paths-ignore:
- 'docs_src/**'
- 'README.md'
- 'CITATION'
- 'book.toml'
- 'CONTRIBUTING.md'
- '*.md'
- 'oranda.json'
tags: [ 'v*.*.*' ]

jobs:
package_and_push:
name: package_and_push_helm_chart
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Helm
uses: azure/setup-helm@v4
- name: Login to DockerHub
run: |
echo "${{ secrets.DOCKERHUB_TOKEN }}" | helm registry login registry-1.docker.io --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Extract version from Git tag
id: get_version
run: |
echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Package Helm Chart
run: |
helm package helm/scaphandre --version ${{ steps.get_version.outputs.VERSION }}
- name: Push Helm Chart as OCI Artifact
run: |
helm push ./scaphandre-${{ steps.get_version.outputs.VERSION }}.tgz oci://registry-1.docker.io/${{ secrets.DOCKERHUB_USERNAME }}
9 changes: 4 additions & 5 deletions docs_src/tutorials/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ Scaphandre, Prometheus and Grafana.
## Install Scaphandre

First we install Scaphandre which runs as a daemon set which creates a pod on
each node for collecting the metrics. The helm chart is not in a repo, it needs
to be installed from the source code.
each node for collecting the metrics.

git clone https://github.com/hubblo-org/scaphandre
cd scaphandre
helm install scaphandre helm/scaphandre
helm upgrade --install scaphandre oci://registry-1.docker.io/hubblo/scaphandre
### Parameters
#### Service monitor parameters

Expand Down Expand Up @@ -52,6 +49,8 @@ You can access the Prometheus web UI by creating a port forwarding connection.

Create a configmap to store the Grafana dashboard.

git clone https://github.com/hubblo-org/scaphandre
cd scaphandre
kubectl create configmap scaphandre-dashboard \
--from-file=scaphandre-dashboard.json=docs_src/tutorials/grafana-kubernetes-dashboard.json

Expand Down
3 changes: 1 addition & 2 deletions helm/scaphandre/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apiVersion: v1
appVersion: 0.1.1
apiVersion: v2
description: A Helm chart for Scaphandre electrical power consumption agent
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumping apiVersion to v2 as helm 2 is no longer supported.
https://helm.sh/docs/topics/charts/#the-apiversion-field

I also removed appVersion since it will always match version.

home: https://github.com/hubblo-org/scaphandre
name: scaphandre
Expand Down
Loading