From 675716d85d83237b6212f1aa9989389d9abb0acb Mon Sep 17 00:00:00 2001 From: Feruzjon Muyassarov Date: Mon, 26 Jun 2023 14:02:27 +0300 Subject: [PATCH] helm: add helm linter github action This commit adds a simple github action which runs helm lint for balloons and topology-aware plugins. Signed-off-by: Feruzjon Muyassarov --- .github/workflows/helm-lint.yaml | 26 ++++++++++ .../balloons/values.scheme.json | 48 +++++++++++++++++++ .../topology-aware/values.scheme.json | 48 +++++++++++++++++++ 3 files changed, 122 insertions(+) create mode 100644 .github/workflows/helm-lint.yaml create mode 100644 deployment/helm/resource-management-policies/balloons/values.scheme.json create mode 100644 deployment/helm/resource-management-policies/topology-aware/values.scheme.json diff --git a/.github/workflows/helm-lint.yaml b/.github/workflows/helm-lint.yaml new file mode 100644 index 000000000..55c7e34cf --- /dev/null +++ b/.github/workflows/helm-lint.yaml @@ -0,0 +1,26 @@ +name: helm linter + +on: + pull_request: + paths-ignore: + - 'deployment/helm/**' + +jobs: + lint-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@v3 + with: + version: v3.11.2 + + - name: Run balloons linter + run: helm lint deployment/helm/resource-management-policies/balloons + + - name: Run topology-aware linter + run: helm lint deployment/helm/resource-management-policies/topology-aware/ diff --git a/deployment/helm/resource-management-policies/balloons/values.scheme.json b/deployment/helm/resource-management-policies/balloons/values.scheme.json new file mode 100644 index 000000000..1610202fe --- /dev/null +++ b/deployment/helm/resource-management-policies/balloons/values.scheme.json @@ -0,0 +1,48 @@ +{ + "$schema": "http://json-schema.org/schema#", + "required": [ + "image", + "hostPort", + "resources" + ], + "properties": { + "image": { + "type": "object", + "required": [ + "name", + "tag", + "pullPolicy" + ], + "properties": { + "name": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "pullPolicy": { + "type": "string", + "enum": ["Never", "Always", "IfNotPresent"] + } + } + }, + "resources": { + "type": "object", + "required": [ + "memory", + "cpu" + ], + "properties": { + "memory": { + "type": "string" + }, + "cpu": { + "type": "string" + } + } + }, + "hostPort": { + "type": "integer" + } + } + } diff --git a/deployment/helm/resource-management-policies/topology-aware/values.scheme.json b/deployment/helm/resource-management-policies/topology-aware/values.scheme.json new file mode 100644 index 000000000..1610202fe --- /dev/null +++ b/deployment/helm/resource-management-policies/topology-aware/values.scheme.json @@ -0,0 +1,48 @@ +{ + "$schema": "http://json-schema.org/schema#", + "required": [ + "image", + "hostPort", + "resources" + ], + "properties": { + "image": { + "type": "object", + "required": [ + "name", + "tag", + "pullPolicy" + ], + "properties": { + "name": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "pullPolicy": { + "type": "string", + "enum": ["Never", "Always", "IfNotPresent"] + } + } + }, + "resources": { + "type": "object", + "required": [ + "memory", + "cpu" + ], + "properties": { + "memory": { + "type": "string" + }, + "cpu": { + "type": "string" + } + } + }, + "hostPort": { + "type": "integer" + } + } + }