mirror of
https://github.com/siderolabs/kres.git
synced 2026-02-05 09:45:35 +01:00
fix: fix helm-docs and do various helm improvements
- Add valuesFiles option to HelmTemplate config for passing additional values files to helm template command - Remove redundant -f values.yaml flag from helm template (chart's default values.yaml is used automatically) - Remove --template-files flag with typo from helm-docs (default README.md.gotmpl is correct) - Add buildx setup step to helm workflow to fix CI hang (was missing remote buildkit driver) - Extract SetupBuildxStep() to avoid code duplication - Add test helm chart to validate helm CI flow - Fix the workdir of helm-docs Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
This commit is contained in:
119
.github/workflows/helm.yaml
vendored
Normal file
119
.github/workflows/helm.yaml
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
|
||||
#
|
||||
# Generated on 2026-01-30T10:33:51Z by kres ae0b9fab-dirty.
|
||||
|
||||
concurrency:
|
||||
group: helm-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
"on":
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
paths:
|
||||
- test/**
|
||||
name: helm
|
||||
jobs:
|
||||
default:
|
||||
permissions:
|
||||
actions: read
|
||||
contents: write
|
||||
id-token: write
|
||||
issues: read
|
||||
packages: write
|
||||
pull-requests: read
|
||||
runs-on:
|
||||
group: generic
|
||||
steps:
|
||||
- name: gather-system-info
|
||||
id: system-info
|
||||
uses: kenchan0130/actions-system-info@59699597e84e80085a750998045983daa49274c4 # version: v1.4.0
|
||||
continue-on-error: true
|
||||
- name: print-system-info
|
||||
run: |
|
||||
MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024))
|
||||
|
||||
OUTPUTS=(
|
||||
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}"
|
||||
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}"
|
||||
"Hostname: ${{ steps.system-info.outputs.hostname }}"
|
||||
"NodeName: ${NODE_NAME}"
|
||||
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}"
|
||||
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}"
|
||||
"Name: ${{ steps.system-info.outputs.name }}"
|
||||
"Platform: ${{ steps.system-info.outputs.platform }}"
|
||||
"Release: ${{ steps.system-info.outputs.release }}"
|
||||
"Total memory: ${MEMORY_GB} GB"
|
||||
)
|
||||
|
||||
for OUTPUT in "${OUTPUTS[@]}";do
|
||||
echo "${OUTPUT}"
|
||||
done
|
||||
continue-on-error: true
|
||||
- name: checkout
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # version: v6.0.1
|
||||
- name: Unshallow
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
- name: Set up Docker Buildx
|
||||
id: setup-buildx
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # version: v3.12.0
|
||||
with:
|
||||
driver: remote
|
||||
endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234
|
||||
timeout-minutes: 10
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # version: v4.3.1
|
||||
- name: Install cosign
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # version: v4.0.0
|
||||
- name: Login to registry
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # version: v3.6.0
|
||||
with:
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
- name: Lint chart
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
helm lint test/test-helm-chart
|
||||
- name: Template chart
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
helm template -f test/test-helm-chart/ci-values.yaml test-helm-chart test/test-helm-chart
|
||||
- name: Install unit test plugin
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
make helm-plugin-install
|
||||
- name: Unit test chart
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
make chart-unittest
|
||||
- name: Generate schema
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
make chart-gen-schema
|
||||
- name: Generate docs
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
make helm-docs
|
||||
- name: Check dirty
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
make check-dirty
|
||||
- name: helm login
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
HELM_CONFIG_HOME: /var/tmp/.config/helm
|
||||
run: |
|
||||
helm registry login -u ${{ github.repository_owner }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
|
||||
- name: Release chart
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
HELM_CONFIG_HOME: /var/tmp/.config/helm
|
||||
run: |
|
||||
make helm-release
|
||||
Reference in New Issue
Block a user