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

NPL(NodePort Local) changing service type from clusterIP to Nodeport doesn't removes the NPL annotations in POD #1910

Closed
tamilhce opened this issue Feb 26, 2021 · 0 comments · Fixed by #1936
Assignees
Labels
area/proxy/nodeportlocal Issues or PRs related to the NodePortLocal feature kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@tamilhce
Copy link

tamilhce commented Feb 26, 2021

Describe the bug
NPL(NodePort Local)while changing the service type from clusterIP to Nodeport. The respective NPL annotations in POD are not removed
To Reproduce

step1: created svc object(default : Cluster IP)

 apiVersion: v1
kind: Service
metadata:
  annotations:
    nodeportlocal.antrea.io/enabled: "true"
  labels:
    app: nginx
  name: svc-nginx
  spec:
    ports:
    - name: web
      port: 80
      protocol: TCP
      targetPort: 8080
    selector:
      app: nginx

step2: As expected observed the NPL annotations in the POD

\":50000}]"}root@tvk-k8s119-ant-master-1:~# kubectl get pods -o=jsonpath="{range .items[*]}{'\n'}{.metadata.name}{':\t'}{.metaions}{end}"ti

nginx-deployment-b68c6d696-frrfj:	{"nodeportlocal.antrea.io":"[{\"podPort\":8080,\"nodeIP\":\"192.168.11.14\",\"nodePort\":50002}]"}
nginx-deployment-b68c6d696-qb2j4:	{"nodeportlocal.antrea.io":"[{\"podPort\":8080,\"nodeIP\":\"192.168.11.14\",\"nodePort\":50001}]"}
nginx-deployment-b68c6d696-qtzm7:	{"nodeportlocal.antrea.io":"[{\"podPort\":8080,\"nodeIP\":\"192.168.11.14\",\"nodePort\":50000}]"}
nginx-deployment-b68c6d696-xtg5t:	{"nodeportlocal.antrea.io":"[{\"podPort\":8080,\"nodeIP\":\"192.168.11.15\",\"nodePort\":50000}]"}root@tvk-k8s119-ant-master-1:~#

step3 : Change the svc from type clusterIP to NodePort

NAME         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE 
svc-nginx    NodePort    10.100.85.236   <none>        80:30853/TCP   49m

step4: observed that Pod Annotations are not removed

\":50000}]"}root@tvk-k8s119-ant-master-1:~# kubectl get pods -o=jsonpath="{range .items[*]}{'\n'}{.metadata.name}{':\t'}{.metaions}{end}"ti

nginx-deployment-b68c6d696-frrfj:	{"nodeportlocal.antrea.io":"[{\"podPort\":8080,\"nodeIP\":\"192.168.11.14\",\"nodePort\":50002}]"}
nginx-deployment-b68c6d696-qb2j4:	{"nodeportlocal.antrea.io":"[{\"podPort\":8080,\"nodeIP\":\"192.168.11.14\",\"nodePort\":50001}]"}
nginx-deployment-b68c6d696-qtzm7:	{"nodeportlocal.antrea.io":"[{\"podPort\":8080,\"nodeIP\":\"192.168.11.14\",\"nodePort\":50000}]"}
nginx-deployment-b68c6d696-xtg5t:	{"nodeportlocal.antrea.io":"[{\"podPort\":8080,\"nodeIP\":\"192.168.11.15\",\"nodePort\":50000}]"}root@tvk-k8s119-ant-master-1:~#

Expected
As per the expectation, The Pod annotations needs to be removed if the svc object is of type NodePort

Versions:
Please provide the following information:

  • Antrea version (v0.13.0).
  • Kubernetes version -1.19
@tamilhce tamilhce added the kind/bug Categorizes issue or PR as related to a bug. label Feb 26, 2021
@antoninbas antoninbas added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Feb 26, 2021
@antoninbas antoninbas added this to the Antrea v0.14.0 release milestone Feb 26, 2021
@chauhanshubham chauhanshubham self-assigned this Mar 1, 2021
@antoninbas antoninbas added the area/proxy/nodeportlocal Issues or PRs related to the NodePortLocal feature label Mar 2, 2021
chauhanshubham pushed a commit to chauhanshubham/antrea that referenced this issue Mar 3, 2021
chauhanshubham pushed a commit to chauhanshubham/antrea that referenced this issue Mar 3, 2021
chauhanshubham pushed a commit to chauhanshubham/antrea that referenced this issue Mar 15, 2021
chauhanshubham pushed a commit to chauhanshubham/antrea that referenced this issue Apr 6, 2021
@tnqn tnqn closed this as completed in #1936 Apr 7, 2021
tnqn pushed a commit that referenced this issue Apr 7, 2021
antoninbas pushed a commit to antoninbas/antrea that referenced this issue Apr 30, 2021
antoninbas pushed a commit to antoninbas/antrea that referenced this issue Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/proxy/nodeportlocal Issues or PRs related to the NodePortLocal feature kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants