-
Notifications
You must be signed in to change notification settings - Fork 81
Use of the kubeless http trigger instead of a custom created ingress #206
Conversation
Thanks @faxioman, I will review this shortly. It also seems that the CI is failing in the test that creates the ingress/http trigger:
We probably need to update that, I will let you know once I have more info. |
Thanks @andresmgot. I was checking the failing integration test ... I could check it out. Does that work for you? |
sure, that'd be great |
Ok, I also need to patch the get-info.js module. |
@andresmgot I made some fixes and now all the integration tests are passing. |
|
||
|
||
// Mock call to get.ingress | ||
_.each(functions, f => { |
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 believe this the cause of the issue you are facing with the test. This is just a mock that returns the ingress if requested, why did you remove it?
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 removed it because the ingress is now created by kubeless ... so I think the serverless-kubeless plugin is no more responsible for the ingress creation. Right?
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 mean, the kubeless plugin is unaware of the ingress created by kubeless.
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.
yeah, well, the result at the end of the day is the same. An Ingress with the name of the function is created so that's what this mock is doing.
If you want to remove this, you need to create the mock to return the HTTP trigger instead and change the getInfo
code to request the HTTP trigger instead. I think that is more complicated to do so, that's why I suggest to just leave this as it was but if you want to run the extra mile and adapt that code, that's also fine ;)
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.
Ok ;)
We'll catch later.
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.
“Later” is the new “next week” 😏 Sorry For the delay @andresmgot. I will work on this pr next monday.
@andresmgot now the getInfo method is based on the created http trigger. |
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.
Great job @faxioman! Can you bump the version of the package so this gets released? It's a feature release so let's use 0.10.0. Thank you!
I see an error in travis log ... but I think is unrelated to my changes
It's indeed unrelated.
'basic-auth-secret': options.ingress.basicAuthSecretName || '', | ||
'cors-enable': options.ingress.cors || false, | ||
'function-name': name, | ||
gateway: options.ingress.class || 'nginx', // not working: https://github.com/kubeless/kubeless/issues/1124 |
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.
the comment is incorrect, right? it now works with these changes?
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.
Unfortunately no. The gateway option is ignored by the kubeless controller, as reported in this issue: vmware-archive/kubeless#1124
I added the gateway option so when the fix will be relased it will works as expected but until then, I added a workaround that adds the ingress class annotation.
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.
ah, right, that was an issue in the controller
@andresmgot version bumped |
This pull request enables the support for the Kubeless http trigger.
The code related to the creation/deletion of a custom ingress is removed.
All the options of the previous release of the serverless-kubeless plugin are preserved with this exceptions:
This pull request includes a workaround for the issue vmware-archive/kubeless#1124