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

fix service spec for kube api server #41115

Merged
merged 1 commit into from
Feb 14, 2017

Conversation

rajatchopra
Copy link
Contributor

@rajatchopra rajatchopra commented Feb 8, 2017

For the auto generated kube api-server service, the service spec re-uses the service port itself. The endpoint is created correctly using public port. Fix the service also because there are some plugin controllers that react to service spec itself.

Before fix:

sh-4.2# kubectl get endpoints
NAME         ENDPOINTS                                         AGE
kubernetes   172.17.0.2:8443,172.17.0.2:8053,172.17.0.2:8053   20h

sh-4.2# kubectl get services kubernetes -o json
...
...
        "spec": {
                "clusterIP": "172.30.0.1",
                "ports": [
                    {
                        "name": "https",
                        "port": 443,
                        "protocol": "TCP",
                        "targetPort": 443     ## <--- same as port, even if the endpoint really means 8443
                    },
                    {
                        "name": "dns",
                        "port": 53,
                        "protocol": "UDP",
                        "targetPort": 8053
                    },
                    {
                        "name": "dns-tcp",
                         ...

After fix:

"spec": {
                "clusterIP": "172.30.0.1",
                "ports": [
                    {
                        "name": "https",
                        "port": 443,
                        "protocol": "TCP",
                        "targetPort": 8443     # <-- fixed, now matches the endpoint object
                    },
                    {
                        "name": "dns",
                        "port": 53,
                        "protocol": "UDP",
                        "targetPort": 8053
                    },
                    {
                        "name": "dns-tcp",

``

…ses the service port itself. The endpoint is created correctly using public port. Fix the service also because there are some plugin controllers that react to service spec itself.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 8, 2017
@k8s-github-robot k8s-github-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-label-needed labels Feb 8, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@srampal
Copy link

srampal commented Feb 8, 2017

This change is needed by contiv, a CNI networking plugin for Openshift in order to watch and program the correct endpoint port number for the kubernetes api server.

@jojimt
Copy link

jojimt commented Feb 8, 2017

LGTM.

@rajatchopra
Copy link
Contributor Author

@derekwaynecarr PTAL

@rajatchopra
Copy link
Contributor Author

@smarterclayton Review please
/cc @kubernetes/rh-networking

@smarterclayton
Copy link
Contributor

Lgtm as well but want @ncdc to sign off as well

@smarterclayton smarterclayton added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels Feb 9, 2017
@ncdc
Copy link
Member

ncdc commented Feb 9, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 9, 2017
@smarterclayton
Copy link
Contributor

/approve

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

The following people have approved this PR: rajatchopra, smarterclayton

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 13, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit cfb08cd into kubernetes:master Feb 14, 2017
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants