Skip to content

Commit

Permalink
helm docs generation
Browse files Browse the repository at this point in the history
  • Loading branch information
rafajpet committed Mar 25, 2024
1 parent 876c580 commit b563dae
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 23 deletions.
7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ repos:
rev: v1.57.1
hooks:
- id: golangci-lint

- repo: https://github.com/norwoodj/helm-docs
rev: v1.13.1
hooks:
- id: helm-docs
args:
- --chart-search-root=charts
# - repo: https://github.com/gruntwork-io/pre-commit
# rev: v0.1.17
# hooks:
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ helm 3.14.2
awscli 2.7.14
pre-commit 2.20.0
task 3.35.1
golang 1.22.0
helm-docs 1.13.1
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ Access help:
docker run --rm -p 8080:8080 -i ghcr.io/lablabs/aws-service-quotas-exporter:latest --help
```

## Helm chart repository
To deploy the exporter into Kubernetes, we recommend using our manager Helm repository:

```bash
helm repo add cloudflare-exporter https://lablabs.github.io/aws-service-quotas-exporter/
helm install aws-service-quotas-exporter/aws-service-quotas-exporter
```

for helm chart configuration / development, follow [./charts/aws-service-quotas-exporter](./charts/aws-service-quotas-exporter)

## Contributing and reporting issues
Feel free to create an issue in this repository if you have questions, suggestions or feature requests.

Expand Down
3 changes: 3 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ tasks:
docker:build:
cmds:
- docker build -t {{ .DOCKER_IMAGE }} .
helm:docs:
cmds:
- helm-docs
62 changes: 62 additions & 0 deletions charts/aws-service-quotas-exporter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Helm Chart for aws-service-quotas-exporter

## Repository
```bash
helm repo add cloudflare-exporter https://lablabs.github.io/aws-service-quotas-exporter/
helm install aws-service-quotas-exporter/aws-service-quotas-exporter
```

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| autoscaling.enabled | bool | `false` | |
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| env | string | `nil` | Pod env section to configure |
| 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.log.format | string | `"json"` | Log format, default json |
| exporter.log.level | string | `"DEBUG"` | Log level for exporter |
| fullnameOverride | string | `""` | full name override |
| image.pullPolicy | string | `"Always"` | pull Policy |
| image.repository | string | `"ghcr.io/lablabs/aws-service-quotas-exporter"` | image repository path |
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` | image pull Secrets |
| livenessProbe.httpGet.path | string | `"/"` | |
| livenessProbe.httpGet.port | string | `"http"` | |
| nameOverride | string | `""` | helm name override |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | pod annotations |
| podLabels | object | `{}` | pod labels |
| podSecurityContext | object | `{}` | |
| readinessProbe.httpGet.path | string | `"/"` | |
| readinessProbe.httpGet.port | string | `"http"` | |
| replicaCount | int | `1` | number of replicca |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
| service.port | int | `8080` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.automount | bool | `true` | Automatically mount a ServiceAccount's API credentials? |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | If not set and create is true, a name is generated using the fullname template |
| serviceMonitor.enabled | bool | `false` | When set true then use a ServiceMonitor to configure scraping |
| serviceMonitor.interval | string | `"30s"` | Set how frequently Prometheus should scrape |
| serviceMonitor.labels | object | `{}` | Service monitor labels |
| serviceMonitor.metricRelabelings | list | `[]` | |
| serviceMonitor.namespace | string | `""` | Set the namespace the ServiceMonitor should be deployed, if empty namespace will be .Release.Namespace |
| serviceMonitor.relabelings | list | `[]` | Set relabel_configs as per https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config |
| serviceMonitor.targetLabels | list | `[]` | Set of labels to transfer on the Kubernetes Service onto the target. |
| serviceMonitor.telemetryPath | string | `"/metrics"` | Set path to exporter telemtery-path |
| serviceMonitor.timeout | string | `"10s"` | Set timeout for scrape |
| tolerations | list | `[]` | |
| volumeMounts | list | `[]` | |
| volumes | list | `[]` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
14 changes: 14 additions & 0 deletions charts/aws-service-quotas-exporter/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Helm Chart for aws-service-quotas-exporter


## Repository
```bash
helm repo add cloudflare-exporter https://lablabs.github.io/aws-service-quotas-exporter/
helm install aws-service-quotas-exporter/aws-service-quotas-exporter
```

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}
52 changes: 31 additions & 21 deletions charts/aws-service-quotas-exporter/values.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
# Default values for aws-service-quotas-exporter.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# -- number of replicca
replicaCount: 1

image:
# -- image repository path
repository: ghcr.io/lablabs/aws-service-quotas-exporter
# -- pull Policy
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
# --Overrides the image tag whose default is the chart appVersion.
tag: ""

# -- image pull Secrets
imagePullSecrets: []
# -- helm name override
nameOverride: ""
# -- full name override
fullnameOverride: ""

serviceAccount:
# Specifies whether a service account should be created
# -- Specifies whether a service account should be created
create: true
# Automatically mount a ServiceAccount's API credentials?
# -- Automatically mount a ServiceAccount's API credentials?
automount: true
# Annotations to add to the service account
# -- Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
# -- The name of the service account to use.
# --If not set and create is true, a name is generated using the fullname template
name: ""

# -- pod annotations
podAnnotations: {}
# -- pod labels
podLabels: {}

podSecurityContext: {}
Expand All @@ -43,7 +48,7 @@ service:
type: ClusterIP
port: 8080


# -- Pod env section to configure
env:
# - name: "AWS_REGION"
# value: "eu-central-1"
Expand Down Expand Up @@ -96,30 +101,35 @@ tolerations: []
affinity: {}

serviceMonitor:
# When set true then use a ServiceMonitor to configure scraping
# -- When set true then use a ServiceMonitor to configure scraping
enabled: false
# Set the namespace the ServiceMonitor should be deployed, if empty namespace will be .Release.Namespace
# -- Set the namespace the ServiceMonitor should be deployed, if empty namespace will be .Release.Namespace
namespace: ""
# Service monitor labels
# -- Service monitor labels
labels: {}
# Set how frequently Prometheus should scrape
# -- Set how frequently Prometheus should scrape
interval: 30s
# Set path to redis-exporter telemtery-path
# -- Set path to exporter telemtery-path
telemetryPath: /metrics
# Set timeout for scrape
# -- Set timeout for scrape
timeout: 10s
# Set relabel_configs as per https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
# -- Set relabel_configs as per https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
relabelings: []
# Set of labels to transfer on the Kubernetes Service onto the target.
# -- Set of labels to transfer on the Kubernetes Service onto the target.
targetLabels: []
metricRelabelings: []

exporter:
# -- Address of http endpoint
address: "0.0.0.0:8080"
log:
# -- Log level for exporter
level: "DEBUG"
# -- Log format, default json
format: "json"
config:
# scrape:
# quotas: []
# metrics: []
scrape:
# -- Quotas config, example [config/example.yaml](../../config/example.yaml)
quotas: []
# -- Metrics config, example [config/example.yaml](../../config/example.yaml)
metrics: []

0 comments on commit b563dae

Please sign in to comment.