IBM/varnish-operator

Add value to specify nodePort

Closed this issue · 9 comments

uqix commented
Add value to specify nodePort
cin commented

I'm not sure exactly what you're asking. We support using a nodePort service type to front the varnish pods if that's to what you're referring. You can set the service.type as described here. You can specify the port as well.

uqix commented

image

Sorry for not being clear, I mean after setting service.type to NodePort we need to specify the port like 30000 instead of randomly(32124) allocated by k8s.

cin commented

No worries @uqix. Is the service.port config not working? We may have a bug. @tomashibm maybe you will be able to get to this before I will. If not, np I'll take a look when I can. Thanks!

uqix commented

My config:

  service:
    type: NodePort
    port: 80
    # nodePort: 30000

I think service.port is bound to clusterIP, maybe a separate option is needed?

See what you mean @uqix . @cin not a bug, just a config we need to expose. I guess @uqix you're hitting your k8s nodes directly from outside and that's why you need control over which port you open there for Varnish, right?

Besides nodeport for Varnish do you also need the same for the metrics port?

uqix commented

@tomashibm exactly as you said,

  • first we allocate nodePorts manually to avoid conflicts, so better support specifying nodePort for all three ports(varnish/controller/metric)
  • second we use nodePort for external cloud LB

thanks

@uqix which k8s version you're running on? we want to include a change that drops support for k8s 1.20<=. If you're using and older we'll do separate releases for these two changes

uqix commented

We use v1.24, thanks

released in the latest version @uqix