-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from jontze/chore/update-helm-chart
chore(helm): Update helm chart and make it modular and easier to use
- Loading branch information
Showing
10 changed files
with
198 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Publish Helm Chart | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'helm/**' | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
env: | ||
OCI_MANIFESTS_BASE_URL: "oci://ghcr.io/jontze/manifests" | ||
OCI_MANIFESTS_PATH: "./helm/cadency" | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
name: Publish | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Helm Login | ||
run: | | ||
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io --username ${{ github.repository_owner }} --password-stdin | ||
- name: Login to ghcr.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Setup flux cli | ||
uses: fluxcd/flux2/action@main | ||
- name: Push Helm Manifests to OCI Image | ||
run: | | ||
export CHART_NAME=$(helm show chart $OCI_MANIFESTS_PATH | yq e '.name' -) | ||
export CHART_VERSION=$(helm show chart $OCI_MANIFESTS_PATH | yq e '.version' -) | ||
helm package $OCI_MANIFESTS_PATH | ||
helm push $CHART_NAME-$CHART_VERSION.tgz $OCI_MANIFESTS_BASE_URL | ||
flux tag artifact $OCI_MANIFESTS_BASE_URL/cadency_rs:$CHART_VERSION \ | ||
--tag latest \ | ||
--tag $(git rev-parse --short HEAD) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ on: | |
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'helm/**' | ||
|
||
jobs: | ||
test_branch: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
--- | ||
{{- if .Values.cadency.discordToken.createSecret -}} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "cadency.fullname" . }}-secrets | ||
name: {{ include "cadency.fullname" . }} | ||
labels: | ||
{{- include "cadency.labels" . | nindent 4 }} | ||
type: Opaque | ||
data: | ||
token: {{ .Values.cadency.discordToken | b64enc }} | ||
token: {{ .Values.cadency.discordToken.token | b64enc }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{- if .Values.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "cadency.serviceAccountName" . }} | ||
labels: | ||
{{- include "cadency.labels" . | nindent 4 }} | ||
{{- with .Values.serviceAccount.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
automountServiceAccountToken: {{ .Values.serviceAccount.automount }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters