From 5161f2f272792a84693bcece02f23ed3e941917d Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Wed, 22 May 2024 17:14:58 -0700 Subject: [PATCH 1/3] Enable yamllint for Helm Chart and GitHub Actions Problem: We're not linting YAML files for in the Helm Chart and GitHub Actions directories Solution: Enable yamllint for these directories and fix the problems. --- .github/workflows/ci.yml | 3 +++ .github/workflows/lint.yml | 2 ++ .github/workflows/nfr.yml | 6 ++--- .yamllint.yaml | 3 +-- charts/nginx-gateway-fabric/values.yaml | 34 ++++++++++++------------- 5 files changed, 26 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55bd8037e5..3bb40e85d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,9 @@ on: tags: - "v[0-9]+.[0-9]+.[0-9]+*" pull_request: + branches: + - main + - release-* schedule: - cron: "0 4 * * *" # run every day at 4am UTC diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 254d4a894f..049fedb533 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,6 +5,8 @@ on: branches: - main pull_request: + branches: + - main defaults: run: diff --git a/.github/workflows/nfr.yml b/.github/workflows/nfr.yml index 280272de43..8946b1234f 100644 --- a/.github/workflows/nfr.yml +++ b/.github/workflows/nfr.yml @@ -71,7 +71,7 @@ jobs: - name: Authenticate to Google Cloud id: auth - uses: google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa # v2.1.3 + uses: google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa # v2.1.3 with: token_format: access_token workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY }} @@ -144,9 +144,9 @@ jobs: working-directory: ./tests run: | if ${{ inputs.test_label != 'all' }}; then - sed -i '/^GINKGO_LABEL=/s/=.*/="${{ inputs.test_label }}"/' "scripts/vars.env" && make nfr-test; + sed -i '/^GINKGO_LABEL=/s/=.*/="${{ inputs.test_label }}"/' "scripts/vars.env" && make nfr-test; else - make nfr-test; + make nfr-test; fi - name: Cleanup diff --git a/.yamllint.yaml b/.yamllint.yaml index 1160805b42..a16b70fd03 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -4,10 +4,9 @@ yaml-files: - "*.yml" ignore: - - charts/nginx-gateway-fabric + - charts/nginx-gateway-fabric/templates - config/crd/bases/ - deploy/crds.yaml - - .github/workflows/ rules: braces: enable diff --git a/charts/nginx-gateway-fabric/values.yaml b/charts/nginx-gateway-fabric/values.yaml index abbe6f1aff..0c6edd932f 100644 --- a/charts/nginx-gateway-fabric/values.yaml +++ b/charts/nginx-gateway-fabric/values.yaml @@ -72,15 +72,15 @@ nginx: ## The configuration for the data plane that is contained in the NginxProxy resource. config: {} - # disableHTTP2: false - # telemetry: - # exporter: - # endpoint: otel-collector.default.svc:4317 - # interval: 5s - # batchSize: 512 - # batchCount: 4 - # serviceName: "" - # spanAttributes: [] + # disableHTTP2: false + # telemetry: + # exporter: + # endpoint: otel-collector.default.svc:4317 + # interval: 5s + # batchSize: 512 + # batchCount: 4 + # serviceName: "" + # spanAttributes: [] ## Configuration for NGINX Plus usage reporting. usage: @@ -138,14 +138,14 @@ service: ## A list of ports to expose through the NGINX Gateway Fabric service. Update it to match the listener ports from ## your Gateway resource. Follows the conventional Kubernetes yaml syntax for service ports. ports: - - port: 80 - targetPort: 80 - protocol: TCP - name: http - - port: 443 - targetPort: 443 - protocol: TCP - name: https + - port: 80 + targetPort: 80 + protocol: TCP + name: http + - port: 443 + targetPort: 443 + protocol: TCP + name: https metrics: ## Enable exposing metrics in the Prometheus format. From bba773d43edb9716c0a7f0e3d5aee388bad18850 Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Thu, 23 May 2024 09:52:13 -0700 Subject: [PATCH 2/3] indent --- charts/nginx-gateway-fabric/values.yaml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/charts/nginx-gateway-fabric/values.yaml b/charts/nginx-gateway-fabric/values.yaml index 0c6edd932f..b108a8eb6a 100644 --- a/charts/nginx-gateway-fabric/values.yaml +++ b/charts/nginx-gateway-fabric/values.yaml @@ -71,16 +71,17 @@ nginx: plus: false ## The configuration for the data plane that is contained in the NginxProxy resource. - config: {} - # disableHTTP2: false - # telemetry: - # exporter: - # endpoint: otel-collector.default.svc:4317 - # interval: 5s - # batchSize: 512 - # batchCount: 4 - # serviceName: "" - # spanAttributes: [] + config: + {} + # disableHTTP2: false + # telemetry: + # exporter: + # endpoint: otel-collector.default.svc:4317 + # interval: 5s + # batchSize: 512 + # batchCount: 4 + # serviceName: "" + # spanAttributes: [] ## Configuration for NGINX Plus usage reporting. usage: From a89e923c701e4a18b12489f75595ab9aac1bf846 Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Thu, 23 May 2024 09:57:02 -0700 Subject: [PATCH 3/3] all branches --- .github/workflows/ci.yml | 3 +-- .github/workflows/lint.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3bb40e85d2..92cd4ae3a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,8 +9,7 @@ on: - "v[0-9]+.[0-9]+.[0-9]+*" pull_request: branches: - - main - - release-* + - "*" schedule: - cron: "0 4 * * *" # run every day at 4am UTC diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 049fedb533..d62aad6460 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,7 +6,7 @@ on: - main pull_request: branches: - - main + - "*" defaults: run: