Skip to content

Commit

Permalink
helm: fix tolerations schema definition
Browse files Browse the repository at this point in the history
  • Loading branch information
yorugac committed Nov 1, 2024
1 parent d54a2e1 commit e892e05
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
33 changes: 19 additions & 14 deletions .github/workflows/helm-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,28 @@ jobs:
run: |
make helm-schema
- name: Configure Git
- name: Branch
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git checkout -b helm/schema-update
git add charts/k6-operator/values.schema.json
git diff --cached | tee diff.file
echo "WC_DIFF=$(wc -c < diff.file)" >> "$GITHUB_OUTPUT"
- name: Commit and push changes
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: "Make PR"
if: ${{ steps.branch.WC_DIFF }} > 0
run: |
git add charts/k6-operator/values.schema.json
if git diff-index --quiet HEAD; then
echo "No updates to helm values schema"
else
git commit -m "gen schema json"
git push origin HEAD:helm-schema
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -m "auto: generate schema json"
git push -u origin helm/schema-update
gh pr create --title "Helm schema update" -B main -H helm/schema-update --body "Auto-generated by Github Workflow"
# We're failing here, so that maintainer can review the PR and merge it. Then Helm release should be re-run.
echo "Review the PR with schema update and re-run Helm release."
exit 1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

call-update-helm-repo:
needs:
Expand Down
3 changes: 2 additions & 1 deletion charts/k6-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,10 @@
},
"tolerations": {
"additionalProperties": true,
"items": {},
"description": "tolerations -- Tolerations to be applied on all containers",
"title": "tolerations",
"type": "object"
"type": "array"
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
4 changes: 2 additions & 2 deletions charts/k6-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ affinity: {}
# @schema
# additionalProperties: true
# required: false
# type: object
# type: array
# @schema
# tolerations -- Tolerations to be applied on all containers
tolerations: {}
tolerations: []

# @schema
# required: false
Expand Down

0 comments on commit e892e05

Please sign in to comment.