Skip to content

Commit

Permalink
add certificate expiration alert (#174)
Browse files Browse the repository at this point in the history
* add certificate expiration alert

* set the days as configurable in values yaml file

* change the description
  • Loading branch information
cathyzhang05 authored Jul 20, 2023
1 parent 6e345ff commit e8223ff
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ data:
regex: ^(cert_management_.+)$
action: keep
alerting_rules: |
cert-controller-manager.rules.yaml: |
groups:
- name: cert-controller-manager.rules
rules:
- alert: SslCertificateWillExpireSoon
expr: (cert_management_cert_object_expire-time())/86400 <= {{ .Values.configuration.certExpirationAlertDays }}
for: 30m
labels:
service: cert-controller-manager
severity: critical
type: seed
visibility: operator
annotations:
description: Certificate in namespace {{ .Release.Namespace }} will be expired less than {{ .Values.configuration.certExpirationAlertDays }} days.
summary: SSL certificate will expire less than {{ .Values.configuration.certExpirationAlertDays }} days
dashboard_operators: |
cert-controller-manager-dashboard.json: |-
{{- .Files.Get "cert-dashboard.json" | nindent 6 }}
Expand Down
1 change: 1 addition & 0 deletions charts/internal/shoot-cert-management-seed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ configuration:
# ...
# -----END CERTIFICATE-----
deactivateAuthorizations: true
certExpirationAlertDays: 15

additionalConfiguration:
- --kubeconfig.disable-deploy-crds
Expand Down

0 comments on commit e8223ff

Please sign in to comment.