-
Notifications
You must be signed in to change notification settings - Fork 4
MLE-11468: Implementation and unit test for Ingress #36
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
MLE-11468: Implementation and unit test for Ingress #36
Conversation
| func generateIngressDef(ingressMeta metav1.ObjectMeta, ownerRef metav1.OwnerReference, cr *databasev1alpha1.MarklogicCluster) *networkingv1.Ingress { | ||
| pathType := networkingv1.PathTypePrefix | ||
| var ingressRules []networkingv1.IngressRule | ||
| for _, appServer := range cr.Spec.HAProxy.AppServers { |
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 Logic Here does not seems correct to me.
According to your code, if a path is not 8000, 8001, 8002, it will go to additional port.
However, there could be 0 additional port, and have another path like /datahub for 8010 in the same host.
We need to discuss more about how Ingress and HAProxy rule could work together. And what the role of Additional Host plays here.
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.
fixed
api/v1alpha1/common_types.go
Outdated
| Labels map[string]string `json:"labels,omitempty"` | ||
| Annotations map[string]string `json:"annotations,omitempty"` | ||
| Host string `json:"host,omitempty"` | ||
| Tls networkingv1.IngressTLS `json:"tls,omitempty"` |
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.
Tls for Ingress is optional, so the type should be *networkingv1.IngressTLS.
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.
fixed
pkg/k8sutil/ingress.go
Outdated
| ingressSpec := networkingv1.IngressSpec{ | ||
| IngressClassName: &cr.Spec.Ingress.IngressClassName, | ||
| Rules: ingressRules, | ||
| TLS: []networkingv1.IngressTLS{ |
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.
TLS for Ingress Should be optional.
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.
fixed
No description provided.