7 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
bf9bd4853f fix(deployment): use correct webconfig filename
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2024-11-26 20:24:58 +01:00
80a8e8096d fix(pod,podMonitor,service): avoid error of immutable labels
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2024-11-26 20:13:53 +01:00
79b61b0035 core(renovate): update configuration
Some checks failed
continuous-integration/drone/push Build is failing
2024-11-26 20:06:18 +01:00
d33b17b973 Merge pull request 'chore(deps): update prometheus-postgres-exporter docker tag to v0.16.0' (#5) from renovate/prometheus-postgres-exporter-0.x into master
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #5
2024-11-26 19:01:45 +00:00
688718008f chore(deps): update prometheus-postgres-exporter docker tag to v0.16.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2024-11-26 05:27:13 +00:00
10 changed files with 21 additions and 27 deletions

View File

@ -4,7 +4,7 @@ description: Prometheus metric exporter for PostgreSQL
type: application type: application
kubeVersion: ">=1.20.0" kubeVersion: ">=1.20.0"
version: "0.1.0" version: "0.1.0"
appVersion: "0.15.0" appVersion: "0.16.0"
# icon: https://annotations.example.com/icon.png # icon: https://annotations.example.com/icon.png

View File

@ -24,10 +24,10 @@
"matchUpdateTypes": [ "minor", "patch"] "matchUpdateTypes": [ "minor", "patch"]
}, },
{ {
"addLabels": [ "renovate/prometheus-postgres-exporter", "renovate/automerge" ], "addLabels": [ "renovate/markdownlint", "renovate/automerge" ],
"automerge": true, "automerge": true,
"matchPackageNames": [ "prometheus-postgres-exporter" ], "matchPackageNames": [ "markdownlint-cli", "@bitnami/readme-generator-for-helm" ],
"matchManagers": [ "regex" ], "matchManagers": [ "npm" ],
"matchUpdateTypes": [ "minor", "patch"] "matchUpdateTypes": [ "minor", "patch"]
} }
], ],

View File

@ -53,7 +53,7 @@
{{- define "prometheus-postgres-exporter.deployment.volumeMounts" -}} {{- define "prometheus-postgres-exporter.deployment.volumeMounts" -}}
{{- $volumeMounts := dict "volumeMounts" (.Values.deployment.postgresExporter.volumeMounts | default (list) ) }} {{- $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 }} {{ toYaml $volumeMounts }}
{{- end -}} {{- end -}}
@ -72,7 +72,7 @@
{{- $webConfigSecretName = printf "%s-web-config" (include "prometheus-postgres-exporter.fullname" . ) }} {{- $webConfigSecretName = printf "%s-web-config" (include "prometheus-postgres-exporter.fullname" . ) }}
{{- end }} {{- 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 }} {{ toYaml $volumes }}

View File

@ -13,5 +13,5 @@
{{- end }} {{- end }}
{{- define "prometheus-postgres-exporter.pod.selectorLabels" -}} {{- define "prometheus-postgres-exporter.pod.selectorLabels" -}}
{{ include "prometheus-postgres-exporter.pod.labels" . }} {{ include "prometheus-postgres-exporter.selectorLabels" . }}
{{- end }} {{- end }}

View File

@ -24,7 +24,7 @@ spec:
- name: postgres-exporter - name: postgres-exporter
args: args:
- "--config.file=/etc/prometheus-postgres-exporter/config.d/exporterConfig.yaml" - "--config.file=/etc/prometheus-postgres-exporter/config.d/exporterConfig.yaml"
- "--web.config.file=/etc/prometheus-postgres-exporter/config.d/web-config.yaml" - "--web.config.file=/etc/prometheus-postgres-exporter/config.d/webConfig.yaml"
- "--web.listen-address=:9187" - "--web.listen-address=:9187"
{{- range .Values.deployment.postgresExporter.args }} {{- range .Values.deployment.postgresExporter.args }}
- {{ . | quote }} - {{ . | quote }}

View File

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

View File

@ -36,19 +36,19 @@ tests:
path: spec.template.spec.containers[0].args path: spec.template.spec.containers[0].args
value: value:
- --config.file=/etc/prometheus-postgres-exporter/config.d/exporterConfig.yaml - --config.file=/etc/prometheus-postgres-exporter/config.d/exporterConfig.yaml
- --web.config.file=/etc/prometheus-postgres-exporter/config.d/web-config.yaml - --web.config.file=/etc/prometheus-postgres-exporter/config.d/webConfig.yaml
- --web.listen-address=:9187 - --web.listen-address=:9187
- equal: - equal:
path: spec.template.spec.containers[0].volumeMounts path: spec.template.spec.containers[0].volumeMounts
value: value:
- mountPath: /etc/prometheus-postgres-exporter/config.d - mountPath: /etc/prometheus-postgres-exporter/config.d
name: config.d name: config-d
- equal: - equal:
path: spec.template.spec.volumes path: spec.template.spec.volumes
value: value:
- name: config.d - name: config-d
projected: projected:
defaultMode: "0444" defaultMode: 444
sources: sources:
- secret: - secret:
name: prometheus-postgres-exporter-unittest-exporter-config name: prometheus-postgres-exporter-unittest-exporter-config
@ -101,7 +101,7 @@ tests:
path: spec.template.spec.containers[0].args path: spec.template.spec.containers[0].args
value: value:
- --config.file=/etc/prometheus-postgres-exporter/config.d/exporterConfig.yaml - --config.file=/etc/prometheus-postgres-exporter/config.d/exporterConfig.yaml
- --web.config.file=/etc/prometheus-postgres-exporter/config.d/web-config.yaml - --web.config.file=/etc/prometheus-postgres-exporter/config.d/webConfig.yaml
- --web.listen-address=:9187 - --web.listen-address=:9187
- --foo=bar - --foo=bar
- --bar=foo - --bar=foo
@ -143,13 +143,13 @@ tests:
path: spec.template.spec.containers[0].volumeMounts path: spec.template.spec.containers[0].volumeMounts
value: value:
- mountPath: /etc/prometheus-postgres-exporter/config.d - mountPath: /etc/prometheus-postgres-exporter/config.d
name: config.d name: config-d
- equal: - equal:
path: spec.template.spec.volumes path: spec.template.spec.volumes
value: value:
- name: config.d - name: config-d
projected: projected:
defaultMode: "0444" defaultMode: 444
sources: sources:
- secret: - secret:
name: exporter-config-secret name: exporter-config-secret
@ -165,13 +165,13 @@ tests:
path: spec.template.spec.containers[0].volumeMounts path: spec.template.spec.containers[0].volumeMounts
value: value:
- mountPath: /etc/prometheus-postgres-exporter/config.d - mountPath: /etc/prometheus-postgres-exporter/config.d
name: config.d name: config-d
- equal: - equal:
path: spec.template.spec.volumes path: spec.template.spec.volumes
value: value:
- name: config.d - name: config-d
projected: projected:
defaultMode: "0444" defaultMode: 444
sources: sources:
- secret: - secret:
name: prometheus-postgres-exporter-unittest-exporter-config name: prometheus-postgres-exporter-unittest-exporter-config

View File

@ -90,10 +90,7 @@ tests:
path: spec.selector.matchLabels path: spec.selector.matchLabels
value: value:
app.kubernetes.io/instance: prometheus-postgres-exporter-unittest app.kubernetes.io/instance: prometheus-postgres-exporter-unittest
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: prometheus-postgres-exporter app.kubernetes.io/name: prometheus-postgres-exporter
app.kubernetes.io/version: 0.1.0
helm.sh/chart: prometheus-postgres-exporter-0.1.0
- it: Render podMonitor with custom annotations and labels. - it: Render podMonitor with custom annotations and labels.
set: set:

View File

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

View File

@ -63,10 +63,7 @@ tests:
path: spec.selector path: spec.selector
value: value:
app.kubernetes.io/instance: prometheus-postgres-exporter-unittest app.kubernetes.io/instance: prometheus-postgres-exporter-unittest
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: prometheus-postgres-exporter app.kubernetes.io/name: prometheus-postgres-exporter
app.kubernetes.io/version: 0.1.0
helm.sh/chart: prometheus-postgres-exporter-0.1.0
- equal: - equal:
path: spec.sessionAffinity path: spec.sessionAffinity
value: None value: None