Compare commits

...

2 Commits

Author SHA1 Message Date
dcc7bae921
fix(secret): adapt of the web config secret
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2024-11-26 20:39:41 +01:00
503c622df5
fix(deployment): adapt projected volume spec 2024-11-26 20:35:32 +01:00
4 changed files with 13 additions and 13 deletions

View File

@ -53,7 +53,7 @@
{{- define "prometheus-postgres-exporter.deployment.volumeMounts" -}}
{{- $volumeMounts := dict "volumeMounts" (.Values.deployment.postgresExporter.volumeMounts | default (list) ) }}
{{- $volumeMounts = merge $volumeMounts (dict "volumeMounts" (list (dict "name" "config.d" "mountPath" "/etc/prometheus-postgres-exporter/config.d" ))) }}
{{- $volumeMounts = merge $volumeMounts (dict "volumeMounts" (list (dict "name" "config-d" "mountPath" "/etc/prometheus-postgres-exporter/config.d" ))) }}
{{ toYaml $volumeMounts }}
{{- end -}}
@ -72,7 +72,7 @@
{{- $webConfigSecretName = printf "%s-web-config" (include "prometheus-postgres-exporter.fullname" . ) }}
{{- end }}
{{- $volumes = merge $volumes (dict "volumes" (list (dict "name" "config.d" "projected" (dict "defaultMode" "0444" "sources" (list (dict "secret" (dict "name" $exporterSecretName)) (dict "secret" (dict "name" $webConfigSecretName))))))) }}
{{- $volumes = merge $volumes (dict "volumes" (list (dict "name" "config-d" "projected" (dict "defaultMode" 444 "sources" (list (dict "secret" (dict "name" $exporterSecretName)) (dict "secret" (dict "name" $webConfigSecretName))))))) }}
{{ toYaml $volumes }}

View File

@ -11,7 +11,7 @@ metadata:
labels:
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ include "prometheus-postgres-exporter.fullname" . }}-webconfig
name: {{ include "prometheus-postgres-exporter.fullname" . }}-web-config
namespace: {{ .Release.Namespace }}
stringData:
webConfig.yaml: |

View File

@ -42,13 +42,13 @@ tests:
path: spec.template.spec.containers[0].volumeMounts
value:
- mountPath: /etc/prometheus-postgres-exporter/config.d
name: config.d
name: config-d
- equal:
path: spec.template.spec.volumes
value:
- name: config.d
- name: config-d
projected:
defaultMode: "0444"
defaultMode: 444
sources:
- secret:
name: prometheus-postgres-exporter-unittest-exporter-config
@ -143,13 +143,13 @@ tests:
path: spec.template.spec.containers[0].volumeMounts
value:
- mountPath: /etc/prometheus-postgres-exporter/config.d
name: config.d
name: config-d
- equal:
path: spec.template.spec.volumes
value:
- name: config.d
- name: config-d
projected:
defaultMode: "0444"
defaultMode: 444
sources:
- secret:
name: exporter-config-secret
@ -165,13 +165,13 @@ tests:
path: spec.template.spec.containers[0].volumeMounts
value:
- mountPath: /etc/prometheus-postgres-exporter/config.d
name: config.d
name: config-d
- equal:
path: spec.template.spec.volumes
value:
- name: config.d
- name: config-d
projected:
defaultMode: "0444"
defaultMode: 444
sources:
- secret:
name: prometheus-postgres-exporter-unittest-exporter-config

View File

@ -15,7 +15,7 @@ tests:
- containsDocument:
apiVersion: v1
kind: Secret
name: prometheus-postgres-exporter-unittest-webconfig
name: prometheus-postgres-exporter-unittest-web-config
namespace: testing
- notExists:
path: metadata.annotations