Skip to content

Commit

Permalink
fix(alerts): remove hook-delete-policy to keep resources (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardtief authored Aug 20, 2024
1 parent 6adbfda commit 84603fc
Show file tree
Hide file tree
Showing 3 changed files with 2 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.12.0
version: 0.12.1
keywords:
- prometheus-alertmanager
dependencies:
Expand Down
1 change: 0 additions & 1 deletion alerts/charts/templates/am-ca-bundle-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ metadata:
{{- include "kube-prometheus-stack.labels" . | indent 4 }}
annotations:
"helm.sh/hook": post-install, post-upgrade
"helm.sh/hook-delete-policy": before-hook-creation
data:
{{- $extCASecret := (lookup "v1" "Secret" "greenhouse" "ingress-ca-cert").data }}
{{- $extCABundle := get $extCASecret "ca.crt" }}
Expand Down
5 changes: 1 addition & 4 deletions alerts/charts/templates/ca-secret-issuer-cert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ metadata:
{{- include "kube-prometheus-stack.labels" . | indent 4 }}
annotations:
"helm.sh/hook": pre-install, pre-upgrade
"helm.sh/hook-delete-policy": before-hook-creation
data:
{{- $ca := genCA (printf "%s-%s" $.Release.Name "custom-ca") 3650 }}
tls.crt: {{ $ca.Cert | b64enc | quote }}
tls.key: {{ $ca.Key | b64enc | quote }}
---
{{- end }}
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
Expand All @@ -24,7 +24,6 @@ metadata:
{{- include "kube-prometheus-stack.labels" . | indent 4 }}
annotations:
"helm.sh/hook": pre-install, pre-upgrade
"helm.sh/hook-delete-policy": before-hook-creation
spec:
ca:
secretName: {{ $.Release.Namespace }}-monitoring-ca
Expand All @@ -37,7 +36,6 @@ metadata:
{{- include "kube-prometheus-stack.labels" . | indent 4 }}
annotations:
"helm.sh/hook": pre-install, pre-upgrade
"helm.sh/hook-delete-policy": before-hook-creation
spec:
dnsNames:
- "*.cloud.sap"
Expand All @@ -47,4 +45,3 @@ spec:
name: {{ $.Release.Namespace }}-monitoring-issuer
secretName: tls-{{ $.Release.Namespace }}-prometheus-auth
{{- end }}
{{- end }}

0 comments on commit 84603fc

Please sign in to comment.