-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1875 - Implementing resiliency measures - PodDisruptionBudget #2237
Changes from 5 commits
0ae81c3
d0f2971
c3149fc
3f70d43
347bdb9
547a148
3762b80
c5ee771
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,6 +182,17 @@ objects: | |
resources: | ||
requests: | ||
storage: ${PVC_SIZE} | ||
- apiVersion: policy/v1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have a source of recommendation for Patroni PDB configuration? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
kind: PodDisruptionBudget | ||
metadata: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How we would apply these changes to PROD? Is there a plan for it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idea is to deploy the PDB configuration in our namespace manually, than running the yaml. |
||
name: ${NAME}-pdb | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: ${NAME} | ||
minAvailable: 3 | ||
maxUnavailable: 1 | ||
disruptionsAllowed: 1 | ||
parameters: | ||
- name: NAME | ||
value: patroni | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,6 +148,17 @@ objects: | |
requests: | ||
storage: ${PVC_SIZE} | ||
storageClassName: ${STORAGE_CLASS} | ||
- apiVersion: policy/v1 | ||
kind: PodDisruptionBudget | ||
metadata: | ||
name: ${NAME}-pdb | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: ${NAME} | ||
minAvailable: 6 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have a source of recommendation for Redis PDB configuration? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As all the databases we use are statefulsets and I followed the documentation below The numbers I have put in there are values I have like maxUnavailable for each pods, when the disruption happens. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just wondering if there is a recommendation from Gov or if we can get something from RocketChat. |
||
maxUnavailable: 2 | ||
disruptionsAllowed: 1 | ||
parameters: | ||
- name: NAME | ||
description: The name of the application for labelling all artifacts. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,6 @@ objects: | |
name: ${NAME} | ||
spec: | ||
replicas: "${{REPLICAS}}" | ||
disruptionBudget: | ||
maxUnavailable: 1 | ||
minAvailable: "${{REPLICAS}}" | ||
revisionHistoryLimit: 10 | ||
selector: | ||
deploymentconfig: ${NAME} | ||
|
@@ -97,6 +94,16 @@ objects: | |
minReplicas: "${{REPLICAS}}" | ||
maxReplicas: 10 | ||
targetCPUUtilizationPercentage: 80 | ||
- apiVersion: policy/v1 | ||
kind: PodDisruptionBudget | ||
metadata: | ||
name: ${NAME}-pdb | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: ${NAME} | ||
maxUnavailable: 1 | ||
disruptionsAllowed: 1 | ||
parameters: | ||
- name: NAME | ||
required: true | ||
|
@@ -105,9 +112,9 @@ parameters: | |
- name: SERVICE_NAME | ||
value: web | ||
- name: CPU_LIMIT | ||
value: "0.5" | ||
value: "0.25" | ||
- name: MEMORY_LIMIT | ||
value: "256M" | ||
value: "512M" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SIMS-Api will do way more processing than the Web POD, why we would justify more memory allocation to Web than API? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. initially we had only one pod API with more memory, but due to the change in replication controller to have max replicas of 10 we changed it to smaller numbers. In the case of web, even though there are more processing done by API, the web had to render the application faster, so for safer side, I had the values in the vertical pod bumped up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The POD will not render anything, it will just allow the download of static files (HTML, js, CSS, ect.). I did not follow the explanation. |
||
- name: CPU_REQUEST | ||
value: "0.1" | ||
- name: MEMORY_REQUEST | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind elaborating on how the
disruptionsAllowed
configuration affects the PDB?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://kubernetes.io/docs/tasks/run-application/configure-pdb/
disruptionsAllowed is a status configuration, I thought i can configure them. Removing it now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not sure about what it was after reading some docs that why I asked 😉