chore: Provide helm chart with initial documentation and CI #24
Workflow file for this run
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
name: Chart CI | |
on: | |
pull_request: | |
paths: | |
- 'charts/**' | |
- .github/workflows/chart-ci.yml | |
jobs: | |
helm-lint-test: | |
name: Helm chart | |
runs-on: ubuntu-latest | |
env: | |
CT_TARGET_BRANCH: ${{ github.event.repository.default_branch }} | |
CT_CHART_DIRS: charts | |
CT_GITHUB_GROUPS: "true" | |
CT_USE_HELMIGNORE: "true" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v4.2.0 | |
- name: Set up python | |
uses: actions/setup-python@v5.1.0 | |
with: | |
python-version: '3.x' | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@v2.6.1 | |
- name: Run chart-testing (lint) | |
run: ct lint | |
- name: Prepare host path mounts | |
run: | | |
mkdir -p ${{ runner.temp }}/run/udev/data | |
cat > ${{ runner.temp }}/kind-config.yaml <<EOM | |
kind: Cluster | |
apiVersion: kind.x-k8s.io/v1alpha4 | |
nodes: | |
- role: control-plane | |
extraMounts: | |
- hostPath: ${{ runner.temp }}/run/udev/data | |
containerPath: /run/udev/data | |
propagation: None | |
EOM | |
- name: Create kind cluster | |
uses: helm/kind-action@v1.10.0 | |
with: | |
config: ${{ runner.temp }}/kind-config.yaml | |
- name: Create dummy secret | |
run: | | |
kubectl -n kube-system create secret generic dummy --from-literal token=test | |
- name: Install required CRDs | |
run: | | |
kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml | |
# TODO(avorima): Install chart using ct once packages are available | |
- name: Install helm chart (dry-run) | |
run: > | |
helm show crds $CHART | kubectl apply -f -; | |
helm install ionoscloud-blockstorage-csi-driver $CHART -n kube-system -n kube-system -f $CHART/ci/ct-values.yaml --dry-run -o json | jq -r '.manifest' | | |
kubectl apply --dry-run=server --validate=true -f - | |
env: | |
CHART: ./charts/ionoscloud-blockstorage-csi-driver | |
helm-docs-validate: | |
name: Helm docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.4 | |
- name: Run helm-docs | |
uses: docker://jnorwood/helm-docs:v1.13.1 | |
- name: Check for changes | |
run: git diff --quiet charts/*/README.md |