Repository navigation
KEYCLOAK-13580 Ingress Tests - #164
Conversation
cfad812 to
531e45a
Compare
9a44b13 to
d978d25
Compare
76b2d2a to
ebc79c6
Compare
| if err != nil { | ||
| return err | ||
| } | ||
| expectInternalURL := fmt.Sprintf("https://%s.%s.svc:%d", |
There was a problem hiding this comment.
This check is no longer necessary. Once we introduce other tests (for all other Pull Requests) we will be validating the InternalURL implicitly.
There was a problem hiding this comment.
Thank you @slaskawi. This will be really helpful for further testing of other CRDS. I added some comments into the code.
Also, there is one thing to consider, in order to run this locally with Minikube one needs to configure ingress addons/ etc/hosts and then create PVC from workaround file. Maybe we should extract these steps into a separate Makefile goal. And if possible it would be great to run it automatically as part of cluster/prepare in case minikube is detected (not sure how to do it though)
| expectInternalURL, keycloakCR.Status.InternalURL) | ||
|
|
||
| // Kubernetes case - Ingress is on | ||
| if _, ok := keycloakCR.Status.SecondaryResources["Ingress"]; ok { |
There was a problem hiding this comment.
If I understand this correctly we check here whether we are on Kubernetes or Openshift. Do we need it? Why don't we just send the request to InternalURL from status?
There was a problem hiding this comment.
That's a good point! Fixed.
There was a problem hiding this comment.
@slaskawi Seems like this is back again. Sorry, I missed it when I did my last review, I was just looking at changes regarding ingress resolution.
There was a problem hiding this comment.
Together with @mhajas we agreed this will be fixed in the refactoring PR.
ebc79c6 to
d91c4d4
Compare
@mhajas Adding this to Makefile is a bit limiting. Minikube is not that popular, as far as I know, other folks use RHPDS and K3s. I would leave it as is, and hopefully, Minikube folks will fix kubernetes/minikube#3129 soon. |
I see. Ok, this makes sense, thanks for the explanation. I added a suggestion in tests. We should be good to go after fixing. |
d91c4d4 to
f66a4c5
Compare
There was a problem hiding this comment.
@slaskawi thank you for all fixes. The PR looks good to me. However, do you have any idea why Travis wasn't triggered? I would like to see it green before merging because for me updating /etc/resolv.conf didn't work, I probably need to configure it differently on Fedora. Updating /etc/hosts worked.
|
@mhajas It has and it failed: https://travis-ci.org/github/keycloak/keycloak-operator/builds/679987098 I'll try to look into it in the afternoon or tomorrow morning (have a bunch of emails to respond to). |
|
@mhajas I tried pretty hard to get this working with DNS Resolver but failed. Modifying So I decided to fall back to using |
f66a4c5 to
79bf509
Compare
There was a problem hiding this comment.
Well, what a pity. The DNS solution would be very pretty. However, for now /etc/hosts is enough. We need to make some decent test coverage asap so we can productize. Once we will want to make our tests parallel, we will probably need to revisit this as we will need more ingresses at once. We can discuss this on tomorrow's call as well, but for now, I will approve.
|
@slaskawi Sorry this query might not be linked to this PR but since this repo hasn't enabled issues, I ll post it anyways . Today the "keycloak" CR uses single service ingress implementation and doesn't provide any way to configure ingress hostname, tls configurations or annotations necessary for using it with any other ingress controller. Will this support be enabled in future or ? |
|
@mhajas The build was successful: https://travis-ci.org/github/keycloak/keycloak-operator/builds/680046358 |
@vinay2107 Thanks for the interest in this! At the moment, the Operator do not reconcile the Host part of the Ingress. You can modify it to anything you need. As for TLS Settings, it's on our radar and we track it in KEYCLOAK-12307. We also had some implementation proposals (#104), however we had to reject them as the solution need to work in both - Kubernetes and OpenShift (so on both Routes and Ingresses). Perhaps you would be interested in donating us an implementation? |
JIRA ID
KEYCLOAK-13580
Additional Information
This Pull Request fixes Ingress with TLS support and tests it in the e2e tests.
Verification Steps
Checklist:
Additional Notes