Skip to content

Commit ff75774

Browse files
committed
Initial import
0 parents  commit ff75774

17 files changed

+892
-0
lines changed

Diff for: charts/yet-another-cloudwatch-exporter/.helmignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

Diff for: charts/yet-another-cloudwatch-exporter/Chart.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: v2
2+
name: yet-another-cloudwatch-exporter
3+
description: Yet Another Cloudwatch Exporter
4+
type: application
5+
version: 0.14.0
6+
appVersion: "v0.48.0-alpha"
7+
home: https://github.com/nerdswords/helm-charts
8+
sources:
9+
- https://github.com/nerdswords/yet-another-cloudwatch-exporter
10+
keywords:
11+
- aws
12+
- cloudwatch
13+
- prometheus
14+
- exporter
15+
- yet-another-cloudwatch-exporter
16+
- yace

Diff for: charts/yet-another-cloudwatch-exporter/README.md

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# yet-another-cloudwatch-exporter
2+
3+
![Version: 0.14.0](https://img.shields.io/badge/Version-0.14.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.48.0-alpha](https://img.shields.io/badge/AppVersion-v0.48.0--alpha-informational?style=flat-square)
4+
5+
Yet Another Cloudwatch Exporter
6+
7+
**Homepage:** <https://github.com/nerdswords/helm-charts>
8+
9+
## Installation
10+
11+
```sh
12+
helm repo add yet-another-cloudwatch-exporter https://nerdswords.github.io/yet-another-cloudwatch-exporter
13+
helm install yet-another-cloudwatch-exporter/yet-another-cloudwatch-exporter
14+
```
15+
16+
## Source Code
17+
18+
* <https://github.com/nerdswords/yet-another-cloudwatch-exporter>
19+
20+
## Values
21+
22+
| Key | Type | Default | Description |
23+
|-----|------|---------|-------------|
24+
| affinity | object | `{}` | |
25+
| aws.aws_access_key_id | string | `nil` | |
26+
| aws.aws_secret_access_key | string | `nil` | |
27+
| aws.role | string | `nil` | |
28+
| aws.secret.includesSessionToken | bool | `false` | |
29+
| aws.secret.name | string | `nil` | |
30+
| config | string | `"apiVersion: v1alpha1\nsts-region: eu-west-1\ndiscovery:\n exportedTagsOnMetrics:\n ec2:\n - Name\n ebs:\n - VolumeId\n jobs:\n - type: es\n regions:\n - eu-west-1\n searchTags:\n - key: type\n value: ^(easteregg|k8s)$\n metrics:\n - name: FreeStorageSpace\n statistics:\n - Sum\n period: 60\n length: 600\n - name: ClusterStatus.green\n statistics:\n - Minimum\n period: 60\n length: 600\n - name: ClusterStatus.yellow\n statistics:\n - Maximum\n period: 60\n length: 600\n - name: ClusterStatus.red\n statistics:\n - Maximum\n period: 60\n length: 600\n - type: elb\n regions:\n - eu-west-1\n length: 900\n delay: 120\n statistics:\n - Minimum\n - Maximum\n - Sum\n searchTags:\n - key: KubernetesCluster\n value: production-19\n metrics:\n - name: HealthyHostCount\n statistics:\n - Minimum\n period: 600\n length: 600 #(this will be ignored)\n - name: HTTPCode_Backend_4XX\n statistics:\n - Sum\n period: 60\n length: 900 #(this will be ignored)\n delay: 300 #(this will be ignored)\n nilToZero: true\n - name: HTTPCode_Backend_5XX\n period: 60\n - type: alb\n regions:\n - eu-west-1\n searchTags:\n - key: kubernetes.io/service-name\n value: .*\n metrics:\n - name: UnHealthyHostCount\n statistics: [Maximum]\n period: 60\n length: 600\n - type: vpn\n regions:\n - eu-west-1\n searchTags:\n - key: kubernetes.io/service-name\n value: .*\n metrics:\n - name: TunnelState\n statistics:\n - p90\n period: 60\n length: 300\n - type: kinesis\n regions:\n - eu-west-1\n metrics:\n - name: PutRecords.Success\n statistics:\n - Sum\n period: 60\n length: 300\n - type: s3\n regions:\n - eu-west-1\n searchTags:\n - key: type\n value: public\n metrics:\n - name: NumberOfObjects\n statistics:\n - Average\n period: 86400\n length: 172800\n - name: BucketSizeBytes\n statistics:\n - Average\n period: 86400\n length: 172800\n - type: ebs\n regions:\n - eu-west-1\n searchTags:\n - key: type\n value: public\n metrics:\n - name: BurstBalance\n statistics:\n - Minimum\n period: 600\n length: 600\n addCloudwatchTimestamp: true\n - type: kafka\n regions:\n - eu-west-1\n searchTags:\n - key: env\n value: dev\n metrics:\n - name: BytesOutPerSec\n statistics:\n - Average\n period: 600\n length: 600\n - type: appstream\n regions:\n - eu-central-1\n searchTags:\n - key: saas_monitoring\n value: true\n metrics:\n - name: ActualCapacity\n statistics:\n - Average\n period: 600\n length: 600\n - name: AvailableCapacity\n statistics:\n - Average\n period: 600\n length: 600\n - name: CapacityUtilization\n statistics:\n - Average\n period: 600\n length: 600\n - name: DesiredCapacity\n statistics:\n - Average\n period: 600\n length: 600\n - name: InUseCapacity\n statistics:\n - Average\n period: 600\n length: 600\n - name: PendingCapacity\n statistics:\n - Average\n period: 600\n length: 600\n - name: RunningCapacity\n statistics:\n - Average\n period: 600\n length: 600\n - name: InsufficientCapacityError\n statistics:\n - Average\n period: 600\n length: 600\n - type: backup\n regions:\n - eu-central-1\n searchTags:\n - key: saas_monitoring\n value: true\n metrics:\n - name: NumberOfBackupJobsCompleted\n statistics:\n - Average\n period: 600\n length: 600\nstatic:\n - namespace: AWS/AutoScaling\n name: must_be_set\n regions:\n - eu-west-1\n dimensions:\n - name: AutoScalingGroupName\n value: Test\n customTags:\n - key: CustomTag\n value: CustomValue\n metrics:\n - name: GroupInServiceInstances\n statistics:\n - Minimum\n period: 60\n length: 300"` | |
31+
| extraArgs | list | `[]` | |
32+
| fullnameOverride | string | `""` | |
33+
| image.pullPolicy | string | `"IfNotPresent"` | |
34+
| image.repository | string | `"ghcr.io/nerdswords/yet-another-cloudwatch-exporter"` | |
35+
| image.tag | string | `""` | |
36+
| imagePullSecrets | list | `[]` | |
37+
| ingress.annotations | object | `{}` | |
38+
| ingress.className | string | `""` | |
39+
| ingress.enabled | bool | `false` | |
40+
| ingress.hosts[0].host | string | `"chart-example.local"` | |
41+
| ingress.hosts[0].paths[0].path | string | `"/"` | |
42+
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
43+
| ingress.tls | list | `[]` | |
44+
| nameOverride | string | `""` | |
45+
| nodeSelector | object | `{}` | |
46+
| podAnnotations | object | `{}` | |
47+
| podLabels | object | `{}` | |
48+
| podSecurityContext | object | `{}` | |
49+
| portName | string | `"http"` | |
50+
| priorityClassName | string | `nil` | |
51+
| prometheusRule.enabled | bool | `false` | |
52+
| replicaCount | int | `1` | |
53+
| resources | object | `{}` | |
54+
| securityContext | object | `{}` | |
55+
| service.port | int | `80` | |
56+
| service.type | string | `"ClusterIP"` | |
57+
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
58+
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
59+
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
60+
| serviceMonitor.enabled | bool | `false` | |
61+
| testConnection | bool | `true` | |
62+
| tolerations | list | `[]` | |
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{{ template "chart.header" . }}
2+
{{ template "chart.deprecationWarning" . }}
3+
4+
{{ template "chart.badgesSection" . }}
5+
6+
{{ template "chart.description" . }}
7+
8+
{{ template "chart.homepageLine" . }}
9+
10+
## Installation
11+
12+
```sh
13+
helm repo add yet-another-cloudwatch-exporter https://nerdswords.github.io/yet-another-cloudwatch-exporter
14+
helm install yet-another-cloudwatch-exporter/yet-another-cloudwatch-exporter
15+
```
16+
17+
{{ template "chart.maintainersSection" . }}
18+
19+
{{ template "chart.sourcesSection" . }}
20+
21+
{{ template "chart.requirementsSection" . }}
22+
23+
{{ template "chart.valuesSection" . }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
1. Get the application URL by running these commands:
2+
{{- if .Values.ingress.enabled }}
3+
{{- range $host := .Values.ingress.hosts }}
4+
{{- range .paths }}
5+
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
6+
{{- end }}
7+
{{- end }}
8+
{{- else if contains "NodePort" .Values.service.type }}
9+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "yet-another-cloudwatch-exporter.fullname" . }})
10+
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
11+
echo http://$NODE_IP:$NODE_PORT
12+
{{- else if contains "LoadBalancer" .Values.service.type }}
13+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
14+
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "yet-another-cloudwatch-exporter.fullname" . }}'
15+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "yet-another-cloudwatch-exporter.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
16+
echo http://$SERVICE_IP:{{ .Values.service.port }}
17+
{{- else if contains "ClusterIP" .Values.service.type }}
18+
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "yet-another-cloudwatch-exporter.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
19+
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
20+
echo "Visit http://127.0.0.1:8080 to use your application"
21+
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
22+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "yet-another-cloudwatch-exporter.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "yet-another-cloudwatch-exporter.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "yet-another-cloudwatch-exporter.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "yet-another-cloudwatch-exporter.labels" -}}
37+
helm.sh/chart: {{ include "yet-another-cloudwatch-exporter.chart" . }}
38+
{{ include "yet-another-cloudwatch-exporter.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "yet-another-cloudwatch-exporter.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "yet-another-cloudwatch-exporter.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "yet-another-cloudwatch-exporter.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "yet-another-cloudwatch-exporter.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ include "yet-another-cloudwatch-exporter.fullname" . }}
5+
labels:
6+
{{- include "yet-another-cloudwatch-exporter.labels" . | nindent 4 }}
7+
data:
8+
config.yml: |
9+
{{- (tpl .Values.config $) | nindent 4 }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "yet-another-cloudwatch-exporter.fullname" . }}
5+
labels:
6+
{{- include "yet-another-cloudwatch-exporter.labels" . | nindent 4 }}
7+
spec:
8+
replicas: {{ .Values.replicaCount }}
9+
selector:
10+
matchLabels:
11+
{{- include "yet-another-cloudwatch-exporter.selectorLabels" . | nindent 6 }}
12+
template:
13+
metadata:
14+
annotations:
15+
{{ if .Values.aws.role}}iam.amazonaws.com/role: {{ .Values.aws.role }}{{ end }}
16+
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
17+
{{- with .Values.podAnnotations }}
18+
{{- toYaml . | nindent 8 }}
19+
{{- end }}
20+
labels:
21+
{{- include "yet-another-cloudwatch-exporter.selectorLabels" . | nindent 8 }}
22+
{{- with .Values.podLabels }}
23+
{{- toYaml . | nindent 8 }}
24+
{{- end }}
25+
spec:
26+
{{- with .Values.imagePullSecrets }}
27+
imagePullSecrets:
28+
{{- toYaml . | nindent 8 }}
29+
{{- end }}
30+
serviceAccountName: {{ include "yet-another-cloudwatch-exporter.serviceAccountName" . }}
31+
securityContext:
32+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
33+
containers:
34+
- name: {{ .Chart.Name }}
35+
securityContext:
36+
{{- toYaml .Values.securityContext | nindent 12 }}
37+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
38+
imagePullPolicy: {{ .Values.image.pullPolicy }}
39+
command:
40+
- "yace"
41+
- "--config.file=/config/config.yml"
42+
{{- range $key, $value := .Values.extraArgs }}
43+
- --{{ $key }}={{ $value }}
44+
{{- end }}
45+
volumeMounts:
46+
- name: vol-yet-another-cloudwatch-exporter
47+
mountPath: /config
48+
{{- if not .Values.aws.role }}
49+
{{- if .Values.aws.secret.name }}
50+
env:
51+
- name: AWS_ACCESS_KEY_ID
52+
valueFrom:
53+
secretKeyRef:
54+
key: access_key
55+
name: {{ .Values.aws.secret.name }}
56+
- name: AWS_SECRET_ACCESS_KEY
57+
valueFrom:
58+
secretKeyRef:
59+
key: secret_key
60+
name: {{ .Values.aws.secret.name }}
61+
{{- if .Values.aws.secret.includesSessionToken }}
62+
- name: AWS_SESSION_TOKEN
63+
valueFrom:
64+
secretKeyRef:
65+
key: security_token
66+
name: {{ .Values.aws.secret.name }}
67+
{{- end }}
68+
{{- else if and .Values.aws.aws_secret_access_key .Values.aws.aws_access_key_id }}
69+
env:
70+
- name: AWS_ACCESS_KEY_ID
71+
valueFrom:
72+
secretKeyRef:
73+
key: aws_access_key_id
74+
name: {{ include "yet-another-cloudwatch-exporter.fullname" . }}
75+
- name: AWS_SECRET_ACCESS_KEY
76+
valueFrom:
77+
secretKeyRef:
78+
key: aws_secret_access_key
79+
name: {{ include "yet-another-cloudwatch-exporter.fullname" . }}
80+
{{- end }}
81+
{{- end }}
82+
ports:
83+
- name: {{ .Values.portName }}
84+
containerPort: 5000
85+
protocol: TCP
86+
livenessProbe:
87+
httpGet:
88+
path: /healthz
89+
port: {{ .Values.portName }}
90+
readinessProbe:
91+
httpGet:
92+
path: /healthz
93+
port: {{ .Values.portName }}
94+
resources:
95+
{{- toYaml .Values.resources | nindent 12 }}
96+
{{- with .Values.nodeSelector }}
97+
nodeSelector:
98+
{{- toYaml . | nindent 8 }}
99+
{{- end }}
100+
{{- with .Values.affinity }}
101+
affinity:
102+
{{- toYaml . | nindent 8 }}
103+
{{- end }}
104+
{{- if .Values.priorityClassName }}
105+
priorityClassName: {{ .Values.priorityClassName }}
106+
{{- end }}
107+
{{- with .Values.tolerations }}
108+
tolerations:
109+
{{- toYaml . | nindent 8 }}
110+
{{- end }}
111+
volumes:
112+
- configMap:
113+
defaultMode: 420
114+
name: {{ include "yet-another-cloudwatch-exporter.fullname" . }}
115+
name: vol-yet-another-cloudwatch-exporter

0 commit comments

Comments
 (0)