Skip to content

Commit 116375f

Browse files
authored
[azure-resourcegraph-exporter] Add chart
2 parents eee378e + b63d48b commit 116375f

File tree

12 files changed

+768
-0
lines changed

12 files changed

+768
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v2
2+
name: azure-resourcegraph-exporter
3+
type: application
4+
description: A Helm chart for azure-resourcegraph-exporter
5+
home: https://github.com/webdevops/azure-resourcegraph-exporter
6+
version: 1.0.0
7+
appVersion: 22.9.0
8+
keywords:
9+
- azure-resourcegraph-exporter
10+
maintainers:
11+
- email: mblaschke82@gmail.com
12+
name: mblaschke
13+
sources:
14+
- https://github.com/webdevops/azure-resourcegraph-exporter/
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# azure-resourcegraph-exporter
2+
3+
![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 22.9.0](https://img.shields.io/badge/AppVersion-22.9.0-informational?style=flat-square)
4+
5+
A Helm chart for azure-resourcegraph-exporter
6+
7+
**Homepage:** <https://github.com/webdevops/azure-resourcegraph-exporter>
8+
9+
## Maintainers
10+
11+
| Name | Email | Url |
12+
| ---- | ------ | --- |
13+
| mblaschke | <mblaschke82@gmail.com> | |
14+
15+
## Source Code
16+
17+
* <https://github.com/webdevops/azure-resourcegraph-exporter/>
18+
19+
## Values
20+
21+
| Key | Type | Default | Description |
22+
|-----|------|---------|-------------|
23+
| affinity | object | `{}` | Affinity for pod assignment |
24+
| config.existingConfigMap | string | `""` | Name of existing configmap |
25+
| config.modules | object | `{"":{"cache":0,"enabled":true}}` | Configuration of modules |
26+
| config.queries | object | `{}` | Configuration of queries |
27+
| containerSecurityContext | object | `{"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true}` | Container Security Context |
28+
| env | object | `{"CONFIG":"/config/config.yaml"}` | define env |
29+
| extraEnv | list | `[]` | Array with extra environment variables to add to all the pods |
30+
| extraVolumeMounts | list | `[]` | |
31+
| extraVolumes | list | `[]` | |
32+
| fullnameOverride | string | `""` | String to fully override azure-resourcegraph-exporter.fullname template |
33+
| global.imagePullSecrets | list | `[]` | registry secret names as an array |
34+
| image.pullPolicy | string | `"IfNotPresent"` | |
35+
| image.registry | string | `"docker.io"` | image registry |
36+
| image.repository | string | `"webdevops/azure-resourcegraph-exporter"` | image repository |
37+
| image.tag | string | `.Chart.AppVersion` | image tag (immutable tags are recommended). |
38+
| livenessProbe | object | `{"httpGet":{"path":"/healthz","port":"http"}}` | livenessProbe |
39+
| minReadySeconds | int | `10` | |
40+
| nameOverride | string | `""` | String to partially override azure-resourcegraph-exporter.fullname template (will maintain the release name) |
41+
| namespaceOverride | string | `""` | Allow to override the release namespace |
42+
| netpol.egress | list | `[{"ports":[{"port":53,"protocol":"TCP"}]},{"ports":[{"port":53,"protocol":"UDP"}]},{"ports":[{"port":443,"protocol":"TCP"}]}]` | Define network policy egress |
43+
| netpol.enabled | bool | `true` | Enable network policy |
44+
| netpol.ingress | list | `[]` | Define network policy ingress |
45+
| netpol.policyTypes | list | `["Ingress","Egress"]` | Define network policy types |
46+
| nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node labels for pod assignment. |
47+
| podAnnotations | object | `{}` | |
48+
| podLabels | object | `{}` | |
49+
| priorityClassName | string | `""` | |
50+
| prometheus.monitor.basicAuth | object | `{}` | |
51+
| prometheus.monitor.bearerTokenFile | string | `nil` | |
52+
| prometheus.monitor.enabled | bool | `false` | |
53+
| prometheus.monitor.interval | string | `""` | |
54+
| prometheus.monitor.jobLabel | string | `""` | |
55+
| prometheus.monitor.labelLimit | int | `0` | |
56+
| prometheus.monitor.labelNameLengthLimit | int | `0` | |
57+
| prometheus.monitor.labelValueLengthLimit | int | `0` | |
58+
| prometheus.monitor.metricRelabelings | list | `[]` | |
59+
| prometheus.monitor.proxyUrl | string | `""` | |
60+
| prometheus.monitor.relabelings | list | `[]` | |
61+
| prometheus.monitor.sampleLimit | int | `0` | |
62+
| prometheus.monitor.scheme | string | `"http"` | |
63+
| prometheus.monitor.scrapeTimeout | string | `""` | |
64+
| prometheus.monitor.targetLimit | int | `0` | |
65+
| prometheus.monitor.tlsConfig | object | `{}` | |
66+
| readinessProbe | object | `{"httpGet":{"path":"/readyz","port":"http"}}` | readinessProbe |
67+
| replicas | int | `1` | Number of amazon-eks-pod-identity-webhook replicas to deploy |
68+
| resources.limits | object | `{"memory":"200Mi"}` | The resources limits for the container |
69+
| resources.requests | object | `{"cpu":"100m","memory":"200Mi"}` | The resources requests for the container |
70+
| restartPolicy | string | `"Always"` | |
71+
| secrets | object | `{}` | |
72+
| secretsEnableTemplateFunctions | bool | `false` | Render all secrets values though helm tpl function |
73+
| securityContext | object | `{"fsGroup":1000,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000,"seccompProfile":{"type":"RuntimeDefault"},"supplementalGroups":[1000]}` | Pod Security Context |
74+
| service.annotations | object | `{}` | |
75+
| service.appProtocol | string | `"http"` | |
76+
| service.labels | object | `{}` | |
77+
| service.nodePort | string | `nil` | |
78+
| service.port | int | `8080` | |
79+
| service.portName | string | `"http-metrics"` | |
80+
| service.targetPort | int | `8080` | |
81+
| service.type | string | `"ClusterIP"` | |
82+
| serviceAccount.annotations | object | `{}` | |
83+
| serviceAccount.automountServiceAccountToken | bool | `false` | |
84+
| serviceAccount.create | bool | `true` | |
85+
| serviceAccount.labels | object | `{}` | |
86+
| serviceAccount.name | string | `""` | |
87+
| startupProbe | object | `{}` | startupProbe |
88+
| strategy | object | `{}` | Customize the strategy if set |
89+
| terminationGracePeriodSeconds | int | `60` | |
90+
| tolerations | list | `[]` | Tolerations for pod assignment. |
91+
92+
----------------------------------------------
93+
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
config:
2+
queries:
3+
azurerm_subscription_info:
4+
metric: azurerm_subscription_info
5+
query: |-
6+
ResourceContainers
7+
| where type == "microsoft.resources/subscriptions"
8+
value: 1
9+
fields:
10+
- name: name
11+
- name: subscriptionId
12+
target: subscriptionID
13+
type: id
14+
defaultField:
15+
type: ignore
16+
17+
secrets:
18+
test: "{{ $.Release.Namespace }}"
19+
20+
secretsEnableTemplateFunctions: true
21+
22+
extraVolumeMounts:
23+
- mountPath: /var/run/secrets/tokens
24+
name: vault-token
25+
extraVolumes:
26+
- name: vault-token
27+
projected:
28+
sources:
29+
- serviceAccountToken:
30+
path: vault-token
31+
expirationSeconds: 7200
32+
audience: vault
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/* Expand the name of the chart. */}}
3+
{{- define "azure-resourcegraph-exporter.name" -}}
4+
{{- default .Chart.Name .Values.nameOverride | trunc 50 | trimSuffix "-" -}}
5+
{{- end }}
6+
7+
{{/*
8+
Create a default fully qualified app name.
9+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
10+
*/}}
11+
{{- define "azure-resourcegraph-exporter.fullname" -}}
12+
{{- if .Values.fullnameOverride -}}
13+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
14+
{{- else -}}
15+
{{- $name := default .Chart.Name .Values.nameOverride -}}
16+
{{- if contains $name .Release.Name -}}
17+
{{- .Release.Name | trunc 26 | trimSuffix "-" -}}
18+
{{- else -}}
19+
{{- printf "%s-%s" .Release.Name $name | trunc 26 | trimSuffix "-" -}}
20+
{{- end -}}
21+
{{- end -}}
22+
{{- end -}}
23+
24+
{{/*
25+
Create chart name and version as used by the chart label.
26+
*/}}
27+
{{- define "azure-resourcegraph-exporter.chart" -}}
28+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
29+
{{- end -}}
30+
31+
{{/*
32+
Allow the release namespace to be overridden for multi-namespace deployments in combined charts
33+
*/}}
34+
{{- define "azure-resourcegraph-exporter.namespace" -}}
35+
{{- if .Values.namespaceOverride -}}
36+
{{- .Values.namespaceOverride -}}
37+
{{- else -}}
38+
{{- .Release.Namespace -}}
39+
{{- end -}}
40+
{{- end -}}
41+
42+
{{/* Generate basic labels */}}
43+
{{- define "azure-resourcegraph-exporter.labels" }}
44+
helm.sh/chart: {{ template "azure-resourcegraph-exporter.chart" . }}
45+
app.kubernetes.io/managed-by: {{ .Release.Service }}
46+
app.kubernetes.io/component: metrics
47+
app.kubernetes.io/part-of: {{ template "azure-resourcegraph-exporter.name" . }}
48+
{{- include "azure-resourcegraph-exporter.selectorLabels" . }}
49+
{{- if .Chart.AppVersion }}
50+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
51+
{{- end }}
52+
{{- if .Values.podLabels }}
53+
{{- toYaml .Values.podLabels }}
54+
{{- end }}
55+
{{- if .Values.releaseLabel }}
56+
release: {{ .Release.Name }}
57+
{{- end }}
58+
{{- end }}
59+
60+
{{/*
61+
Selector labels
62+
*/}}
63+
{{- define "azure-resourcegraph-exporter.selectorLabels" }}
64+
app.kubernetes.io/instance: {{ .Release.Name }}
65+
app.kubernetes.io/name: {{ template "azure-resourcegraph-exporter.name" . }}
66+
{{- end }}
67+
68+
{{/*
69+
The image to use
70+
*/}}
71+
{{- define "azure-resourcegraph-exporter.image" -}}
72+
{{- if .Values.image.sha -}}
73+
{{- printf "%s/%s:%s@%s" .Values.image.registry .Values.image.repository (default (printf "%s" .Chart.AppVersion) .Values.image.tag) .Values.image.sha }}
74+
{{- else -}}
75+
{{- printf "%s/%s:%s" .Values.image.registry .Values.image.repository (default (printf "%s" .Chart.AppVersion) .Values.image.tag) }}
76+
{{- end }}
77+
{{- end }}
78+
79+
80+
{{/*
81+
Create the name of the service account to use
82+
*/}}
83+
{{- define "azure-resourcegraph-exporter.serviceAccountName" -}}
84+
{{- if .Values.serviceAccount.create }}
85+
{{- default (include "azure-resourcegraph-exporter.fullname" .) .Values.serviceAccount.name }}
86+
{{- else }}
87+
{{- default "default" .Values.serviceAccount.name }}
88+
{{- end }}
89+
{{- end }}
90+
91+
{{/* Sets default scrape limits for servicemonitor */}}
92+
{{- define "servicemonitor.scrapeLimits" -}}
93+
{{- if .sampleLimit }}
94+
sampleLimit: {{ .sampleLimit }}
95+
{{- end }}
96+
{{- if .targetLimit }}
97+
targetLimit: {{ .targetLimit }}
98+
{{- end }}
99+
{{- if .labelLimit }}
100+
labelLimit: {{ .labelLimit }}
101+
{{- end }}
102+
{{- if .labelNameLengthLimit }}
103+
labelNameLengthLimit: {{ .labelNameLengthLimit }}
104+
{{- end }}
105+
{{- if .labelValueLengthLimit }}
106+
labelValueLengthLimit: {{ .labelValueLengthLimit }}
107+
{{- end }}
108+
{{- end }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{- if not .Values.config.existingConfigMap }}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ include "azure-resourcegraph-exporter.fullname" . }}
6+
labels:
7+
{{- include "azure-resourcegraph-exporter.labels" . | nindent 4 }}
8+
data:
9+
config.yaml: |-
10+
queries:
11+
{{- range $name, $query := .Values.config.queries }}
12+
-
13+
{{- toYaml $query | nindent 8 }}
14+
{{- end }}
15+
{{- end }}
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{{- $configHash := include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
2+
{{- $secretHash := include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
3+
---
4+
apiVersion: apps/v1
5+
kind: Deployment
6+
metadata:
7+
name: {{ template "azure-resourcegraph-exporter.fullname" . }}
8+
namespace: {{ template "azure-resourcegraph-exporter.namespace" . }}
9+
labels:
10+
{{- include "azure-resourcegraph-exporter.labels" . | nindent 4 }}
11+
spec:
12+
{{- with .Values.replicas }}
13+
replicas: {{ . }}
14+
{{- end }}
15+
{{- with .Values.strategy }}
16+
strategy: {{ toYaml . | nindent 4 }}
17+
{{- end }}
18+
{{- with .Values.minReadySeconds }}
19+
minReadySeconds: {{ . }}
20+
{{- end }}
21+
selector:
22+
matchLabels:
23+
{{- include "azure-resourcegraph-exporter.selectorLabels" . | nindent 6 }}
24+
template:
25+
metadata:
26+
labels:
27+
{{- include "azure-resourcegraph-exporter.labels" . | nindent 8 }}
28+
{{- with .Values.podLabels }}
29+
{{- toYaml . | nindent 8 }}
30+
{{- end }}
31+
annotations:
32+
checksum/config: {{ $configHash | quote }}
33+
checksum/secret: {{ $secretHash | quote }}
34+
{{- with .Values.podAnnotations }}
35+
{{- toYaml . | nindent 8 }}
36+
{{- end }}
37+
spec:
38+
serviceAccountName: {{ template "azure-resourcegraph-exporter.serviceAccountName" . }}
39+
{{- with .Values.priorityClassName }}
40+
priorityClassName: {{ . | quote }}
41+
{{- end }}
42+
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
43+
securityContext:
44+
{{- toYaml .Values.securityContext | nindent 8 }}
45+
containers:
46+
- name: azure-resourcegraph-exporter
47+
image: {{ include "azure-resourcegraph-exporter.image" . | quote }}
48+
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
49+
securityContext:
50+
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
51+
env:
52+
{{- range $index, $val := .Values.secrets }}
53+
- name: {{ $index | quote }}
54+
valueFrom:
55+
secretKeyRef:
56+
name: {{ template "azure-resourcegraph-exporter.fullname" $ }}
57+
key: {{ $index | quote }}
58+
{{- end }}
59+
{{- range $name, $value := .Values.env }}
60+
- name: {{ $name | quote }}
61+
value: {{ $value | quote }}
62+
{{- end }}
63+
{{- with .Values.extraEnv }}
64+
{{- tpl (toYaml .) $ | nindent 12 }}
65+
{{- end }}
66+
ports:
67+
- containerPort: 8080
68+
name: http
69+
protocol: TCP
70+
{{- with .Values.resources }}
71+
resources:
72+
{{- toYaml . | nindent 12 }}
73+
{{- end }}
74+
{{- with .Values.startupProbe }}
75+
startupProbe:
76+
{{- toYaml . | nindent 12 }}
77+
{{- end }}
78+
{{- with .Values.livenessProbe }}
79+
livenessProbe:
80+
{{- toYaml . | nindent 12 }}
81+
{{- end }}
82+
{{- with .Values.readinessProbe }}
83+
readinessProbe:
84+
{{- toYaml . | nindent 12 }}
85+
{{- end }}
86+
volumeMounts:
87+
- mountPath: /config/
88+
name: config
89+
{{- with .Values.extraVolumeMounts }}
90+
{{- toYaml . | nindent 12 }}
91+
{{- end }}
92+
{{- with .Values.nodeSelector }}
93+
nodeSelector:
94+
{{- toYaml . | nindent 8 }}
95+
{{- end }}
96+
{{- with .Values.affinity }}
97+
affinity:
98+
{{- toYaml . | nindent 8 }}
99+
{{- end }}
100+
{{- with .Values.tolerations }}
101+
tolerations:
102+
{{- toYaml . | nindent 8 }}
103+
{{- end }}
104+
volumes:
105+
- name: config
106+
configMap:
107+
name: {{ .Values.config.existingConfigMap | default (include "azure-resourcegraph-exporter.fullname" .) }}
108+
{{- with .Values.extraVolumes }}
109+
{{- toYaml . | nindent 8 }}
110+
{{- end }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{- if .Values.netpol.enabled }}
2+
---
3+
apiVersion: networking.k8s.io/v1
4+
kind: NetworkPolicy
5+
metadata:
6+
name: {{ template "azure-resourcegraph-exporter.fullname" . }}
7+
namespace: {{ template "azure-resourcegraph-exporter.namespace" . }}
8+
labels:
9+
{{- include "azure-resourcegraph-exporter.labels" . | nindent 4 }}
10+
spec:
11+
podSelector:
12+
matchLabels:
13+
{{- include "azure-resourcegraph-exporter.selectorLabels" . | nindent 6 }}
14+
policyTypes: {{ toYaml .Values.netpol.policyTypes | nindent 4 }}
15+
ingress: {{ toYaml .Values.netpol.ingress | nindent 4 }}
16+
egress: {{ toYaml .Values.netpol.egress | nindent 4 }}
17+
{{- end }}

0 commit comments

Comments
 (0)