-
Notifications
You must be signed in to change notification settings - Fork 746
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2190 from frezes/feat/upgradeMonitoringComponentP…
…DBgvk make the monitoring component PodDisruptionBudget apiVersion compatible
- Loading branch information
Showing
4 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
roles/ks-monitor/templates/alertmanager-podDisruptionBudget.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% if kubernetes_version is version('v1.25.0', '>=') %} | ||
apiVersion: policy/v1 | ||
{% else %} | ||
apiVersion: policy/v1beta1 | ||
{% endif %} | ||
kind: PodDisruptionBudget | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: alert-router | ||
app.kubernetes.io/instance: main | ||
app.kubernetes.io/name: alertmanager | ||
app.kubernetes.io/part-of: kube-prometheus | ||
app.kubernetes.io/version: {{ alertmanager_tag | replace("v", "") }} | ||
name: alertmanager-main | ||
namespace: kubesphere-monitoring-system | ||
spec: | ||
maxUnavailable: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/component: alert-router | ||
app.kubernetes.io/instance: main | ||
app.kubernetes.io/name: alertmanager | ||
app.kubernetes.io/part-of: kube-prometheus |
23 changes: 23 additions & 0 deletions
23
roles/ks-monitor/templates/prometheus-podDisruptionBudget.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% if kubernetes_version is version('v1.25.0', '>=') %} | ||
apiVersion: policy/v1 | ||
{% else %} | ||
apiVersion: policy/v1beta1 | ||
{% endif %} | ||
kind: PodDisruptionBudget | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: prometheus | ||
app.kubernetes.io/instance: k8s | ||
app.kubernetes.io/name: prometheus | ||
app.kubernetes.io/part-of: kube-prometheus | ||
app.kubernetes.io/version: {{ prometheus_tag | replace("v", "") }} | ||
name: prometheus-k8s | ||
namespace: kubesphere-monitoring-system | ||
spec: | ||
minAvailable: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/component: prometheus | ||
app.kubernetes.io/instance: k8s | ||
app.kubernetes.io/name: prometheus | ||
app.kubernetes.io/part-of: kube-prometheus |
23 changes: 23 additions & 0 deletions
23
roles/ks-monitor/templates/thanos-ruler-podDisruptionBudget.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% if kubernetes_version is version('v1.25.0', '>=') %} | ||
apiVersion: policy/v1 | ||
{% else %} | ||
apiVersion: policy/v1beta1 | ||
{% endif %} | ||
kind: PodDisruptionBudget | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: thanos-ruler | ||
app.kubernetes.io/instance: kubesphere | ||
app.kubernetes.io/name: thanos-ruler | ||
app.kubernetes.io/part-of: kube-prometheus | ||
app.kubernetes.io/version: {{ thanos_tag | replace("v", "") }} | ||
name: thanos-ruler-kubesphere | ||
namespace: kubesphere-monitoring-system | ||
spec: | ||
minAvailable: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/component: thanos-ruler | ||
app.kubernetes.io/instance: kubesphere | ||
app.kubernetes.io/name: thanos-ruler | ||
app.kubernetes.io/part-of: kube-prometheus |