-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes #1568 #2225 #2458
fixes #1568 #2225 #2458
Conversation
if spec.IngressClassName is not specified in CRD, then this will query kubernetes API for getting list of IngressClasses and look for if any default IngressClass is available, if present the it attach that IngressClass to networkingv1.IngressSpec of jaegerIngress and if not available then it check for nginx ingress controller and attach that and if nothing is avalable then it do nothing. Signed-off-by: Gaurav Singh <[email protected]>
Hi @antoniomerlin. Thanks for your PR. I'm waiting for a jaegertracing member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
pkg/ingress/query.go
Outdated
if err == nil { | ||
clientSet, err := kubernetes.NewForConfig(config) | ||
if err == nil { | ||
ingressList, err := clientSet.NetworkingV1().IngressClasses().List(context.Background(), metav1.ListOptions{}) | ||
if err == nil { | ||
for _, ingress := range ingressList.Items { | ||
if ingress.Name == "nginx" { | ||
nginxIngressAvailable = true | ||
} | ||
for k, v := range ingress.Annotations { | ||
if k == "ingressclass.kubernetes.io/is-default-class" { | ||
if v == "true" { | ||
class = ingress.Name | ||
break | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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.
Please, instead of this, create a new method and call it from here. It will help readability. Also, instead of checking there are no errors, check if there is an error and return if true
.
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.
Please, add a test.
Hi, thanks for reviewing, i've modified the changes just a query you already having test mentioning this scenario :-
|
…of statement in a function
Please, fix the DCO |
Which problem is this PR solving?
Description of the changes
How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test