Skip to content
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

feat: Ingress replica CRD #268

Merged
merged 5 commits into from
Sep 23, 2024
Merged

feat: Ingress replica CRD #268

merged 5 commits into from
Sep 23, 2024

Conversation

zreigz
Copy link
Member

@zreigz zreigz commented Sep 16, 2024

No description provided.

@zreigz zreigz changed the title Ingress replica CRD feat: Ingress replica CRD Sep 16, 2024
Status Status `json:"status,omitempty"`
}

type IngressReplicaSpec struct {
Copy link
Member

Choose a reason for hiding this comment

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

We should also support overriding ingress class here

Copy link
Member Author

Choose a reason for hiding this comment

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

done

return newIngress
}

func updateIngress(ingressReplica *v1alpha1.IngressReplica, newIngress *networkv1.Ingress, oldIngress *networkv1.Ingress) {
Copy link
Member

Choose a reason for hiding this comment

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

I think we should have some mechanism to merge in new annotations. I'm on the fence as to whether we should simply take any annotation from the ingress replica itself and override the annotations on the old ingress or have an attribute on the spec. Sort of leaning towards the first option.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have used lo.Assign method which merges multiple maps from left to right.

newIngress.Annotations = lo.Assign(newIngress.Annotations, oldIngress.Annotations, ingressReplica.Annotations)

@zreigz
Copy link
Member Author

zreigz commented Sep 17, 2024

@michaeljguarino PTAL

@zreigz zreigz merged commit 6dd51d2 into main Sep 23, 2024
32 of 33 checks passed
@zreigz zreigz deleted the ingress-replica branch September 23, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants