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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions chart/k8gb/templates/coredns-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ data:
errors
health
ready
loadbalance round_robin
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!

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!

}
}
{{- end }}
2 changes: 1 addition & 1 deletion chart/k8gb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ coredns:
# -- CoreDNS CRD plugin image
repository: absaoss/k8s_crd
# -- image tag
tag: v0.0.8
tag: v0.0.10
# -- Creates serviceAccount for coredns
serviceAccount:
create: true
Expand Down