Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable/asqe] add asqe helm chart #568

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions stable/asqe/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
11 changes: 11 additions & 0 deletions stable/asqe/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v2
name: asqe
description: |-
AWS Service Quotas Exporter for Prometheus. export AWS Service adjustable quotas to Prometheus.
type: application
version: 0.1.0
appVersion: "v1.0.2"
home: https://github.com/deliveryhero/asqe
maintainers:
- name: nyambati
email: [email protected]
78 changes: 78 additions & 0 deletions stable/asqe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# asqe

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.0.2](https://img.shields.io/badge/AppVersion-v1.0.2-informational?style=flat-square)

AWS Service Quotas Exporter for Prometheus. export AWS Service adjustable quotas to Prometheus.

**Homepage:** <https://github.com/deliveryhero/asqe>

## How to install this chart

Add Delivery Hero public chart repo:

```console
helm repo add deliveryhero https://charts.deliveryhero.io/
```

A simple install with default values:

```console
helm install deliveryhero/asqe
```

To install the chart with the release name `my-release`:

```console
helm install my-release deliveryhero/asqe
```

To install with some set values:

```console
helm install my-release deliveryhero/asqe --set values_key1=value1 --set values_key2=value2
```

To install with custom values file:

```console
helm install my-release deliveryhero/asqe -f values.yaml
```

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| args.cacheDuration | int | `300` | Exporter cache duration |
| args.configFile | string | `"/etc/asqe/config.yaml"` | Exporter scrape interval |
| args.promAddress | string | `"0.0.0.0"` | Exporter listen address |
| args.promPort | int | `9092` | Exporter listen port |
| config.jobs | list | `[]` | Exporter aws service quotas config |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | The image pull policy |
| image.repository | string | `"asqe"` | The container image to use |
| image.tag | string | `""` | The container image tag |
| imagePullSecrets | list | `[]` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | |
| podSecurityContext | object | `{}` | |
| replicas | int | `1` | |
| resources.limits.cpu | string | `"100m"` | cpu limits |
| resources.limits.memory | string | `"128Mi"` | memory limits |
| resources.requests.cpu | string | `"100m"` | cpu requests |
| resources.requests.memory | string | `"128Mi"` | memory requests |
| securityContext | object | `{}` | |
| service.annotations | object | `{"prometheus.io/port":"9092","prometheus.io/scrape":"true"}` | Exporter service annotations |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.automount | bool | `true` | |
| serviceAccount.name | string | `""` | |
| tolerations | list | `[]` | |

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| nyambati | <[email protected]> | |
2 changes: 2 additions & 0 deletions stable/asqe/ci/ct-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Pod does not start without real API key
replicas: 0
58 changes: 58 additions & 0 deletions stable/asqe/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "asqe.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "asqe.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "asqe.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "asqe.labels" -}}
helm.sh/chart: {{ include "asqe.chart" . }}
{{ include "asqe.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "asqe.selectorLabels" -}}
app.kubernetes.io/name: {{ include "asqe.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "asqe.serviceAccountName" -}}
{{- default (include "asqe.fullname" .) .Values.serviceAccount.name }}
{{- end }}
9 changes: 9 additions & 0 deletions stable/asqe/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "asqe.fullname" . }}
labels:
{{- include "asqe.labels" . | nindent 4 }}
data:
config.yaml: |
{{- toYaml .Values.config | nindent 4 }}
77 changes: 77 additions & 0 deletions stable/asqe/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "asqe.fullname" . }}
labels:
{{- include "asqe.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicas }}
selector:
matchLabels:
{{- include "asqe.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "asqe.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "asqe.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- --prom.port={{ .Values.args.promPort | quote }}
- --prom.address={{ .Values.args.promAddress | quote }}
- --config.file={{ .Values.args.configFile | quote }}
- --cache.duration={{ .Values.args.cacheDuration | quote }}
ports:
- name: http
containerPort: {{ .Values.args.promPort}}
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: http
readinessProbe:
httpGet:
path: /healthz
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: {{ include "asqe.fullname" . }}
mountPath: {{ .Values.args.configFile }}
readOnly: true

volumes:
- name: {{ include "asqe.fullname" . }}
configMap:
name: {{ include "asqe.fullname" . }}

{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
19 changes: 19 additions & 0 deletions stable/asqe/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "asqe.fullname" . }}
labels:
{{- include "asqe.labels" . | nindent 4 }}
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.args.promPort }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "asqe.selectorLabels" . | nindent 4 }}
11 changes: 11 additions & 0 deletions stable/asqe/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "asqe.serviceAccountName" . }}
labels:
{{- include "asqe.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
76 changes: 76 additions & 0 deletions stable/asqe/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
replicas: 1

args:
# -- Exporter listen address
promAddress: 0.0.0.0
# -- Exporter listen port
promPort: 9092
# -- Exporter cache duration
cacheDuration: 300
# -- Exporter scrape interval
configFile: /etc/asqe/config.yaml

config:
# -- Exporter aws service quotas config
jobs: []
# - serviceCode: eks
# regions: &regions
# - eu-west-1
# - us-east-1

image:
# image.repository -- The container image to use
repository: asqe
# image.pullPolicy -- The image pull policy
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# image.tag -- The container image tag
tag: ""

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
automount: true
annotations: {}
name: ""

podAnnotations: {}
podLabels: {}

podSecurityContext: {}
# fsGroup: 2000

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

service:
type: ClusterIP
# -- Exporter service annotations
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9092"

resources:
limits:
# resources.limits.cpu -- cpu limits
cpu: 100m
# resources.limits.memory -- memory limits
memory: 128Mi
requests:
# resources.requests.cpu -- cpu requests
cpu: 100m
# resources.requests.memory -- memory requests
memory: 128Mi

nodeSelector: {}

tolerations: []

affinity: {}
Loading