serverless / serverless-kubeless

This plugin enables support for Kubeless within the Serverless Framework.
Apache License 2.0
303 stars 80 forks source link

Allow setting a custom ingress controller #128

Closed SomeoneWeird closed 6 years ago

SomeoneWeird commented 6 years ago

Adds super basic support for setting the ingress controller used to something other than nginx (we're using traefik)

This was discussed a little in #114.

andresmgot commented 6 years ago

Hi @SomeoneWeird, I think it's time to change the current approach of how we deploy ingress objects. Kubeless support other types like traefik or kong but this plugin is not taking advantage of that. We should deploy a HTTPTrigger the same way we do for example with CronJobTriggers (https://github.com/serverless/serverless-kubeless/blob/247649e719d3f828a552a7fd3a6da4f837bff504/lib/deploy.js#L349).

A Kubeless HTTPTrigger has other benefits like the ability to setup basic authentication or TLS for the ingress object. You can see the spec here: https://github.com/kubeless/kubeless/blob/master/pkg/apis/kubeless/v1beta1/http_trigger.go#L34.

If you can provide a PR with that change it will be great.

SomeoneWeird commented 6 years ago

Honestly I'm not sure how much time I'm going to have over the next couple weeks - going away on holiday. May have to wait until then.

andresmgot commented 6 years ago

No problem @SomeoneWeird, thanks for giving it a try.

SomeoneWeird commented 6 years ago

If this is not going to be merged we'll probably end up using a fork until native support is added 👍

sebgoa commented 6 years ago

@SomeoneWeird why did you close it ?

@andresmgot I am fine merging this and making a new release of the plugin, we can then open an issue to improve and abstract the http trigger creation

SomeoneWeird commented 6 years ago

I figured this wasn't going to be merged, happy to reopen if you want to merge in and then iterate on a better solution for the future.

andresmgot commented 6 years ago

I don't think we are going to be able to spend the time of properly use httptriggers in the very near future so I am okay to merge this. You just need to fix the linter:

/home/travis/build/serverless/serverless-kubeless/lib/ingress.js
  33:21  error  Missing trailing comma  comma-dangle
✖ 1 problem (1 error, 0 warnings)
SomeoneWeird commented 6 years ago

Fixed :)

andresmgot commented 6 years ago

thanks