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

Add dns capabilities for Windows CNI plugins #67435

Merged
merged 2 commits into from Nov 6, 2018

Conversation

feiskyer
Copy link
Member

What this PR does / why we need it:

This PR adds dns capabilities for Windows CNI plugins, so that Windows plugins could setup container's dns based on the capability.

// cniDNSConfig maps to the windows CNI dns Capability.
// Note that dns capability is only used for Windows containers.
type cniDNSConfig struct {
	// List of DNS servers of the cluster.
	Servers []string `json:"servers,omitempty"`
	// List of DNS search domains of the cluster.
	Searches []string `json:"searches,omitempty"`
	// List of DNS options.
	Options []string `json:"options,omitempty"`
}

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #66801 #66588 #65016

Special notes for your reviewer:

Windows CNI plugins should be updated with supporting dns capability.

See also #63905 (comment).

Release note:

Add dns capabilities for Windows CNI plugins:

"dns" {
  "servers": ["10.0.0.10"],
  "searches": ["default.svc.cluster.local","svc.cluster.local","cluster.local"],
  "options": []
}

/sig windows
/sig network

/assign @PatrickLang @madhanrm @dineshgovindasamy @dcbw

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Aug 15, 2018
@k8s-ci-robot k8s-ci-robot added sig/windows Categorizes an issue or PR as relevant to SIG Windows. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 15, 2018
@k8s-ci-robot
Copy link
Contributor

@feiskyer: GitHub didn't allow me to assign the following users: madhanrm, dineshgovindasamy.

Note that only kubernetes members and repo collaborators can be assigned.
For more information please see the contributor guide

In response to this:

What this PR does / why we need it:

This PR adds dns capabilities for Windows CNI plugins, so that Windows plugins could setup container's dns based on the capability.

// cniDNSConfig maps to the windows CNI dns Capability.
// Note that dns capability is only used for Windows containers.
type cniDNSConfig struct {
  // List of DNS servers of the cluster.
  Servers []string `json:"servers,omitempty"`
  // List of DNS search domains of the cluster.
  Searches []string `json:"searches,omitempty"`
  // List of DNS options.
  Options []string `json:"options,omitempty"`
}

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #66801 #66588 #65016

Special notes for your reviewer:

Windows CNI plugins should be updated with supporting dns capability.

See also #63905 (comment).

Release note:

Add dns capabilities for Windows CNI plugins:

"dns" {
 "servers": ["10.0.0.10"],
 "searches": ["default.svc.cluster.local","svc.cluster.local","cluster.local"],
 "options": []
}

/sig windows
/sig network

/assign @PatrickLang @madhanrm @dineshgovindasamy @dcbw

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added sig/network Categorizes an issue or PR as relevant to SIG Network. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 15, 2018
@feiskyer feiskyer requested review from derekwaynecarr and PatrickLang and removed request for freehan and sjpotter August 15, 2018 13:40
@feiskyer
Copy link
Member Author

/retest

@feiskyer
Copy link
Member Author

/milestone v1.12

@k8s-ci-robot k8s-ci-robot added this to the v1.12 milestone Aug 16, 2018
@feiskyer feiskyer added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. kind/feature Categorizes issue or PR as related to a new feature. labels Aug 16, 2018
@PatrickLang
Copy link
Contributor

@dineshgovindasamy or @madhanrm - can you do a review and update wincni?

@feiskyer
Copy link
Member Author

/test pull-kubernetes-e2e-kops-aws

@PatrickLang
Copy link
Contributor

/LGTM

@madhanrm any comments?

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 28, 2018
@madhanrm
Copy link
Contributor

lgtm

@feiskyer
Copy link
Member Author

@Random-Liu @dcbw Could you help to take a look at this PR?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 30, 2018
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 3, 2018
@feiskyer
Copy link
Member Author

feiskyer commented Nov 1, 2018

@freehan @anfernee Addressed comments, PTAL

@feiskyer
Copy link
Member Author

feiskyer commented Nov 1, 2018

/test pull-kubernetes-kubemark-e2e-gce-big

@@ -389,5 +403,17 @@ func (plugin *cniNetworkPlugin) buildCNIRuntimeConf(podName string, podNs string
// Set the PodCIDR
rt.CapabilityArgs["ipRanges"] = [][]cniIpRange{{{Subnet: plugin.podCidr}}}

// Set dns capability args.
if dnsOptions, ok := options["dns"]; ok {
Copy link
Member

Choose a reason for hiding this comment

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

options could be nil, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, ok will be false in that case

Copy link
Member

Choose a reason for hiding this comment

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

I thought it would panic. surprised it won't.

@nikopen
Copy link
Contributor

nikopen commented Nov 4, 2018

Looks good for approval @anfernee @freehan ?

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 4, 2018
@anfernee
Copy link
Member

anfernee commented Nov 5, 2018

we should have a better abstraction for windows/linux implementation to reconcile as @thockin pointed out. but it's not necessarily blocking this PR.
/lgtm

@anfernee
Copy link
Member

anfernee commented Nov 5, 2018

@dchen1107 @thockin to approve?

@dchen1107
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dchen1107, feiskyer

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 5, 2018
@PatrickLang
Copy link
Contributor

/test pull-kubernetes-e2e-kops-aws

@nikopen
Copy link
Contributor

nikopen commented Nov 6, 2018

/retest

@feiskyer
Copy link
Member Author

feiskyer commented Nov 6, 2018

@nikopen @dchen1107 @anfernee Thanks a lot for reviewing!

we should have a better abstraction for windows/linux implementation to reconcile as @thockin pointed out.

#60338 (comment) is tracking this. @anfernee Appreciate if you have other suggestions to make it better.

@feiskyer
Copy link
Member Author

feiskyer commented Nov 6, 2018

/retest

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/windows Categorizes an issue or PR as relevant to SIG Windows. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pod Dns Policy not implemented on Windows, leaves incomplete suffix list