Skip to content

Use Pod.Spec.Host instead of Pod.Status.HostIP for pod subresources #6985

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

Merged
merged 1 commit into from
Apr 21, 2015

Conversation

csrwng
Copy link
Contributor

@csrwng csrwng commented Apr 17, 2015

The Spec.Host is set when binding a pod to a node and will contain the
canonical host name of the node. The Status.HostIP may not be included
in the node's server TLS certificate.

The Spec.Host is set when binding a pod to a node and will contain the
canonical host name of the node. The Status.HostIP may not be included
in the node's server TLS certificate.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@csrwng
Copy link
Contributor Author

csrwng commented Apr 17, 2015

@smarterclayton ptal

@bgrant0607
Copy link
Member

NodeAddresses contains a list of hostname(s) and IP addresses (internal and public). Do we need an entry there or other field in Node that indicates the name/address used for the TLS cert? See also #6419.

cc @roberthbailey

@csrwng
Copy link
Contributor Author

csrwng commented Apr 17, 2015

@bgrant0607 I would think that at the very least the node name would be included in the TLS cert correct?

@roberthbailey
Copy link
Contributor

@csrwng You can provide any cert you want for the kubelet (in which case you can choose to include the node name or not, but I would think any sane deployment would want to include it) or if you get the default self signed cert (see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/cmd/kubelet/app/server.go#L249) we use the host name (possibly overridden by the command line flag) as the CN in the cert.

@roberthbailey
Copy link
Contributor

@cjcullen

CJ and I were talking this morning and we think that we don't want to rely on the node names being resolvable via DNS into IP addresses. An admin should be able to configure nodes with whatever name they want and the apiserver should still be able to connect to it. The node should also provide a resolvable name and/or reachable IP address to the apiserver when it registers.

@csrwng
Copy link
Contributor Author

csrwng commented Apr 17, 2015

cc @deads2k

@csrwng
Copy link
Contributor Author

csrwng commented Apr 17, 2015

@roberthbailey - should then the node have an additional field specifying which hosts or ips are accepted by its certificate?

@roberthbailey
Copy link
Contributor

I had actually proposed having the node give it's certificate to the master when it registered itself, but was convinced it was unnecessary. This would be a simple way of telling the master which hosts or ips are accepted though.

@bgrant0607
Copy link
Member

cc @erictune

@csrwng
Copy link
Contributor Author

csrwng commented Apr 20, 2015

@erictune - any comments? This change is simply to switch from using the node ip to the host name for a pod's subresources.

@roberthbailey
Copy link
Contributor

@csrwng A few of us talked this morning and I think I will end up adding a field to the NodeAddress that lets the apiserver know whether each address in the array is included in the node's TLS certificate. Then we can more intelligently pick which address to use to connect to a node.

@erictune
Copy link
Member

LGTM.

@roberthbailey any problem with this going in while you sort out the new NodeAddress fields?

@roberthbailey
Copy link
Contributor

Nope.

@smarterclayton
Copy link
Contributor

I see a LGTM - any other comments? Otherwise will merge.

@smarterclayton smarterclayton added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 21, 2015
@bgrant0607
Copy link
Member

Merging.

bgrant0607 added a commit that referenced this pull request Apr 21, 2015
Use Pod.Spec.Host instead of Pod.Status.HostIP for pod subresources
@bgrant0607 bgrant0607 merged commit cf523a2 into kubernetes:master Apr 21, 2015
csrwng added a commit to csrwng/origin that referenced this pull request Apr 23, 2015
…esources

Applies changes introduced in upstream pull request:
kubernetes/kubernetes#6985
csrwng added a commit to csrwng/origin that referenced this pull request Apr 27, 2015
…esources

Applies changes introduced in upstream pull request:
kubernetes/kubernetes#6985
csrwng added a commit to csrwng/origin that referenced this pull request Apr 29, 2015
…esources

Applies changes introduced in upstream pull request:
kubernetes/kubernetes#6985
csrwng added a commit to csrwng/origin that referenced this pull request Apr 30, 2015
…esources

Applies changes introduced in upstream pull request:
kubernetes/kubernetes#6985
@csrwng csrwng deleted the fix_pod_log_location branch July 28, 2015 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants