Skip to content

Conversation

@barkhachoithani
Copy link
Collaborator

No description provided.

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 {
Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

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"`
Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

ingressSpec := networkingv1.IngressSpec{
IngressClassName: &cr.Spec.Ingress.IngressClassName,
Rules: ingressRules,
TLS: []networkingv1.IngressTLS{
Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@barkhachoithani barkhachoithani merged commit 8b51be4 into marklogic:develop Oct 31, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants