Skip to content

Commit

Permalink
chore(helm): lint and test chart
Browse files Browse the repository at this point in the history
Create a GitHub Action that lints the Helm chart and tests installing to
a KinD cluster.

Bug: #90
  • Loading branch information
terinjokes committed Dec 31, 2023
1 parent 91cc01c commit ccc19b9
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/charts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test Charts
on:
- pull_request
- push
jobs:
chart-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: azure/setup-helm@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
check-latest: true
- uses: helm/chart-testing-action@v2
- name: chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: chart-testing (lint)
# if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
- uses: helm/kind-action@v1
# if: steps.list-changed.outputs.changed == 'true'
- name: chart-testing (install)
# if: steps.list-changed.outputs.changed == 'true'
run: ct install --target-branch ${{ github.event.repository.default_branch }}
2 changes: 1 addition & 1 deletion deploy/charts/origin-ca-issuer/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: origin-ca-issuer
version: 0.5.1
version: 0.5.2
appVersion: 0.6.1
description: A Helm chart for origin-ca-issuer
home: https://github.com/cloudflare/origin-ca-issuer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ roleRef:
name: cert-manager-controller-approve:cert-manager-k8s-cloudflare-com
subjects:
- kind: ServiceAccount
name: {{ .Values.certmanager.serviceAccountName }}
namespace: {{ .Values.certmanager.namespace }}
name: {{ .Values.cert-manager.serviceAccountName }}
namespace: {{ .Values.cert-manager.namespace }}
{{- end }}
2 changes: 1 addition & 1 deletion deploy/charts/origin-ca-issuer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ controller:
# ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#toleration-v1-core
tolerations: {}

certmanager:
cert-manager:
namespace: cert-manager
serviceAccountName: cert-manager

0 comments on commit ccc19b9

Please sign in to comment.