Skip to content

Commit

Permalink
fix(alerts): avoid reconciliation loop (#549)
Browse files Browse the repository at this point in the history
* fix(alerts): avoid reconciliation loop

The *-monitoring-ca should not be regenerated on every deploy.

* chore(alerts): upgrade plugindefinition to latest chart version
  • Loading branch information
richardtief authored Dec 12, 2024
1 parent c8fbfb1 commit e4e5f6e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion alerts/charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ maintainers:
name: alerts
sources:
- https://github.com/cloudoperators/greenhouse-extensions
version: 0.15.3
version: 0.15.4
keywords:
- prometheus-alertmanager
dependencies:
Expand Down
7 changes: 4 additions & 3 deletions alerts/charts/templates/ca-secret-issuer-cert.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{{- if and .Values.alerts.alertmanager.enabled .Values.alerts.alertmanager.ingress.enabled }}
{{- if not (lookup "v1" "Secret" $.Release.Namespace (printf "%s-%s" $.Release.Namespace "monitoring-ca")) }}
{{- $caSecret := (lookup "v1" "Secret" $.Release.Namespace (printf "%s-%s" $.Release.Namespace "monitoring-ca")) }}
{{- if not $caSecret }}
{{- $ca := genCA (printf "%s-%s" $.Release.Name "custom-ca") 3650 }}
apiVersion: v1
kind: Secret
type: Opaque
Expand All @@ -11,12 +13,11 @@ metadata:
annotations:
"helm.sh/hook": pre-install, pre-upgrade
data:
{{- $ca := genCA (printf "%s-%s" $.Release.Name "custom-ca") 3650 }}
tls.crt: {{ $ca.Cert | b64enc | quote }}
tls.key: {{ $ca.Key | b64enc | quote }}
---
{{- end }}
{{ if .Capabilities.APIVersions.Has "cert-manager.io/v1" }}
{{- if .Capabilities.APIVersions.Has "cert-manager.io/v1" }}
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
Expand Down
4 changes: 2 additions & 2 deletions alerts/plugindefinition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ kind: PluginDefinition
metadata:
name: alerts
spec:
version: 2.3.3
version: 2.3.4
weight: 0
displayName: Alerts
description: The Alerts Plugin consists of both Prometheus Alertmanager and Supernova, the holistic alert management UI
Expand All @@ -15,7 +15,7 @@ spec:
helmChart:
name: alerts
repository: oci://ghcr.io/cloudoperators/greenhouse-extensions/charts
version: 0.15.3
version: 0.15.4
uiApplication:
name: supernova
version: "latest"
Expand Down

0 comments on commit e4e5f6e

Please sign in to comment.