Skip to content

Commit 383f651

Browse files
committed
Overriding podDisruptionBudgets for High availability
Review feedback for SRVCOM-1499 PR feedback for SRVCOM-1499 included in assembly fix for SRVCOM-1499 Second PR Feedback for SRVCOM-1499 MR feedback for SRVCOM-1499
1 parent 1c05ece commit 383f651

File tree

4 files changed

+68
-0
lines changed

4 files changed

+68
-0
lines changed

eventing/tuning/serverless-ha.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ These controller instances compete to use a shared resource, known as the leader
1313

1414
include::modules/serverless-config-replicas-eventing.adoc[leveloffset=+1]
1515
include::modules/serverless-config-replicas-kafka.adoc[leveloffset=+1]
16+
include::modules/serverless-overriding-pdbs-eventing.adoc[leveloffset=+1]

knative-serving/config-ha-services/ha-replicas-serving.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ include::_attributes/common-attributes.adoc[]
77
High availability (HA) is available by default for the Knative Serving `activator`, `autoscaler`, `autoscaler-hpa`, `controller`, `webhook`, `domain-mapping`, `domainmapping-webhook`, `kourier-control`, and `kourier-gateway` components, which are configured to have two replicas each. You can change the number of replicas for these components by modifying the `spec.high-availability.replicas` value in the `KnativeServing` custom resource (CR).
88

99
include::modules/serverless-config-replicas-serving.adoc[leveloffset=+1]
10+
include::modules/serverless-overriding-pdbs-serving.adoc[leveloffset=+1]
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * /eventing/tuning/serverless-ha.adoc
4+
5+
6+
:_content-type: PROCEDURE
7+
[id="serverless-overriding-poddistruptionbudgets-eventing_{context}"]
8+
= Overriding disruption budgets
9+
10+
A Pod Disruption Budget (PDB) is a standard feature of Kubernetes APIs that helps limit the disruption to an application when its pods need to be rescheduled for maintenance reasons.
11+
12+
.Procedure
13+
14+
* Override the default PDB for a specific resource by modifying the `minAvailable` configuration value in the `KnativeEventing` custom resource (CR).
15+
16+
.Example PDB with a `minAvailable` seting of 70%
17+
[source,yaml]
18+
----
19+
apiVersion: operator.knative.dev/v1beta1
20+
kind: KnativeEventing
21+
metadata:
22+
name: knative-eventing
23+
namespace: knative-eventing
24+
spec:
25+
podDisruptionBudgets:
26+
- name: eventing-webhook
27+
minAvailable: 70%
28+
----
29+
30+
[NOTE]
31+
====
32+
If you disable high-availability, for example, by changing the `high-availability.replicas` value to `1`, make sure you also update the corresponding PDB `minAvailable` value to `0`. Otherwise, the pod disruption budget prevents automatic cluster or Operator updates.
33+
====
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * /knative-serving/config-ha-services/ha-replicas-serving.adoc
4+
5+
6+
:_content-type: PROCEDURE
7+
[id="serverless-overriding-poddistruptionbudgets-serving_{context}"]
8+
= Overriding disruption budgets
9+
10+
A Pod Disruption Budget (PDB) is a standard feature of Kubernetes APIs that helps limit the disruption to an application when its pods need to be rescheduled for maintenance reasons.
11+
12+
.Procedure
13+
14+
* Override the default PDB for a specific resource by modifying the `minAvailable` configuration value in the `KnativeServing` custom resource (CR).
15+
16+
.Example PDB with a `minAvailable` seting of 70%
17+
[source,yaml]
18+
----
19+
apiVersion: operator.knative.dev/v1beta1
20+
kind: KnativeServing
21+
metadata:
22+
name: knative-serving
23+
namespace: knative-serving
24+
spec:
25+
podDisruptionBudgets:
26+
- name: activator-pdb
27+
minAvailable: 70%
28+
----
29+
30+
[NOTE]
31+
====
32+
If you disable high-availability, for example, by changing the `high-availability.replicas` value to `1`, make sure you also update the corresponding PDB `minAvailable` value to `0`. Otherwise, the pod disruption budget prevents automatic cluster or Operator updates.
33+
====

0 commit comments

Comments
 (0)