-
Notifications
You must be signed in to change notification settings - Fork 34
Conversation
api/v1alpha1/contour_types.go
Outdated
@@ -89,6 +96,49 @@ type NamespaceSpec struct { | |||
RemoveOnDeletion bool `json:"removeOnDeletion,omitempty"` | |||
} | |||
|
|||
// EndpointPublishing defines the schema to publish network endpoints and represents | |||
// the publishing type. | |||
type EndpointPublishing struct { |
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.
In the future, fields will be added to support config knobs for the different endpoint publishing types. EndpointPublishing
will become a union type and Type
will be the union discriminator.
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.
Approving, since this seems like a very reasonable API to me. Not merging yet, since I think the EndpointPublishing
nomenclature is confusing and I'd like to give people a chance to suggest alternatives.
@jpeach during yesterday's community meeting we discussed whether it's necessary to manage the network endpoints of Contour. @stevesloka provided a use-case where Contour runs in a separate cluster from the managed Envoys, but we agreed that's not applicable since each cluster would run contour-operator. If Contour network endpoint publishing is not required today, should this API be designed to support the use case in the future. For example: Current
Here is an example of an API that can support Envoy (
Here is an example of an API that abstracts the control and data planes at
I anticipate future data-plane and control-plane specific requirements that the API will need to support. I'm beginning to think it makes sense to separate data/control planes at spec. All other spec-level fields will be applicable to both the control and data planes. Thoughts? cc: @stevesloka @skriss @Miciah |
I created this sheet to get input from the community for naming the API. |
type EndpointPublishing struct { | ||
// Type is the type of publishing strategy to use. Valid values are: | ||
// | ||
// * LoadBalancerService |
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: Should we drop Service
from these names and just call them LoadBalancer
, or NodePort
to match Kubernetes?
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.
@stevesloka as I mention in #151 (comment), future types may not use a k8s Service
resource. I thought it made sense to use types that are backed by a k8s service to include "Service" in the name. Take LoadBalancerService
for example, what if a future LoadBalancer
type is added that creates a hardware load balancer outside the k8s cluster?
api/v1alpha1/contour_types.go
Outdated
LoadBalancerServiceStrategyType EndpointPublishingType = "LoadBalancerService" | ||
|
||
// NodePortService publishes an endpoint using a Kubernetes NodePort Service. | ||
NodePortServiceStrategyType EndpointPublishingType = "NodePortService" |
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.
Maybe add ClusterIP
for those who might need an internal ingress controller not exposed outside the cluster?
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.
@stevesloka I agree that ClusterIP
or ClusterIPService
will be a supported type. I would like to keep the initial API represented in this PR as minimal as possible and add types as needed. To provide parity with Contour's rendered manifest, this initial API needs to only support LoadBalancerService
and NodePortService
.
@jpeach @stevesloka although a k8s |
@stevesloka @jpeach @Miciah commit A Default Contour
A Contour with a NodePort Service
A Contour with Non-Standard Container Ports
|
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'm in a similar boat to @jpeach on this one. I think the API itself looks great, but suggest that we reuse the Service APIs naming and go with GatewayPublishing
instead.
I can certainly be talked out of that, but I think we're heading that way anyway, so let's just call it the same thing.
f856831
to
8ce6db6
Compare
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 think this looks good now pending any other comments (I know there's been a bunch of questions back & forth). =)
Per #171, |
Per projectcontour/contour#3263, commit |
c93f10a
to
93907f9
Compare
// Possible values are "External" and "Internal". | ||
// | ||
// +kubebuilder:default=External | ||
Scope LoadBalancerScope `json:"scope,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.
Is the operator going to take on specific implementations (e.g. https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer).
If the goal isn't to take those on then possibly a new ProviderSetting
(or something) are a better spot to allow users to define those specific exceptions. We might need both to cover anyone who might need specific annotations but aren't yet supported in the operator.
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.
@stevesloka yes, the operator will support provider-specific LB settings through ProviderParameters
, i.e. LB connection tuning. All the major cloud providers support internal/external LB scoping, so I think it's appropriate to define scope outside ProviderParameters
.
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.
Just one small question and it looks great to me! Thanks for the work on this @danehans! 🎉
I think we should just implement it at this point and see how things shake out while we're still in alpha/beta versions.
// | ||
LoadBalancer LoadBalancerStrategy `json:"loadBalancer,omitempty"` | ||
|
||
// ContainerPorts is a list of container ports to expose from the Envoy container(s). |
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.
@youngnick @stevesloka @skriss do you agree that at least 2 ContainerPorts
must be defined to support Envoy's insecure and secure services? I'm unsure if it's possible or if a use-case exists to run the insecure/secure services on the same container port. Do you agree that 6 container ports is an appropriate maximum?
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 think those are totally acceptable numbers for now. We can change this later.
a55be73
to
7de12b9
Compare
Signed-off-by: Daneyon Hansen <daneyonhansen@gmail.com>
Signed-off-by: Daneyon Hansen <daneyonhansen@gmail.com>
Signed-off-by: Daneyon Hansen <daneyonhansen@gmail.com>
Signed-off-by: Daneyon Hansen <daneyonhansen@gmail.com>
Commit |
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.
nothing to add here, LGTM
Updates the
Contour
API type to support network endpoint management.Note: The API design supports managing Envoy network endpoints with the ability to add Contour network endpoints in the future.
Fixes: #70
Signed-off-by: Daneyon Hansen daneyonhansen@gmail.com