Add support for PDB and TopologySpreadConstraints #10
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: Helm linter | |
on: | |
pull_request: | |
types: ["opened", "edited", "reopened", "synchronize"] | |
branches: | |
- 'main' | |
paths: | |
- "charts/**" | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Helm tool installer | |
uses: Azure/setup-helm@v3 | |
- name: Setup Kubeval | |
uses: lra/[email protected] | |
#check, was helm version increased in Chart.yaml? | |
- name: Check version | |
shell: bash | |
run: | | |
helm_version_new=$(cat charts/kafka-ui/Chart.yaml | grep version | awk '{print $2}') | |
helm_version_old=$(curl -s https://raw.githubusercontent.com/provectus/kafka-ui-charts/main/charts/kafka-ui/Chart.yaml | grep version | awk '{print $2}' ) | |
echo $helm_version_old | |
echo $helm_version_new | |
if [[ "$helm_version_new" > "$helm_version_old" ]]; then exit 0 ; else exit 1 ; fi | |
- name: Run kubeval | |
shell: bash | |
run: | | |
sed -i "s@enabled: false@enabled: true@g" charts/kafka-ui/values.yaml | |
K8S_VERSIONS=$(git ls-remote --refs --tags https://github.com/kubernetes/kubernetes.git | cut -d/ -f3 | grep -e '^v1\.[0-9]\{2\}\.[0]\{1,2\}$' | grep -v -e '^v1\.1[0-7]\{1\}' | cut -c2-) | |
echo "NEXT K8S VERSIONS ARE GOING TO BE TESTED: $K8S_VERSIONS" | |
echo "" | |
for version in $K8S_VERSIONS | |
do | |
echo $version; | |
helm template --kube-version $version --set ingress.enabled=true charts/kafka-ui -f charts/kafka-ui/values.yaml | kubeval --additional-schema-locations https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master --strict -v $version; | |
done |