Skip to content

Commit

Permalink
chore: add extra values to helm command while validating the pod temp…
Browse files Browse the repository at this point in the history
…lates
  • Loading branch information
ravisingal committed Oct 6, 2024
1 parent 7fc8e2e commit e5f3933
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion validate-charts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
description: 'Arguments to be appended to lint and template commands such as "--set global.env=dev"'
required: true
default: ''
extra-values:
description: 'content of values file to pass to template command'
required: true
default: ''
check-trailing-spaces:
description: 'Check no trailing spaces in helm template'
required: false
Expand Down Expand Up @@ -54,6 +58,8 @@ runs:
if: inputs.check-pod-template == 'true'
shell: bash
run: |
echo "${{ inputs.extra-values }}" > /tmp/values.yaml
cat /tmp/values.yaml
CHART_NAME=$(awk '/^name:/ {print $2}' ${{ inputs.chart-path }}/Chart.yaml)
helm template $CHART_NAME ${{ inputs.chart-path }} ${{ inputs.extra-args }} -f ${{ github.action_path }}/values.tpl > /tmp/${CHART_NAME}.yaml
helm template $CHART_NAME ${{ inputs.chart-path }} ${{ inputs.extra-args }} -f ${{ github.action_path }}/values.tpl -f /tmp/values.yaml > /tmp/${CHART_NAME}.yaml
python ${{ github.action_path }}/check.py /tmp/${CHART_NAME}.yaml

0 comments on commit e5f3933

Please sign in to comment.