-
Notifications
You must be signed in to change notification settings - Fork 34
Add ability to add service annotations (towards metallb static ip support) #448
Comments
Thanks for this issue @jberger. It sounds like you want to be able to specify the That seems like a reasonable knob to expose in Contour, with the obvious caveat that if your cloud provider / load balancer provider doesn't match up, then it won't work, and it may be tricky for the operator to tell you what happened. |
Yep, that's all I'm asking. Thanks :) Obviously caveats about provider exist, but the same is true of say PV storage classes etc, you can't select things that aren't possible with your provider, so I think that's consistent. |
The implementation caveat I need to give you is that we are the process of changing how Contour and the Operator fit together, so this may end up held up behind the "Contour manages the Envoy Service" work. But I definitely agree we should do it. |
As a side note, there is also a need to be able to pass arbitrary annotations like |
I'm running contour-operator alongside MetalLB and it would be really great to have that option. In particular I'm interested in passing As proposed by @jberger, it would also be nice to have the ability to specify an IP manually. However, I'm not sure about |
That change must have been made just around the time I opened this ticket. By all means, yes, update the ticket to reflect that change upstream. Actually I would hope that having a CRD field to set service annotations should make the change to contour simpler since that doesn't have a sort of two-way action like a spec field would. Indeed without reading that deprecation ticket I imagine that's what their motivation is too. |
Perhaps it already is possible? https://github.com/projectcontour/contour-operator/blob/main/config/crd/contour/01-crds.yaml#L972-L977 |
Hey @jberger, what you're seeing there is for the (as yet unreleased) Gateway provisioner, which you can think of as a revamp of the Operator that provisions Contour + Envoy instances based on the Gateway API As far as requesting a static IP for metallb, you actually have 2 different options:
This section of docs describes how to customize your provisioned Contour instances, which is where you'd be able to specify those service annotations. Essentially you'd want something like: kind: GatewayClass
apiVersion: gateway.networking.k8s.io/v1alpha2
metadata:
name: contour-with-envoy-service-annotations
spec:
controllerName: projectcontour.io/gateway-controller
parametersRef:
kind: ContourDeployment
group: projectcontour.io
name: contour-with-envoy-service-annotations-params
namespace: projectcontour
---
kind: ContourDeployment
apiVersion: projectcontour.io/v1alpha1
metadata:
namespace: projectcontour
name: contour-with-envoy-service-annotations-params
spec:
envoy:
networkPublishing:
serviceAnnotations:
metallb.universe.tf/address-pool: production-public-ips And then you'd create a It's worth noting that you can still use Ingress or HTTPProxy for routing, even if you use the Gateway provisioner / Final disclaimer - the Gateway provisioner is new, is alpha, and can be expected to have bugs and shortcomings. But if you are interested in testing it out, any/all feedback is welcome! |
I will be doing so in the upcoming days. I'm deploying a kafka cluster via the banzaicloud operator and it can only do inbound traffic via envoy or istio so I was going to try using contour for it but I remembered this issue from back when I was just playing around with contour for something else and thought I'd check in. Thanks for the reply, I'll let you know how it goes. https://banzaicloud.com/docs/supertubes/kafka-operator/external-listener/ |
In a previous issue support was added for consuming a loadBalancerIP based on the cloud provider's APIs. While that serves a purpose it is not a generic solution; loadBalancerIP isn't always an output, sometimes it is a useful input. Especially for on-prem loadBalancerIP can be used directly to inform loadbalancer operators like MetalLB what IP addresses should be used. As such having some annotation on the Counter manifest would be much appreciated.
The text was updated successfully, but these errors were encountered: