From dcb04dc818e0e0b0e836ac1ecb25cf64038e64a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petra=20C=CC=8Ci=CC=81halova=CC=81?= Date: Wed, 8 Jan 2025 10:59:12 +0100 Subject: [PATCH 1/2] add json and yaml basic validator into ci --- .github/workflows/json-yaml-validation.yml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/json-yaml-validation.yml diff --git a/.github/workflows/json-yaml-validation.yml b/.github/workflows/json-yaml-validation.yml new file mode 100644 index 00000000..c334526a --- /dev/null +++ b/.github/workflows/json-yaml-validation.yml @@ -0,0 +1,23 @@ +name: json-yaml-validate +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +permissions: + contents: read + pull-requests: write # enable write permissions for pull request comments + +jobs: + json-yaml-validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: json-yaml-validate + id: json-yaml-validate + uses: GrantBirki/json-yaml-validate@v3.2.1 # https://github.com/GrantBirki/json-yaml-validate/ + with: + comment: "true" # enable comment mode From 79a3230a5393aa121440bd383edae8ea33197f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petra=20C=CC=8Ci=CC=81halova=CC=81?= Date: Wed, 8 Jan 2025 11:08:40 +0100 Subject: [PATCH 2/2] fix yaml files - update key for resource requests - use ${} for env vars placeholders to be not confused with yaml directives --- openshift/rbac-template.yaml | 2 +- openshift/redis.yaml | 2 +- scripts/ephemeral/config_template.yaml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openshift/rbac-template.yaml b/openshift/rbac-template.yaml index ca2146ef..de55cdaa 100644 --- a/openshift/rbac-template.yaml +++ b/openshift/rbac-template.yaml @@ -514,7 +514,7 @@ objects: selector: name: rbac-pgsql resources: - limits: + requests: memory: ${MEMORY_REQUEST} limits: memory: ${MEMORY_LIMIT} diff --git a/openshift/redis.yaml b/openshift/redis.yaml index 4819fd56..902c36e9 100644 --- a/openshift/redis.yaml +++ b/openshift/redis.yaml @@ -53,7 +53,7 @@ objects: selector: name: ${NAME}-redis resources: - limits: + requests: memory: ${MEMORY_REQUEST} limits: memory: ${MEMORY_LIMIT} diff --git a/scripts/ephemeral/config_template.yaml b/scripts/ephemeral/config_template.yaml index c0e0ff6c..9044bbbd 100644 --- a/scripts/ephemeral/config_template.yaml +++ b/scripts/ephemeral/config_template.yaml @@ -13,11 +13,11 @@ apps: components: - name: rbac host: local - repo: %REPO% + repo: $(REPO} path: /deploy/rbac-clowdapp.yml parameters: - IMAGE_TAG: %IMAGE_TAG% - IMAGE: %IMAGE% + IMAGE_TAG: ${IMAGE_TAG} + IMAGE: ${IMAGE} CW_NULL_WORKAROUND: false MIN_SCHEDULER_REPLICAS: 1 CELERY_WORKER_MEMORY_LIMIT: '2Gi'