-
Notifications
You must be signed in to change notification settings - Fork 40.3k
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
PATCH merges Services with same port, different protocol #47249
Comments
@thockin There are no sig labels on this issue. Please add a sig label by: |
/sig network |
/assign |
cc: @pwittrock |
Any updates here? xref: #49295 |
@xiangpengzhao #46161 and kubernetes/community#476 are trying to solve this issue. But they will not get in in 1.8 :( |
Thanks @mengqiy! I will wait for it at the next milestone:) |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle rotten |
@mengqiy If you aren't able to handle this issue, consider unassigning yourself and/or adding the 🤖 I am a bot run by vllry. 👩🔬 |
Trying to create a bug and found this existing issue. Will put some content here for those who are interested in reproduce. What happened: What you expected to happen: How to reproduce it (as minimally and precisely as possible): $ kubectl create ns test
$ cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Service
metadata:
name: test
namespace: test
labels:
app: "test"
spec:
selector:
k8s-app: kube-dns
ports:
- name: dns
port: 53
protocol: UDP
- name: dns-tcp
port: 53
protocol: TCP
EOF
# Note the targetPort values change here
$ cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Service
metadata:
name: test
namespace: test
labels:
app: "test"
spec:
selector:
k8s-app: kube-dns
ports:
- name: dns
port: 53
protocol: UDP
targetPort: 5678
- name: dns-tcp
port: 53
protocol: TCP
targetPort: 1234
EOF
# Notice the targetPort value for port "dns" has the value 5678
# which is configured for port "dns-tcp"
$ kubectl get svc test -n test -o yaml Anything else we need to know?: Note that below is the patch spec for above example: {
"spec": {
"$setElementOrder/ports": [
{
"port": 53
},
{
"port": 53
}
],
"ports": [
{
"port": 53,
"targetPort": "1234"
},
{
"port": 53,
"targetPort": "5678"
}
]
}
} |
Dup of #103544 which has more information |
xref: #47221 (comment)
Specifically, DNS uses the same port number in TCP and UDP. This is valid when the object is created, but any PATCH operation related to Service ports will merge those together, which is wrong.
@mengqiy This is the gift that keeps on giving. I am so sorry.
The text was updated successfully, but these errors were encountered: