-
Notifications
You must be signed in to change notification settings - Fork 689
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
basic Gateway address support #4443
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4443 +/- ##
==========================================
- Coverage 76.07% 76.01% -0.07%
==========================================
Files 138 138
Lines 12332 12351 +19
==========================================
+ Hits 9382 9388 +6
- Misses 2701 2713 +12
- Partials 249 250 +1
|
8618c0d
to
268a938
Compare
// Only set the Gateway's address if it has a condition of "Ready: true". | ||
var ready bool | ||
for _, cond := range o.Status.Conditions { | ||
if cond.Type == string(gatewayapi_v1alpha2.GatewayConditionReady) && cond.Status == metav1.ConditionTrue { | ||
ready = true | ||
break | ||
} | ||
} | ||
if !ready { | ||
s.Logger. | ||
WithField("name", o.Name). | ||
WithField("namespace", o.Namespace). | ||
Debug("Gateway is not ready, not setting address") | ||
return | ||
} | ||
|
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 can't remember why I originally included this logic here, but it creates an issue in the case where an address is requested in the Gateway spec, because the Gateway is then considered "Not Ready" until that address shows up in the status, which this would block. Tests seem OK without it so hoping its removal doesn't cause issues..
Now reading through all the threads in projectcontour/contour-operator#336 and realizing this implementation may be too simplistic in that it won't work for certain infrastructure providers. Leaving in draft while I do some more investigation.. |
fdf13e4
to
0005c41
Compare
After looking at those thread some more, I think this still makes sense as an initial implementation that will be useful for some but not all infrastructure providers. We'll also look to add support for setting annotations on the Envoy service which, when combined with this PR, should cover most use cases. |
Agreed with the approach, having some support is better than none. |
0005c41
to
fd9ff5c
Compare
Rebased this on #4448 to make use of the testing approach. |
Adds provisioner support for a single Gateway address of type IP or hostname. The value will be used for the Envoy service's spec.loadBalancerIP field. Updates projectcontour#4235. Signed-off-by: Steve Kriss <krisss@vmware.com>
Sets the Gateway's Ready condition to false with a reason of AddressNotAssigned if at lease one address has been requested, but no requested address has been assigned. Signed-off-by: Steve Kriss <krisss@vmware.com>
needs a rebase/merge but from first look looks pretty good |
fd9ff5c
to
05c7206
Compare
Adds provisioner support for a single
Gateway address of type IP or hostname.
The value will be used for the Envoy
service's spec.loadBalancerIP field.
Updates #4235.
Signed-off-by: Steve Kriss krisss@vmware.com