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

Avoid transitive dependency on github.com/miekg/dns in policy API #16806

Merged
merged 2 commits into from
Jul 15, 2021

Conversation

tklauser
Copy link
Member

@tklauser tklauser commented Jul 6, 2021

Introduce a new helper package duplicating IsFqdn and Fqdn from the github.com/miekg/dns to avoid transitively depending on that package in out-of-tree users of the policy API, namely github.com/cilium/cilium-cli. This will e.g. allow to fix cilium/cilium-cli#231.

See individual commits for details.

@tklauser tklauser added the release-note/misc This PR makes changes that have no direct user impact. label Jul 6, 2021
@tklauser tklauser requested review from jrajahalme and a team July 6, 2021 13:15
@tklauser tklauser requested a review from a team as a code owner July 6, 2021 13:15
@tklauser
Copy link
Member Author

tklauser commented Jul 6, 2021

test-me-please

@jrajahalme
Copy link
Member

timing out ci-gke should be fixed by #16819

@jrajahalme
Copy link
Member

Opened a new CI issue for the test-1.20-4.19 fail: #16838, assigned @pchaigno.

@tklauser
Copy link
Member Author

tklauser commented Jul 9, 2021

Rebased to pick up fixes for the failing CI 3.0 tests.

@tklauser
Copy link
Member Author

tklauser commented Jul 9, 2021

test-me-please

pkg/fqdn/dns/dns.go Show resolved Hide resolved
Copy link
Member

@borkmann borkmann left a comment

Choose a reason for hiding this comment

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

(aside from @nathanjsweet's feedback, ack)

@tklauser
Copy link
Member Author

test-me-please

@tklauser
Copy link
Member Author

test-me-please

The github.com/cilium/cilium/pkg/fqdn/dns duplicates the IsFqdn and Fqdn
functions from github.com/miekg/dns. This allows to avoid a transitive
dependency on the latter package for users of the policy API, namely
github.com/cilium/cilium-cli.

While at it, rename the functions such that they conform to the Go
naming standard and also make func FQDN return a lowercase string, as
expected by all callers in Cilium code.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
…kage

Avoid pulling in github.com/miekg/dns as a transitive dependency for
out-of-tree users of the Cilium API, namely
github.com/cilium/cilium-cli.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
@tklauser
Copy link
Member Author

tklauser commented Jul 14, 2021

test-me-please

Rebased to pull in the fix for #16632

@tklauser tklauser added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jul 14, 2021
@nebril nebril merged commit 77b4d3e into cilium:master Jul 15, 2021
@tklauser tklauser deleted the pr/dns-break-dependency branch July 15, 2021 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Windows executable to built artifacts
7 participants