Skip to content

Commit

Permalink
helm lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rafajpet committed Mar 25, 2024
1 parent b563dae commit e195643
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 18 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/helm-lint.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]

- 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
18 changes: 4 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
4 changes: 2 additions & 2 deletions charts/aws-service-quotas-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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` | |
Expand Down
3 changes: 2 additions & 1 deletion charts/aws-service-quotas-exporter/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# -- number of replicca
# -- number of replicas
replicaCount: 1

image:
Expand Down Expand Up @@ -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: []
Expand Down

0 comments on commit e195643

Please sign in to comment.