Skip to content

Commit

Permalink
Set InhibitionControlPlaneUnhealthy for all CAPI clusters (#1400)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Noble <[email protected]>
  • Loading branch information
AverageMarcus authored Oct 25, 2024
1 parent 4bf3c84 commit 82f7d45
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Set the `InhibitionControlPlaneUnhealthy` to be valid for all CAPI clusters, not just MCs.

## [4.20.0] - 2024-10-22

### Added
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{{- if eq .Values.managementCluster.provider.flavor "capi" }}
# This rule applies to all capi management clusters
# This rule applies to all capi clusters
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
creationTimestamp: null
labels:
{{- include "labels.common" . | nindent 4 }}
{{- if not .Values.mimir.enabled }}
cluster_type: "management_cluster"
{{- end }}
name: inhibit.capi.rules
namespace: {{ .Values.namespace }}
spec:
Expand All @@ -19,12 +16,12 @@ spec:
annotations:
description: '{{`Control plane of cluster {{ $labels.cluster_id }} is not healthy.`}}'
expr: |-
capi_kubeadmcontrolplane_status_condition{cluster_type="management_cluster", type="ControlPlaneComponentsHealthy", status="False"} == 1
or capi_kubeadmcontrolplane_status_condition{cluster_type="management_cluster", type="EtcdClusterHealthy", status="False"} == 1
or capi_kubeadmcontrolplane_status_condition{cluster_type="management_cluster", type="Available", status="False"} == 1
capi_kubeadmcontrolplane_status_condition{type="ControlPlaneComponentsHealthy", status="False"} == 1
or capi_kubeadmcontrolplane_status_condition{type="EtcdClusterHealthy", status="False"} == 1
or capi_kubeadmcontrolplane_status_condition{type="Available", status="False"} == 1
labels:
area: kaas
cluster_control_plane_unhealthy: "true"
team: turtles
team: tenet
topic: status
{{- end }}

0 comments on commit 82f7d45

Please sign in to comment.