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

Consume coredns crd plugin with WRR functionality #1141

Merged
merged 2 commits into from
Apr 20, 2023

Conversation

ytsarev
Copy link
Member

@ytsarev ytsarev commented Apr 18, 2023

No description provided.

k0da
k0da previously approved these changes Apr 18, 2023
Copy link
Collaborator

@k0da k0da left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@kuritka kuritka left a comment

Choose a reason for hiding this comment

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

seems terratests fails, requires investigation.

@ytsarev
Copy link
Member Author

ytsarev commented Apr 19, 2023

@kuritka can be related to WRR in action https://github.com/k8gb-io/k8gb/blob/master/terratest/examples/roundrobin_weight1.yaml#L39-L44 ? I assume that before this example was never properly evaluated by terratest with older k8s_crd plugin

@kuritka
Copy link
Collaborator

kuritka commented Apr 19, 2023

@ytsarev , hi, probably. need to check terratests locally.

@@ -18,6 +18,7 @@ data:
resources DNSEndpoint
filter k8gb.absa.oss/dnstype=local
negttl {{ .Values.k8gb.dnsZoneNegTTL }}
loadbalance weight
Copy link
Collaborator

Choose a reason for hiding this comment

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

isn't it hardcoding particular method?

Copy link
Member Author

Choose a reason for hiding this comment

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

Would be great to get confirmation from @kuritka , but if I understand correctly it does standard round-robin if no WRR in Gslb spec, see k8gb-io/coredns-crd-plugin#45

Copy link
Collaborator

@kuritka kuritka Apr 20, 2023

Choose a reason for hiding this comment

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

Hi @ytsarev, RR is only a subset of WRR. If weights are not defined , the RR is automatically applied. If weights are defined in CR, the WRR is used. If an error occurs for any reason, then the RR is used automatically. tahts what loadbalance weight does.

The reason why I defines this field is for extendability. I was planning that in the future there will be a loadbalance consistent for consistent hashing etc.

Copy link
Member Author

Choose a reason for hiding this comment

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

Perfect, thank you!

prometheus 0.0.0.0:9153
forward . /etc/resolv.conf
k8s_crd {
resources DNSEndpoint
Copy link
Member Author

@ytsarev ytsarev Apr 19, 2023

Choose a reason for hiding this comment

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

@kuritka it's not immediately clear from k8gb-io/coredns-crd-plugin#45 - why do we need to remove this config line?

Copy link
Collaborator

Choose a reason for hiding this comment

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

resources DNSEndpoint field was meaningless, we didn't work with it in any way.

Copy link
Member Author

Choose a reason for hiding this comment

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

@kuritka cool, I was mostly wondering why it actually breaking the terratest, but cool to get rid of it any case, thanks!

@ytsarev ytsarev requested a review from kuritka April 20, 2023 08:05
Copy link
Collaborator

@kuritka kuritka left a comment

Choose a reason for hiding this comment

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

lgtm

@ytsarev ytsarev merged commit 57d0da5 into k8gb-io:master Apr 20, 2023
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.

3 participants