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!: deprecate helm chart repository, use OCI registry from now #148

Merged
merged 1 commit into from
Nov 30, 2024
Merged
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
61 changes: 40 additions & 21 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,37 @@ on:
branches:
- main
jobs:
publish-gh-pages:
name: Publish to Github pages
package-helm-chart:
name: Package helm chart
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
contents: read
outputs:
has_artifacts: ${{ steps.check-artifacts.outputs.has_artifacts }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
- name: Install helm
uses: azure/setup-helm@v4
- name: Package helm charts
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
with:
config: "./cr.yaml"
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
mkdir -p ./.cr-release-packages
for chart in ./charts/*; do
if [ -d "$chart" ] && [ -f "$chart/Chart.yaml" ]; then
current_version=$(grep '^version:' "$chart/Chart.yaml" | awk '{print $2}')
previous_version=$(git show HEAD~1:"$chart/Chart.yaml" | grep '^version:' | awk '{print $2}' 2>/dev/null)

if [ "$current_version" != "$previous_version" ]; then
helm package "$chart" --destination ./.cr-release-packages
else
echo "No version change for $chart. Skipping."
fi
else
echo "Skipping $chart: Not a valid Helm chart"
fi
done
- name: Check if artifacts exist
id: check-artifacts
run: |
Expand All @@ -43,17 +51,23 @@ jobs:
include-hidden-files: true
path: .cr-release-packages/

publish-oci:
publish:
name: Publish to ghcr.io
runs-on: ubuntu-latest
permissions:
packages: write # needed for pushing to github registry
id-token: write # needed for signing the images with GitHub OIDC Token
needs: [publish-gh-pages]
needs: [package-helm-chart]
if: needs.publish-gh-pages.outputs.has_artifacts == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Cosign
uses: sigstore/cosign-installer@v3
- name: Install Oras
uses: oras-project/setup-oras@v1
- name: Downloads artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -69,11 +83,16 @@ jobs:
env:
COSIGN_YES: true
run: |
lowercase=$(echo "${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]')
for chart in `find .cr-release-packages -name '*.tgz' -print`; do
helm push ${chart} oci://ghcr.io/${lowercase} |& tee helm-push-output.log
file_name=${chart##*/}
chart_name=${file_name%-*}
digest=$(awk -F "[, ]+" '/Digest/{print $NF}' < helm-push-output.log)
cosign sign "ghcr.io/${lowercase}/${chart_name}@${digest}"
helm push ${chart} oci://ghcr.io/${GITHUB_REPOSITORY@L} |& tee helm-push-output.log
chart_name=${chart%-*}
chart_digest=$(awk -F "[, ]+" '/Digest/{print $NF}' < helm-push-output.log)
cosign sign "ghcr.io/${GITHUB_REPOSITORY@L}/${chart_name}@${chart_digest}"
oras push \
oci://ghcr.io/${GITHUB_REPOSITORY@L}/${chart_name}:artifacthub.io \
--config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml \
charts/$chart_name/artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml\
|& tee oras-push-output.log
artifacthub_digest=$(grep "Digest:" oras-push-output.log | awk '{print $2}')
cosign sign "ghcr.io/${GITHUB_REPOSITORY@L}/${chart_name}:artifacthub.io@${artifacthub_digest}"
done
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

<div align="center">

[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/m0nsterrr&style=for-the-badge)](https://artifacthub.io/packages/search?repo=m0nsterrr)
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/m0nsterrr&style=for-the-badge)](https://artifacthub.io/packages/search?user=M0NsTeRRR)

</div>

This is my custom Helm charts that are published under https://helm-charts.adminafk.fr
These are my custom Helm charts. Documentation for each chart can be found in its respective README file.

## 🛠️ Dev
Install [helm](https://helm.sh/docs/intro/install/) and [helm-docs](https://github.com/norwoodj/helm-docs)
Expand Down
4 changes: 4 additions & 0 deletions charts/as212510-net/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
.idea/
*.tmproj
.vscode/
# Go template
*.gotmpl
# Artifacthub repo file
artifacthub-repo.yml
2 changes: 1 addition & 1 deletion charts/as212510-net/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kubeVersion: ">=1.23.0-0"
name: as212510-net
description: as212510.net helm chart for Kubernetes
type: application
version: 0.5.6
version: 1.0.0
# image: ghcr.io/m0nsterrr/as212510.net
appVersion: "3.0.0"
maintainers:
Expand Down
19 changes: 4 additions & 15 deletions charts/as212510-net/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# as212510-net

![Version: 0.5.6](https://img.shields.io/badge/Version-0.5.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square)
![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square)

as212510.net helm chart for Kubernetes

Expand All @@ -20,28 +20,17 @@ as212510.net helm chart for Kubernetes

Kubernetes: `>=1.23.0-0`

## Chart Repo

### OCI
## Install
```console
helm install as212510-net oci://ghcr.io/m0nsterrr/helm-charts/as212510-net
```

Verify the signature :
Verify the signature with [cosign](https://docs.sigstore.dev/cosign/system_config/installation/) :
```console
cosign verify ghcr.io/m0nsterrr/helm-charts/as212510-net:0.5.6 --certificate-identity=https://github.com/M0NsTeRRR/helm-charts/.github/workflows/releases.yml@refs/heads/main --certificate-oidc-issuer=https://token.ac
cosign verify ghcr.io/m0nsterrr/helm-charts/as212510-net:1.0.0 --certificate-identity=https://github.com/M0NsTeRRR/helm-charts/.github/workflows/releases.yml@refs/heads/main --certificate-oidc-issuer=https://token.ac
tions.githubusercontent.com
```

### Helm repository
Will be deprecated in a future major release

Add the following repo to use the chart:

```console
helm repo add adminafk https://helm-charts.adminafk.fr
```

## Values

| Key | Type | Default | Description |
Expand Down
15 changes: 2 additions & 13 deletions charts/as212510-net/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,15 @@

{{ template "chart.requirementsSection" . }}

## Chart Repo

### OCI
## Install
```console
helm install {{ template "chart.name" . }} oci://ghcr.io/m0nsterrr/helm-charts/{{ template "chart.name" . }}
```

Verify the signature :
Verify the signature with [cosign](https://docs.sigstore.dev/cosign/system_config/installation/) :
```console
cosign verify ghcr.io/m0nsterrr/helm-charts/{{ template "chart.name" . }}:{{ template "chart.version" . }} --certificate-identity=https://github.com/M0NsTeRRR/helm-charts/.github/workflows/releases.yml@refs/heads/main --certificate-oidc-issuer=https://token.ac
tions.githubusercontent.com
```

### Helm repository
Will be deprecated in a future major release

Add the following repo to use the chart:

```console
helm repo add adminafk https://helm-charts.adminafk.fr
```

{{ template "chart.valuesSection" . }}
4 changes: 4 additions & 0 deletions charts/as212510-net/artifacthub-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
repositoryID: ddbb5ec6-d021-49df-8d12-9df121b2ede5
owners:
- name: Ludovic Ortega
email: ludovic.ortega@adminafk.fr
4 changes: 4 additions & 0 deletions charts/bazarr/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
.idea/
*.tmproj
.vscode/
# Go template
*.gotmpl
# Artifacthub repo file
artifacthub-repo.yml
2 changes: 1 addition & 1 deletion charts/bazarr/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kubeVersion: ">=1.23.0-0"
name: bazarr
description: bazarr helm chart for Kubernetes
type: application
version: 0.4.4
version: 1.0.0
# image: ghcr.io/onedr0p/bazarr
appVersion: "1.4.5"
maintainers:
Expand Down
19 changes: 4 additions & 15 deletions charts/bazarr/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bazarr

![Version: 0.4.4](https://img.shields.io/badge/Version-0.4.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.4.5](https://img.shields.io/badge/AppVersion-1.4.5-informational?style=flat-square)
![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.4.5](https://img.shields.io/badge/AppVersion-1.4.5-informational?style=flat-square)

bazarr helm chart for Kubernetes

Expand All @@ -20,28 +20,17 @@ bazarr helm chart for Kubernetes

Kubernetes: `>=1.23.0-0`

## Chart Repo

### OCI
## Install
```console
helm install bazarr oci://ghcr.io/m0nsterrr/helm-charts/bazarr
```

Verify the signature :
Verify the signature with [cosign](https://docs.sigstore.dev/cosign/system_config/installation/) :
```console
cosign verify ghcr.io/m0nsterrr/helm-charts/bazarr:0.4.4 --certificate-identity=https://github.com/M0NsTeRRR/helm-charts/.github/workflows/releases.yml@refs/heads/main --certificate-oidc-issuer=https://token.ac
cosign verify ghcr.io/m0nsterrr/helm-charts/bazarr:1.0.0 --certificate-identity=https://github.com/M0NsTeRRR/helm-charts/.github/workflows/releases.yml@refs/heads/main --certificate-oidc-issuer=https://token.ac
tions.githubusercontent.com
```

### Helm repository
Will be deprecated in a future major release

Add the following repo to use the chart:

```console
helm repo add adminafk https://helm-charts.adminafk.fr
```

## Values

| Key | Type | Default | Description |
Expand Down
15 changes: 2 additions & 13 deletions charts/bazarr/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,15 @@

{{ template "chart.requirementsSection" . }}

## Chart Repo

### OCI
## Install
```console
helm install {{ template "chart.name" . }} oci://ghcr.io/m0nsterrr/helm-charts/{{ template "chart.name" . }}
```

Verify the signature :
Verify the signature with [cosign](https://docs.sigstore.dev/cosign/system_config/installation/) :
```console
cosign verify ghcr.io/m0nsterrr/helm-charts/{{ template "chart.name" . }}:{{ template "chart.version" . }} --certificate-identity=https://github.com/M0NsTeRRR/helm-charts/.github/workflows/releases.yml@refs/heads/main --certificate-oidc-issuer=https://token.ac
tions.githubusercontent.com
```

### Helm repository
Will be deprecated in a future major release

Add the following repo to use the chart:

```console
helm repo add adminafk https://helm-charts.adminafk.fr
```

{{ template "chart.valuesSection" . }}
4 changes: 4 additions & 0 deletions charts/bazarr/artifacthub-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
repositoryID: 03e99f20-eade-4ad9-8289-042648993ec9
owners:
- name: Ludovic Ortega
email: ludovic.ortega@adminafk.fr
4 changes: 4 additions & 0 deletions charts/flaresolverr/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
.idea/
*.tmproj
.vscode/
# Go template
*.gotmpl
# Artifacthub repo file
artifacthub-repo.yml
2 changes: 1 addition & 1 deletion charts/flaresolverr/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kubeVersion: ">=1.23.0-0"
name: flaresolverr
description: flaresolverr helm chart for Kubernetes
type: application
version: 0.2.10
version: 1.0.0
# image: flaresolverr/flaresolverr
appVersion: "v3.3.21"
maintainers:
Expand Down
19 changes: 4 additions & 15 deletions charts/flaresolverr/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# flaresolverr

![Version: 0.2.10](https://img.shields.io/badge/Version-0.2.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v3.3.21](https://img.shields.io/badge/AppVersion-v3.3.21-informational?style=flat-square)
![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v3.3.21](https://img.shields.io/badge/AppVersion-v3.3.21-informational?style=flat-square)

flaresolverr helm chart for Kubernetes

Expand All @@ -20,28 +20,17 @@ flaresolverr helm chart for Kubernetes

Kubernetes: `>=1.23.0-0`

## Chart Repo

### OCI
## Install
```console
helm install flaresolverr oci://ghcr.io/m0nsterrr/helm-charts/flaresolverr
```

Verify the signature :
Verify the signature with [cosign](https://docs.sigstore.dev/cosign/system_config/installation/) :
```console
cosign verify ghcr.io/m0nsterrr/helm-charts/flaresolverr:0.2.10 --certificate-identity=https://github.com/M0NsTeRRR/helm-charts/.github/workflows/releases.yml@refs/heads/main --certificate-oidc-issuer=https://token.ac
cosign verify ghcr.io/m0nsterrr/helm-charts/flaresolverr:1.0.0 --certificate-identity=https://github.com/M0NsTeRRR/helm-charts/.github/workflows/releases.yml@refs/heads/main --certificate-oidc-issuer=https://token.ac
tions.githubusercontent.com
```

### Helm repository
Will be deprecated in a future major release

Add the following repo to use the chart:

```console
helm repo add adminafk https://helm-charts.adminafk.fr
```

## Values

| Key | Type | Default | Description |
Expand Down
15 changes: 2 additions & 13 deletions charts/flaresolverr/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,15 @@

{{ template "chart.requirementsSection" . }}

## Chart Repo

### OCI
## Install
```console
helm install {{ template "chart.name" . }} oci://ghcr.io/m0nsterrr/helm-charts/{{ template "chart.name" . }}
```

Verify the signature :
Verify the signature with [cosign](https://docs.sigstore.dev/cosign/system_config/installation/) :
```console
cosign verify ghcr.io/m0nsterrr/helm-charts/{{ template "chart.name" . }}:{{ template "chart.version" . }} --certificate-identity=https://github.com/M0NsTeRRR/helm-charts/.github/workflows/releases.yml@refs/heads/main --certificate-oidc-issuer=https://token.ac
tions.githubusercontent.com
```

### Helm repository
Will be deprecated in a future major release

Add the following repo to use the chart:

```console
helm repo add adminafk https://helm-charts.adminafk.fr
```

{{ template "chart.valuesSection" . }}
4 changes: 4 additions & 0 deletions charts/flaresolverr/artifacthub-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
repositoryID: 06d35c3f-7636-4fab-9cd8-675ef777458b
owners:
- name: Ludovic Ortega
email: ludovic.ortega@adminafk.fr
Loading