Skip to content

Commit

Permalink
fix(alerts): move the variable declaration and encode all (#343)
Browse files Browse the repository at this point in the history
alla
  • Loading branch information
richardtief authored Aug 22, 2024
1 parent feec864 commit 90df88f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 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.12.2
version: 0.12.3
keywords:
- prometheus-alertmanager
dependencies:
Expand Down
12 changes: 6 additions & 6 deletions alerts/charts/templates/am-ca-bundle-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{{- if and .Values.alerts.alertmanager.enabled .Values.alerts.alertmanager.ingress.enabled }}
{{- $extCASecret := (lookup "v1" "Secret" "greenhouse" "ingress-ca-cert").data }}
{{- $extCABundle := get $extCASecret "ca.crt" | b64dec }}
{{- $intCASecret := (lookup "v1" "Secret" $.Release.Namespace (printf "%s-%s" $.Release.Namespace "monitoring-ca")).data }}
{{- $intCABundle := get $intCASecret "tls.crt" | b64dec }}
apiVersion: v1
kind: Secret
type: Opaque

metadata:
name: {{ $.Release.Namespace }}-ca-bundle
labels:
{{- include "kube-prometheus-stack.labels" . | indent 4 }}
annotations:
"helm.sh/hook": post-install, post-upgrade
"helm.sh/hook-weight": "5"
data:
{{- $extCASecret := (lookup "v1" "Secret" "greenhouse" "ingress-ca-cert").data }}
{{- $extCABundle := get $extCASecret "ca.crt" }}
{{- $intCASecret := (lookup "v1" "Secret" $.Release.Namespace (printf "%s-%s" $.Release.Namespace "monitoring-ca")).data }}
{{- $intCABundle := get $intCASecret "tls.crt" }}
ca.crt: {{ printf "%s%s" $extCABundle $intCABundle }}
ca.crt: {{ printf "%s%s" $extCABundle $intCABundle | b64enc | quote }}
{{- end }}
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.0.1
version: 2.0.2
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.12.2
version: 0.12.3
uiApplication:
name: supernova
version: "latest"
Expand Down

0 comments on commit 90df88f

Please sign in to comment.