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

Promote Pod Hostname & Subdomain to fields (were annotations) #24362

Merged
merged 1 commit into from
Apr 29, 2016

Conversation

ArtfulCoder
Copy link
Contributor

@ArtfulCoder ArtfulCoder commented Apr 15, 2016

Deprecating the podHostName, subdomain and PodHostnames annotations and created corresponding new fields for them on PodSpec and Endpoints types.

Annotation doc: #22564
Annotation code: #20688

@k8s-github-robot k8s-github-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note-label-needed labels Apr 15, 2016
@@ -1225,6 +1225,10 @@ type PodSpec struct {
// If specified, these secrets will be passed to individual puller implementations for them to use. For example,
// in the case of docker, only DockerConfig type secrets are honored.
ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty"`
// Specifies the hostname of the Pod
Copy link
Member

Choose a reason for hiding this comment

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

. If not provided the pod's hostname will be set to a system-defined value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@k8s-github-robot k8s-github-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 20, 2016
@thockin
Copy link
Member

thockin commented Apr 20, 2016

Re-titleing for release note

@thockin thockin changed the title Hostname, Subdomain, PodHostnames fields added as optional on PodSpec (and Endpoints) Promote Pod Hostname & Subdomain to fields (were annotations) Apr 20, 2016
@@ -47,7 +47,7 @@ spec:
- name: etcd-storage
mountPath: /var/etcd/data
- name: kube2sky
image: gcr.io/google_containers/kube2sky:1.14
image: artfulcoder/kube2sky-amd64:1.16
Copy link
Member

Choose a reason for hiding this comment

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

don't forget this

@thockin
Copy link
Member

thockin commented Apr 20, 2016

Also add a TODO at the definitions of the old annotations to remove them after v1.3 is released.

@thockin
Copy link
Member

thockin commented Apr 20, 2016

Mostly pretty minor issues. Yay!

@thockin thockin added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Apr 20, 2016
@thockin
Copy link
Member

thockin commented Apr 20, 2016

We need corresponding docs on this. Both the DNS related docs and the pod-related docs.

@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 28, 2016
@ArtfulCoder ArtfulCoder added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 28, 2016
@rhcarvalho
Copy link
Contributor

@ArtfulCoder sorry if this is in the docs, I couldn't find it.
What would be the behavior when scaling up an RC when the pod template includes the hostname field?

The docs talk about a hostname foo in a subdomain bar can be accessed via foo.bar...etc, but what if there are 2+ replicas of the same pod?

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 28, 2016
@ArtfulCoder ArtfulCoder added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 28, 2016
@k8s-github-robot
Copy link

@ArtfulCoder
You must link to the test flake issue which caused you to request this manual re-test.
Re-test requests should be in the form of: k8s-bot test this issue: #<number>
Here is the list of open test flakes.

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 28, 2016
@ArtfulCoder ArtfulCoder added lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. labels Apr 28, 2016
@k8s-github-robot
Copy link

@ArtfulCoder
You must link to the test flake issue which caused you to request this manual re-test.
Re-test requests should be in the form of: k8s-bot test this issue: #<number>
Here is the list of open test flakes.

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 28, 2016
@thockin
Copy link
Member

thockin commented Apr 28, 2016

Great point - docs pls.
On Apr 28, 2016 5:32 AM, "Rodolfo Carvalho" notifications@github.com
wrote:

@ArtfulCoder https://github.com/ArtfulCoder sorry if this is in the
docs, I couldn't find it.
What would be the behavior when scaling up an RC when the pod template
includes the hostname field?

The docs talk about a hostname foo in a subdomain bar can be accessed via
foo.bar...etc, but what if there are 2+ replicas of the same pod?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#24362 (comment)

@ArtfulCoder ArtfulCoder added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 28, 2016
@k8s-bot
Copy link

k8s-bot commented Apr 29, 2016

GCE e2e build/test passed for commit 8a3ed48.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Apr 29, 2016

GCE e2e build/test passed for commit 8a3ed48.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit ad67363 into kubernetes:master Apr 29, 2016
@rhcarvalho
Copy link
Contributor

Great point - docs pls.

@ArtfulCoder @thockin I didn't find any mention to the case when the number of replicas of a pod >1 in the code that got merged. I expected it somewhere in cluster/addons/dns/README.md.

Are the docs coming in a follow up? Could you please share a link? Thanks!

@ArtfulCoder
Copy link
Contributor Author

@rhcarvalho , for the case of replicas of a pod > 1, we are planning to introduce petsets, that will have some form of templatization for hostname field.
@bprashanth to elaborate further since he is working on petsets.

@rhcarvalho
Copy link
Contributor

@ArtfulCoder thanks for the reply. Currently, is it an error to specify a hostname and scale to 2+ replicas? What would the FQDN "foo.bar.my-namespace.svc.cluster.local" point to in the documented example?

I'm following the PetSets PR (#18016), though I thought that was focused on persistent volumes.

I'd like to have both scalable persistent storage and pod addressability by hostname to support MongoDB replica sets with persistent storage.

@ArtfulCoder
Copy link
Contributor Author

@rhcarvalho If multiple pods have the same hostname, it is not an error.
You should ideally get back multiple A records. The way I have it right now, causes only one A record to be returned. I will change that behavior to return multiple A records.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

6 participants