-
Notifications
You must be signed in to change notification settings - Fork 379
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 pod disruption budget support for envoy proxies #3583
Conversation
Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
api/v1alpha1/envoyproxy_types.go
Outdated
@@ -277,6 +277,8 @@ type EnvoyProxyKubernetesProvider struct { | |||
// | |||
// +optional | |||
UseListenerPortAsContainerPort *bool `json:"useListenerPortAsContainerPort,omitempty"` | |||
// PodDisruptionBudget allows to control the pod disruption budget of ab Envoy Proxy. | |||
PodDisruptionBudget *KubernetesPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"` |
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.
should this be EnvoyPdb
instead ?
api/v1alpha1/envoyproxy_helpers.go
Outdated
EnvoyService: DefaultKubernetesService(), | ||
EnvoyDeployment: DefaultKubernetesDeployment(DefaultEnvoyProxyImage), | ||
EnvoyService: DefaultKubernetesService(), | ||
PodDisruptionBudget: DefaultKubernetesPDB(), |
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.
this would enable it by default, but looks like we'd want this to be opt in like hpa
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.
Indeed, I have just removed the default.
Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3583 +/- ##
=======================================
Coverage 68.16% 68.17%
=======================================
Files 168 168
Lines 20408 20484 +76
=======================================
+ Hits 13912 13964 +52
- Misses 5494 5511 +17
- Partials 1002 1009 +7 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
/retest |
Signed-off-by: Alexander Volchok <[email protected]>
/retest |
2 similar comments
/retest |
/retest |
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.
some minor comments
api/v1alpha1/envoyproxy_types.go
Outdated
@@ -277,6 +277,10 @@ type EnvoyProxyKubernetesProvider struct { | |||
// | |||
// +optional | |||
UseListenerPortAsContainerPort *bool `json:"useListenerPortAsContainerPort,omitempty"` | |||
|
|||
// EnvoyPDB allows to control the pod disruption budget of ab Envoy Proxy. |
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.
nit: ab => an
charts/gateway-addons-helm/README.md
Outdated
@@ -0,0 +1,96 @@ | |||
# gateway-addons-helm |
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.
Should this be generated as part of this PR?
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.
There was a bug that caused this to be generated, however, now its fixed. here->bae64e3
api/v1alpha1/shared_types.go
Outdated
// such as node drains or updates. This setting ensures that your envoy proxy maintains a certain level of availability | ||
// and resilience during maintenance operations. | ||
// +optional | ||
MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"` |
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 we need IntOrString
here? The original K8s schema uses this type, but in other places in the EG API we expose use an Int and the convert to IntOrString if required.
Also, do we need protobuf:"bytes,1,opt,name=minAvailable"
here?
MatchLabels: labels, | ||
}, | ||
}, | ||
Status: v1.PodDisruptionBudgetStatus{}, |
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.
Is the empty status needed here?
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.
removed
Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
Signed-off-by: Alexander Volchok <[email protected]>
Thanks Guy, updated. |
Signed-off-by: Alexander Volchok <[email protected]>
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.
LGTM, Thanks!
hey @alexwo DCO is failing, can you squash, sign and repush ? |
Signed-off-by: Alexander Volchok <[email protected]>
/retest |
Signed-off-by: Alexander Volchok <[email protected]>
/retest |
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.
LGTM! Just one nit
@@ -13,6 +13,7 @@ import ( | |||
appsv1 "k8s.io/api/apps/v1" | |||
autoscalingv2 "k8s.io/api/autoscaling/v2" | |||
corev1 "k8s.io/api/core/v1" | |||
v1 "k8s.io/api/policy/v1" |
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.
better go with policyv1
here. same for all other places.
Signed-off-by: Alexander Volchok <[email protected]>
What this PR does / why we need it:
Allows to ensure that envoyproxy maintains a certain level of availability and resilience during maintenance operations.
Fixes # #3546