Skip to content
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

Feat: adding support for PodDisruptionBudget with eg control plane #3545

Merged
merged 22 commits into from
Jun 13, 2024

Conversation

alexwo
Copy link
Contributor

@alexwo alexwo commented Jun 5, 2024

By adding a PDB, users can define policies that prevent too many instances of the Envoy Gateway control plane from being simultaneously disrupted during voluntary operations such as node upgrades, rolling updates, or manual interventions.

Adds EG controller pdp for #3546

@alexwo alexwo force-pushed the PodDisruptionBudget branch 2 times, most recently from c18b34a to 86181a6 Compare June 5, 2024 14:38
@alexwo alexwo force-pushed the PodDisruptionBudget branch from 86181a6 to 5698a61 Compare June 5, 2024 14:40
Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.17%. Comparing base (845a5ec) to head (7b253a9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3545   +/-   ##
=======================================
  Coverage   68.17%   68.17%           
=======================================
  Files         168      168           
  Lines       20484    20484           
=======================================
  Hits        13964    13964           
  Misses       5511     5511           
  Partials     1009     1009           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Alexander Volchok <[email protected]>
@alexwo
Copy link
Contributor Author

alexwo commented Jun 5, 2024

/retest

Signed-off-by: Alexander Volchok <[email protected]>
@alexwo alexwo force-pushed the PodDisruptionBudget branch from f6ec14e to cca1e46 Compare June 10, 2024 16:47
@alexwo alexwo marked this pull request as ready for review June 10, 2024 16:47
@alexwo alexwo requested a review from a team as a code owner June 10, 2024 16:47
@@ -0,0 +1,86 @@
# gateway-addons-helm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the changes in gateway-addons-helm intentional?

Copy link
Contributor

@shawnh2 shawnh2 Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be fixed via #3555

@@ -18,7 +18,8 @@ global:
pullPolicy: IfNotPresent
# List of secrets in the same namespace of the component that can be used to pull images from private repositories.
pullSecrets: []

podDisruptionBudget:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe keep this 0 for backwards compatibility?

Copy link
Contributor Author

@alexwo alexwo Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this to 0.

alexwo added 3 commits June 11, 2024 07:18
This reverts commit cca1e46.

Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
@@ -1,5 +1,19 @@
---
# Source: gateway-helm/templates/envoy-gateway-deployment.yaml
apiVersion: policy/v1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems unreasonable, PDB should be opt-in.

Copy link
Contributor Author

@alexwo alexwo Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed this, we will deploy an extra pdb resource only if podDisruptionBudget.minAvailable is configured to be > 0.

@alexwo
Copy link
Contributor Author

alexwo commented Jun 11, 2024

/retest

@@ -5,6 +5,20 @@ metadata:
namespace: '{{ .Release.Namespace }}'
labels:
{{- include "eg.labels" . | nindent 4 }}
---
{{- if and .Values.podDisruptionBudget.minAvailable (ge (int .Values.podDisruptionBudget.minAvailable) 1) }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this indentation needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@alexwo alexwo force-pushed the PodDisruptionBudget branch from 6d65f31 to 019723b Compare June 11, 2024 23:10
@alexwo
Copy link
Contributor Author

alexwo commented Jun 11, 2024

/retest

@@ -344,6 +344,7 @@ spec:
targetPort: 19001
---
# Source: gateway-helm/templates/envoy-gateway-deployment.yaml
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be nice if you can add some helm test, under test/helm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I have added a test.

@zirain
Copy link
Member

zirain commented Jun 12, 2024

can you rebase with main

@alexwo alexwo force-pushed the PodDisruptionBudget branch from 3847c3f to e7318cc Compare June 12, 2024 03:59
alexwo and others added 4 commits June 12, 2024 06:45
Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
guydc
guydc previously approved these changes Jun 12, 2024
Copy link
Contributor

@guydc guydc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Alexander Volchok <[email protected]>
Copy link
Contributor

@shawnh2 shawnh2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks

Copy link
Contributor

@guydc guydc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@guydc guydc merged commit 8a4b13d into envoyproxy:main Jun 13, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants