diff --git a/.github/workflows/helm-lint.yml b/.github/workflows/helm-lint.yml new file mode 100644 index 0000000..dcf76cd --- /dev/null +++ b/.github/workflows/helm-lint.yml @@ -0,0 +1,40 @@ +name: Lint and Test Charts + +on: pull_request + +env: + HELM_VERSION: 3.14.0 + +jobs: + lint-test: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@v4 + with: + version: ${{ env.HELM_VERSION }} + + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + check-latest: true + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.6.1 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) + if [[ -n "$changed" ]]; then + echo "changed=true" >> "$GITHUB_OUTPUT" + fi + + - name: Run chart-testing (lint) + if: steps.list-changed.outputs.changed == 'true' + run: ct lint --target-branch ${{ github.event.repository.default_branch }} --validate-maintainers=false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 23134e3..b0d8a56 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,17 +19,7 @@ repos: - id: helm-docs args: - --chart-search-root=charts -# - repo: https://github.com/gruntwork-io/pre-commit -# rev: v0.1.17 -# hooks: -# - id: helmlint -# -# - repo: https://github.com/norwoodj/helm-docs -# rev: v1.13.0 -# hooks: -# - id: helm-docs -# args: -# - --chart-search-root=charts -# - id: helm-docs-built -# args: -# - --chart-search-root=charts + - repo: https://github.com/gruntwork-io/pre-commit + rev: v0.1.17 + hooks: + - id: helmlint diff --git a/README.md b/README.md index 33883c4..c92ddf6 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ docker run --rm -p 8080:8080 -i ghcr.io/lablabs/aws-service-quotas-exporter:late ``` ## Helm chart repository -To deploy the exporter into Kubernetes, we recommend using our manager Helm repository: +To deploy the exporter into Kubernetes, we recommend using our Helm repository: ```bash helm repo add cloudflare-exporter https://lablabs.github.io/aws-service-quotas-exporter/ diff --git a/charts/aws-service-quotas-exporter/README.md b/charts/aws-service-quotas-exporter/README.md index 4cb168c..50a9765 100644 --- a/charts/aws-service-quotas-exporter/README.md +++ b/charts/aws-service-quotas-exporter/README.md @@ -19,7 +19,7 @@ helm install aws-service-quotas-exporter/aws-service-quotas-exporter | exporter.address | string | `"0.0.0.0:8080"` | Address of http endpoint | | exporter.config.metrics | list | `[]` | Metrics config, example [config/example.yaml](../../config/example.yaml) | | exporter.config.quotas | list | `[]` | Quotas config, example [config/example.yaml](../../config/example.yaml) | -| exporter.config.scrape | string | `nil` | | +| exporter.config.scrape | string | `nil` | Base configuration for scraping, example [config/example.yaml](../../config/example.yaml) | | exporter.log.format | string | `"json"` | Log format, default json | | exporter.log.level | string | `"DEBUG"` | Log level for exporter | | fullnameOverride | string | `""` | full name override | @@ -36,7 +36,7 @@ helm install aws-service-quotas-exporter/aws-service-quotas-exporter | podSecurityContext | object | `{}` | | | readinessProbe.httpGet.path | string | `"/"` | | | readinessProbe.httpGet.port | string | `"http"` | | -| replicaCount | int | `1` | number of replicca | +| replicaCount | int | `1` | number of replicas | | resources | object | `{}` | | | securityContext | object | `{}` | | | service.port | int | `8080` | | diff --git a/charts/aws-service-quotas-exporter/values.yaml b/charts/aws-service-quotas-exporter/values.yaml index 2ef780a..cd03110 100644 --- a/charts/aws-service-quotas-exporter/values.yaml +++ b/charts/aws-service-quotas-exporter/values.yaml @@ -1,5 +1,5 @@ -# -- number of replicca +# -- number of replicas replicaCount: 1 image: @@ -128,6 +128,7 @@ exporter: # -- Log format, default json format: "json" config: + # -- Base configuration for scraping, example [config/example.yaml](../../config/example.yaml) scrape: # -- Quotas config, example [config/example.yaml](../../config/example.yaml) quotas: []