Basic Prometheus support (#28)
Co-authored-by: Marco Franssen <[email protected]>
This commit is contained in:
co-authored by
Marco Franssen
parent
495d9d67e8
commit
35eb3bb42e
@@ -48,6 +48,13 @@ A Helm chart to install the SPIFFE OIDC discovery provider.
|
||||
| serviceAccount.annotations | object | `{}` | |
|
||||
| serviceAccount.create | bool | `true` | |
|
||||
| serviceAccount.name | string | `""` | |
|
||||
| telemetry.prometheus.enabled | bool | `false` | |
|
||||
| telemetry.prometheus.nginxExporter.image.pullPolicy | string | `"IfNotPresent"` | |
|
||||
| telemetry.prometheus.nginxExporter.image.registry | string | `"docker.io"` | |
|
||||
| telemetry.prometheus.nginxExporter.image.repository | string | `"nginx/nginx-prometheus-exporter"` | |
|
||||
| telemetry.prometheus.nginxExporter.image.version | string | `"0.11.0"` | |
|
||||
| telemetry.prometheus.nginxExporter.resources | object | `{}` | |
|
||||
| telemetry.prometheus.port | int | `9988` | |
|
||||
| tolerations | list | `[]` | |
|
||||
| trustDomain | string | `"example.org"` | |
|
||||
|
||||
|
||||
@@ -53,5 +53,11 @@ data:
|
||||
proxy_pass http://oidc;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
location /stub_status {
|
||||
allow 127.0.0.1/32;
|
||||
deny all;
|
||||
stub_status on;
|
||||
}
|
||||
}
|
||||
{{- end }}
|
||||
|
||||
@@ -87,6 +87,20 @@ spec:
|
||||
readOnly: true
|
||||
resources:
|
||||
{{- toYaml .Values.insecureScheme.nginx.resources | nindent 12 }}
|
||||
{{- if (dig "telemetry" "prometheus" "enabled" .Values.telemetry.prometheus.enabled .Values.global) }}
|
||||
- name: nginx-exporter
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: {{ template "spiffe-oidc-discovery-provider.image" .Values.telemetry.prometheus.nginxExporter }}
|
||||
imagePullPolicy: {{ .Values.telemetry.prometheus.nginxExporter.image.pullPolicy }}
|
||||
args:
|
||||
- -nginx.scrape-uri=http://127.0.0.1/stub_status
|
||||
resources:
|
||||
{{- toYaml .Values.telemetry.prometheus.nginxExporter.resources | nindent 12 }}
|
||||
ports:
|
||||
- containerPort: 9113
|
||||
name: prom
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: spiffe-workload-api
|
||||
|
||||
@@ -110,3 +110,27 @@ tolerations: []
|
||||
affinity: {}
|
||||
|
||||
trustDomain: "example.org"
|
||||
|
||||
telemetry:
|
||||
prometheus:
|
||||
enabled: false
|
||||
port: 9988
|
||||
|
||||
nginxExporter:
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: nginx/nginx-prometheus-exporter
|
||||
pullPolicy: IfNotPresent
|
||||
version: "0.11.0"
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# requests:
|
||||
# cpu: 50m
|
||||
# memory: 32Mi
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 64Mi
|
||||
|
||||
Reference in New Issue
Block a user