refac(templates): remove parent dir 'prometheus-fail2ban-exporter'

This commit is contained in:
2025-07-23 21:34:57 +02:00
parent 62b0fe206e
commit 90e3520510
31 changed files with 62 additions and 62 deletions

View File

@ -16,7 +16,7 @@
{{- $secret := default (dict "data" (dict)) (lookup "v1" "Secret" .Release.Namespace .Values.config.webConfig.existingSecret.secretName ) }} {{- $secret := default (dict "data" (dict)) (lookup "v1" "Secret" .Release.Namespace .Values.config.webConfig.existingSecret.secretName ) }}
checksum/secret-web-config: {{ print $secret.spec | sha256sum }} checksum/secret-web-config: {{ print $secret.spec | sha256sum }}
{{- else }} {{- else }}
checksum/secret-web-config: {{ include (print $.Template.BasePath "/prometheus-fail2ban-exporter/secretWebConfig.yaml") . | sha256sum }} checksum/secret-web-config: {{ include (print $.Template.BasePath "/secretWebConfig.yaml") . | sha256sum }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -6,7 +6,7 @@ release:
name: prometheus-fail2ban-exporter-unittest name: prometheus-fail2ban-exporter-unittest
namespace: testing namespace: testing
templates: templates:
- templates/prometheus-fail2ban-exporter/configMapGrafanaDashboardFail2BanExporter.yaml - templates/configMapGrafanaDashboardFail2BanExporter.yaml
tests: tests:
- it: Rendering fail2banExporter - it: Rendering fail2banExporter
asserts: asserts:

View File

@ -6,23 +6,23 @@ release:
name: prometheus-fail2ban-exporter-unittest name: prometheus-fail2ban-exporter-unittest
namespace: testing namespace: testing
templates: templates:
- templates/prometheus-fail2ban-exporter/daemonSet.yaml - templates/daemonSet.yaml
- templates/prometheus-fail2ban-exporter/secretWebConfig.yaml - templates/secretWebConfig.yaml
tests: tests:
- it: Rendering default - it: Rendering default
asserts: asserts:
- hasDocuments: - hasDocuments:
count: 1 count: 1
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- containsDocument: - containsDocument:
apiVersion: apps/v1 apiVersion: apps/v1
kind: DaemonSet kind: DaemonSet
name: prometheus-fail2ban-exporter-unittest name: prometheus-fail2ban-exporter-unittest
namespace: testing namespace: testing
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- notExists: - notExists:
path: metadata.annotations path: metadata.annotations
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- equal: - equal:
path: metadata.labels path: metadata.labels
value: value:
@ -31,10 +31,10 @@ tests:
app.kubernetes.io/name: prometheus-fail2ban-exporter app.kubernetes.io/name: prometheus-fail2ban-exporter
app.kubernetes.io/version: 0.1.0 app.kubernetes.io/version: 0.1.0
helm.sh/chart: prometheus-fail2ban-exporter-0.1.0 helm.sh/chart: prometheus-fail2ban-exporter-0.1.0
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- exists: - exists:
path: spec.template.metadata.annotations.checksum/secret-web-config path: spec.template.metadata.annotations.checksum/secret-web-config
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- equal: - equal:
path: spec.template.metadata.labels path: spec.template.metadata.labels
value: value:
@ -43,19 +43,19 @@ tests:
app.kubernetes.io/name: prometheus-fail2ban-exporter app.kubernetes.io/name: prometheus-fail2ban-exporter
app.kubernetes.io/version: 0.1.0 app.kubernetes.io/version: 0.1.0
helm.sh/chart: prometheus-fail2ban-exporter-0.1.0 helm.sh/chart: prometheus-fail2ban-exporter-0.1.0
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- notExists: - notExists:
path: spec.template.spec.affinity path: spec.template.spec.affinity
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- notExists: - notExists:
path: spec.template.spec.containers[0].envFrom path: spec.template.spec.containers[0].envFrom
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- equal: - equal:
path: spec.template.spec.containers[0].args path: spec.template.spec.containers[0].args
value: value:
# - --web.config.file=/etc/prometheus-fail2ban-exporter/config.d/webConfig.yaml # - --web.config.file=/etc/prometheus-fail2ban-exporter/config.d/webConfig.yaml
- --web.listen-address=:9191 - --web.listen-address=:9191
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- equal: - equal:
path: spec.template.spec.containers[0].volumeMounts path: spec.template.spec.containers[0].volumeMounts
value: value:
@ -63,7 +63,7 @@ tests:
name: socket name: socket
- mountPath: /etc/prometheus-fail2ban-exporter/config.d - mountPath: /etc/prometheus-fail2ban-exporter/config.d
name: config-d name: config-d
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- equal: - equal:
path: spec.template.spec.volumes path: spec.template.spec.volumes
value: value:
@ -74,59 +74,59 @@ tests:
- name: config-d - name: config-d
secret: secret:
secretName: prometheus-fail2ban-exporter-unittest-web-config secretName: prometheus-fail2ban-exporter-unittest-web-config
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- equal: - equal:
path: spec.template.spec.containers[0].image path: spec.template.spec.containers[0].image
value: git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter:0.1.0 value: git.cryptic.systems/volker.raschek/prometheus-fail2ban-exporter:0.1.0
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- equal: - equal:
path: spec.template.spec.containers[0].imagePullPolicy path: spec.template.spec.containers[0].imagePullPolicy
value: IfNotPresent value: IfNotPresent
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- notExists: - notExists:
path: spec.template.spec.containers[0].resources path: spec.template.spec.containers[0].resources
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- notExists: - notExists:
path: spec.template.spec.containers[0].securityContext path: spec.template.spec.containers[0].securityContext
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- notExists: - notExists:
path: spec.template.spec.dnsConfig path: spec.template.spec.dnsConfig
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- notExists: - notExists:
path: spec.template.spec.dnsPolicy path: spec.template.spec.dnsPolicy
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- notExists: - notExists:
path: spec.template.spec.hostname path: spec.template.spec.hostname
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- equal: - equal:
path: spec.template.spec.hostNetwork path: spec.template.spec.hostNetwork
value: false value: false
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- notExists: - notExists:
path: spec.template.spec.imagePullSecrets path: spec.template.spec.imagePullSecrets
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- notExists: - notExists:
path: spec.template.spec.nodeSelector path: spec.template.spec.nodeSelector
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- notExists: - notExists:
path: spec.template.spec.priorityClassName path: spec.template.spec.priorityClassName
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- notExists: - notExists:
path: spec.template.spec.restartPolicy path: spec.template.spec.restartPolicy
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- notExists: - notExists:
path: spec.template.spec.subdomain path: spec.template.spec.subdomain
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- equal: - equal:
path: spec.template.spec.terminationGracePeriodSeconds path: spec.template.spec.terminationGracePeriodSeconds
value: 60 value: 60
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- notExists: - notExists:
path: spec.template.spec.tolerations path: spec.template.spec.tolerations
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- notExists: - notExists:
path: spec.template.spec.topologySpreadConstraints path: spec.template.spec.topologySpreadConstraints
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- equal: - equal:
path: spec.updateStrategy path: spec.updateStrategy
value: value:
@ -134,7 +134,7 @@ tests:
maxSurge: 1 maxSurge: 1
maxUnavailable: 0 maxUnavailable: 0
type: "RollingUpdate" type: "RollingUpdate"
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test custom affinity - it: Test custom affinity
set: set:
@ -161,7 +161,7 @@ tests:
values: values:
- antarctica-east1 - antarctica-east1
- antarctica-west1 - antarctica-west1
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test additional arguments - it: Test additional arguments
set: set:
@ -176,7 +176,7 @@ tests:
- --web.listen-address=:9191 - --web.listen-address=:9191
- --foo=bar - --foo=bar
- --bar=foo - --bar=foo
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test custom imageRegistry and imageRepository - it: Test custom imageRegistry and imageRepository
set: set:
@ -186,7 +186,7 @@ tests:
- equal: - equal:
path: spec.template.spec.containers[0].image path: spec.template.spec.containers[0].image
value: registry.example.local/path/special/prometheus-fail2ban-exporter:0.1.0 value: registry.example.local/path/special/prometheus-fail2ban-exporter:0.1.0
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test custom imagePullPolicy - it: Test custom imagePullPolicy
set: set:
@ -195,7 +195,7 @@ tests:
- equal: - equal:
path: spec.template.spec.containers[0].imagePullPolicy path: spec.template.spec.containers[0].imagePullPolicy
value: Always value: Always
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test config.webConfig.existingSecret - it: Test config.webConfig.existingSecret
set: set:
@ -209,7 +209,7 @@ tests:
name: socket name: socket
- mountPath: /etc/prometheus-fail2ban-exporter/config.d - mountPath: /etc/prometheus-fail2ban-exporter/config.d
name: config-d name: config-d
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- equal: - equal:
path: spec.template.spec.volumes path: spec.template.spec.volumes
value: value:
@ -220,7 +220,7 @@ tests:
- name: config-d - name: config-d
secret: secret:
secretName: web-config-secret secretName: web-config-secret
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test custom resource limits and requests - it: Test custom resource limits and requests
set: set:
@ -240,7 +240,7 @@ tests:
resourceFieldRef: resourceFieldRef:
divisor: "1" divisor: "1"
resource: limits.cpu resource: limits.cpu
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- equal: - equal:
path: spec.template.spec.containers[0].resources path: spec.template.spec.containers[0].resources
value: value:
@ -250,7 +250,7 @@ tests:
requests: requests:
cpu: 25m cpu: 25m
memory: 100MB memory: 100MB
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test custom securityContext - it: Test custom securityContext
set: set:
@ -277,7 +277,7 @@ tests:
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
runAsNonRoot: true runAsNonRoot: true
runAsUser: 1000 runAsUser: 1000
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test dnsConfig - it: Test dnsConfig
set: set:
@ -292,7 +292,7 @@ tests:
nameservers: nameservers:
- "8.8.8.8" - "8.8.8.8"
- "8.8.4.4" - "8.8.4.4"
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test dnsPolicy - it: Test dnsPolicy
set: set:
@ -301,7 +301,7 @@ tests:
- equal: - equal:
path: spec.template.spec.dnsPolicy path: spec.template.spec.dnsPolicy
value: ClusterFirst value: ClusterFirst
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test hostNetwork, hostname, subdomain - it: Test hostNetwork, hostname, subdomain
set: set:
@ -312,15 +312,15 @@ tests:
- equal: - equal:
path: spec.template.spec.hostNetwork path: spec.template.spec.hostNetwork
value: true value: true
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- equal: - equal:
path: spec.template.spec.hostname path: spec.template.spec.hostname
value: pg-exporter value: pg-exporter
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- equal: - equal:
path: spec.template.spec.subdomain path: spec.template.spec.subdomain
value: exporters.internal value: exporters.internal
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test imagePullSecrets - it: Test imagePullSecrets
set: set:
@ -333,7 +333,7 @@ tests:
value: value:
- name: my-pull-secret - name: my-pull-secret
- name: my-special-secret - name: my-special-secret
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test nodeSelector - it: Test nodeSelector
set: set:
@ -344,7 +344,7 @@ tests:
path: spec.template.spec.nodeSelector path: spec.template.spec.nodeSelector
value: value:
foo: bar foo: bar
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test priorityClassName - it: Test priorityClassName
set: set:
@ -353,7 +353,7 @@ tests:
- equal: - equal:
path: spec.template.spec.priorityClassName path: spec.template.spec.priorityClassName
value: my-priority value: my-priority
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test restartPolicy - it: Test restartPolicy
set: set:
@ -362,7 +362,7 @@ tests:
- equal: - equal:
path: spec.template.spec.restartPolicy path: spec.template.spec.restartPolicy
value: Always value: Always
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test terminationGracePeriodSeconds - it: Test terminationGracePeriodSeconds
set: set:
@ -371,7 +371,7 @@ tests:
- equal: - equal:
path: spec.template.spec.terminationGracePeriodSeconds path: spec.template.spec.terminationGracePeriodSeconds
value: 120 value: 120
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test tolerations - it: Test tolerations
set: set:
@ -388,7 +388,7 @@ tests:
operator: Equal operator: Equal
value: fail2ban value: fail2ban
effect: NoSchedule effect: NoSchedule
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test topologySpreadConstraints - it: Test topologySpreadConstraints
set: set:
@ -407,7 +407,7 @@ tests:
labelSelector: labelSelector:
matchLabels: matchLabels:
app.kubernetes.io/instance: prometheus-fail2ban-exporter app.kubernetes.io/instance: prometheus-fail2ban-exporter
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- it: Test additional volumeMounts and volumes - it: Test additional volumeMounts and volumes
set: set:
@ -426,7 +426,7 @@ tests:
mountPath: /usr/lib/prometheus-fail2ban-exporter/data mountPath: /usr/lib/prometheus-fail2ban-exporter/data
- name: config-d - name: config-d
mountPath: /etc/prometheus-fail2ban-exporter/config.d mountPath: /etc/prometheus-fail2ban-exporter/config.d
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml
- equal: - equal:
path: spec.template.spec.volumes path: spec.template.spec.volumes
value: value:
@ -436,4 +436,4 @@ tests:
- name: config-d - name: config-d
secret: secret:
secretName: prometheus-fail2ban-exporter-unittest-web-config secretName: prometheus-fail2ban-exporter-unittest-web-config
template: templates/prometheus-fail2ban-exporter/daemonSet.yaml template: templates/daemonSet.yaml

View File

@ -6,7 +6,7 @@ release:
name: prometheus-fail2ban-exporter-unittest name: prometheus-fail2ban-exporter-unittest
namespace: testing namespace: testing
templates: templates:
- templates/prometheus-fail2ban-exporter/ingress.yaml - templates/ingress.yaml
tests: tests:
- it: Skip ingress by default. - it: Skip ingress by default.
asserts: asserts:

View File

@ -6,7 +6,7 @@ release:
name: prometheus-fail2ban-exporter-unittest name: prometheus-fail2ban-exporter-unittest
namespace: testing namespace: testing
templates: templates:
- templates/prometheus-fail2ban-exporter/networkPolicies.yaml - templates/networkPolicies.yaml
tests: tests:
- it: Skip networkPolicies in general disabled. - it: Skip networkPolicies in general disabled.
set: set:

View File

@ -6,7 +6,7 @@ release:
name: prometheus-fail2ban-exporter-unittest name: prometheus-fail2ban-exporter-unittest
namespace: testing namespace: testing
templates: templates:
- templates/prometheus-fail2ban-exporter/podMonitor.yaml - templates/podMonitor.yaml
tests: tests:
- it: Skip podMonitor when metrics are disabled. - it: Skip podMonitor when metrics are disabled.
set: set:

View File

@ -6,7 +6,7 @@ release:
name: prometheus-fail2ban-exporter-unittest name: prometheus-fail2ban-exporter-unittest
namespace: testing namespace: testing
templates: templates:
- templates/prometheus-fail2ban-exporter/secretWebConfig.yaml - templates/secretWebConfig.yaml
tests: tests:
- it: Rendering default secret. - it: Rendering default secret.
asserts: asserts:

View File

@ -6,7 +6,7 @@ release:
name: prometheus-fail2ban-exporter-unittest name: prometheus-fail2ban-exporter-unittest
namespace: testing namespace: testing
templates: templates:
- templates/prometheus-fail2ban-exporter/serviceAccount.yaml - templates/serviceAccount.yaml
tests: tests:
- it: Skip rendering. - it: Skip rendering.
set: set:

View File

@ -6,7 +6,7 @@ release:
name: prometheus-fail2ban-exporter-unittest name: prometheus-fail2ban-exporter-unittest
namespace: testing namespace: testing
templates: templates:
- templates/prometheus-fail2ban-exporter/serviceMonitorHTTP.yaml - templates/serviceMonitorHTTP.yaml
tests: tests:
- it: Skip serviceMonitor when service is disabled. - it: Skip serviceMonitor when service is disabled.
set: set:

View File

@ -6,7 +6,7 @@ release:
name: prometheus-fail2ban-exporter-unittest name: prometheus-fail2ban-exporter-unittest
namespace: testing namespace: testing
templates: templates:
- templates/prometheus-fail2ban-exporter/serviceHTTP.yaml - templates/serviceHTTP.yaml
tests: tests:
- it: Skip service when disabled. - it: Skip service when disabled.
set: set: