-
Notifications
You must be signed in to change notification settings - Fork 202
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
libnetwork, Network: add field NetworkDNSServers
for network scoped dns
#1237
libnetwork, Network: add field NetworkDNSServers
for network scoped dns
#1237
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this field can only be set on network create you should validate it there.
a) make sure it only contains ips
b) it is only set when DNSEnabled is true
c) in the cni backend it should error out since we will not support it there.
And then don't forget to add tests for it.
@Luap99 Did you mean validations in |
Validation should always be done in the backend in libnetwork. |
@Luap99 SGTM. One note though some of the validation and parse checks are being made at frontend like https://github.com/containers/podman/blob/main/cmd/podman/networks/create.go#L137 maybe we should move these to backend later on then for consistency. |
If you look at the Network format struct these checks only make sense in the frontend. It is impossible to set a gateway without subnet in the type so the cli has to validate the flags. |
d022f31
to
6fe9da5
Compare
6fe9da5
to
2089001
Compare
2089001
to
72e6d51
Compare
libnetwork must allow to pass network_dns_servers so aardvark and netavark can consume it and enabled network scoped dns. Feature implemented at netavark and aardvark end * Netavark: containers/netavark#497 Signed-off-by: Aditya R <arajan@redhat.com>
72e6d51
to
0d903e3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I guess we want the nv/av PRs to merge first?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@Luap99 Upto you and maintainers but I think this can go in as-is cause this PR is not blocked on |
/lgtm |
Once Upstream |
We enforced NetworkDNSServers to be IP addresses and we follow this enfore rule while a user is creating network, see comment containers#1237 (review) and PR containers#1237 Following check was missed in `NetworkUpdateOptions` hence add this check now. Signed-off-by: Aditya R <arajan@redhat.com>
We enforced NetworkDNSServers to be IP addresses and we follow this enfore rule while a user is creating network, see comment containers#1237 (review) and PR containers#1237 Following check was missed in `NetworkUpdateOptions` hence add this check now. Signed-off-by: Aditya R <arajan@redhat.com>
We enforced NetworkDNSServers to be IP addresses and we follow this enfore rule while a user is creating network, see comment containers#1237 (review) and PR containers#1237 Following check was missed in `NetworkUpdateOptions` hence add this check now. Backport of: containers#1358 Signed-off-by: Aditya R <arajan@redhat.com>
libnetwork must allow to pass network_dns_servers so aardvark and netavark can consume it and enabled network scoped dns.
Feature implemented at netavark and aardvark end
network_dns_servers
netavark#497