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(oci): add publishing of helm chart to oci repo #189

Merged
merged 1 commit into from
Jan 26, 2025
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
32 changes: 26 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,20 @@ on:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write # needed to pull git repo and create "chart-release"
id-token: write # needed for signing the images with GitHub OIDC Token
steps:
- name: Install Cosign
uses: sigstore/[email protected]

- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -19,13 +32,20 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.13.1

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Publish chart to ghcr.io
run: |
helm package charts/coredns
helm push coredns-*.tgz oci://ghcr.io/coredns/charts
rm -rf coredns-*.tgz
- name: Sign artifacts with Cosign
env:
COSIGN_EXPERIMENTAL: 1
working-directory: charts/coredns
run: |-
cosign sign ghcr.io/coredns/charts/coredns:$(yq .version Chart.yaml) --yes
8 changes: 5 additions & 3 deletions charts/coredns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: coredns
version: 1.37.3
version: 1.38.0
appVersion: 1.11.4
home: https://coredns.io
icon: https://coredns.io/images/CoreDNS_Colour_Horizontal.png
Expand All @@ -19,5 +19,7 @@ maintainers:
type: application
annotations:
artifacthub.io/changes: |
- kind: fixed
description: Fix helm install when using docker inmutable tags
- kind: added
description: Adds publishing to github registry
- kind: added
description: Adds signing of helm chart
10 changes: 10 additions & 0 deletions charts/coredns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ The command deploys CoreDNS on the Kubernetes cluster in the default configurati

> **Tip**: List all releases using `helm list --all-namespaces`
## OCI installing

The chart can also be installed using the following:

```console
$ helm --namespace=kube-system install coredns oci://ghcr.io/coredns/charts/coredns --version 1.38.0
```

The command deploys the `1.38.0` version of CoreDNS on the Kubernetes cluster in the default configuration.

## Uninstalling the Chart

To uninstall/delete the `coredns` deployment:
Expand Down
Loading