volcano networkpolicy
root@ubuntu:~/tenant# kubectl get networkPolicy --output yaml apiVersion: v1 items: - apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: creationTimestamp: "2021-07-14T07:04:27Z" generation: 1 managedFields: - apiVersion: networking.k8s.io/v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:ownerReferences: .: {} k:{"uid":"4a8f4043-1c18-445a-9896-e406b1610634"}: .: {} f:apiVersion: {} f:blockOwnerDeletion: {} f:controller: {} f:kind: {} f:name: {} f:uid: {} f:spec: f:ingress: {} f:podSelector: f:matchLabels: .: {} f:volcano.sh/job-name: {} f:volcano.sh/job-namespace: {} f:policyTypes: {} manager: vc-controller-manager operation: Update time: "2021-07-14T07:04:27Z" name: test-job namespace: default ownerReferences: - apiVersion: batch.volcano.sh/v1alpha1 blockOwnerDeletion: true controller: true kind: Job name: test-job uid: 4a8f4043-1c18-445a-9896-e406b1610634 resourceVersion: "3028007" selfLink: /apis/networking.k8s.io/v1/namespaces/default/networkpolicies/test-job uid: f75371ab-3642-48aa-92cc-49d048814794 spec: ingress: - from: - podSelector: matchLabels: volcano.sh/job-name: test-job volcano.sh/job-namespace: default podSelector: matchLabels: volcano.sh/job-name: test-job volcano.sh/job-namespace: default policyTypes: - Ingress - apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: creationTimestamp: "2021-07-14T07:37:07Z" generation: 1 managedFields: - apiVersion: networking.k8s.io/v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:ownerReferences: .: {} k:{"uid":"dca29fe5-d704-47ed-9ae4-0f447d0f4b26"}: .: {} f:apiVersion: {} f:blockOwnerDeletion: {} f:controller: {} f:kind: {} f:name: {} f:uid: {} f:spec: f:ingress: {} f:podSelector: f:matchLabels: .: {} f:volcano.sh/job-name: {} f:volcano.sh/job-namespace: {} f:policyTypes: {} manager: vc-controller-manager operation: Update time: "2021-07-14T07:37:07Z" name: test-job-v2 namespace: default ownerReferences: - apiVersion: batch.volcano.sh/v1alpha1 blockOwnerDeletion: true controller: true kind: Job name: test-job-v2 uid: dca29fe5-d704-47ed-9ae4-0f447d0f4b26 resourceVersion: "3033543" selfLink: /apis/networking.k8s.io/v1/namespaces/default/networkpolicies/test-job-v2 uid: c6cf39c1-45ca-4467-93c3-78bcec827bd5 spec: ingress: - from: - podSelector: matchLabels: volcano.sh/job-name: test-job-v2 volcano.sh/job-namespace: default podSelector: matchLabels: volcano.sh/job-name: test-job-v2 volcano.sh/job-namespace: default policyTypes: - Ingress kind: List metadata: resourceVersion: "" selfLink: "" root@ubuntu:~/tenant# kubectl get networkPolicy NAME POD-SELECTOR AGE test-job volcano.sh/job-name=test-job,volcano.sh/job-namespace=default 47h test-job-v2 volcano.sh/job-name=test-job-v2,volcano.sh/job-namespace=default 47h root@ubuntu:~/tenant#
root@ubuntu:~/tenant# kubectl get networkPolicy NAME POD-SELECTOR AGE test-job volcano.sh/job-name=test-job,volcano.sh/job-namespace=default 47h test-job-v2 volcano.sh/job-name=test-job-v2,volcano.sh/job-namespace=default 47h
root@ubuntu:~/tenant# kubectl get networkPolicy test-job -o yaml apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: creationTimestamp: "2021-07-14T07:04:27Z" generation: 1 managedFields: - apiVersion: networking.k8s.io/v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:ownerReferences: .: {} k:{"uid":"4a8f4043-1c18-445a-9896-e406b1610634"}: .: {} f:apiVersion: {} f:blockOwnerDeletion: {} f:controller: {} f:kind: {} f:name: {} f:uid: {} f:spec: f:ingress: {} f:podSelector: f:matchLabels: .: {} f:volcano.sh/job-name: {} f:volcano.sh/job-namespace: {} f:policyTypes: {} manager: vc-controller-manager operation: Update time: "2021-07-14T07:04:27Z" name: test-job namespace: default ownerReferences: - apiVersion: batch.volcano.sh/v1alpha1 blockOwnerDeletion: true controller: true kind: Job name: test-job uid: 4a8f4043-1c18-445a-9896-e406b1610634 resourceVersion: "3028007" selfLink: /apis/networking.k8s.io/v1/namespaces/default/networkpolicies/test-job uid: f75371ab-3642-48aa-92cc-49d048814794 spec: ingress: - from: - podSelector: matchLabels: volcano.sh/job-name: test-job volcano.sh/job-namespace: default podSelector: matchLabels: volcano.sh/job-name: test-job volcano.sh/job-namespace: default policyTypes: - Ingress
root@ubuntu:~/tenant# kubectl get networkPolicy test-job-v2 -o yaml apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: creationTimestamp: "2021-07-14T07:37:07Z" generation: 1 managedFields: - apiVersion: networking.k8s.io/v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:ownerReferences: .: {} k:{"uid":"dca29fe5-d704-47ed-9ae4-0f447d0f4b26"}: .: {} f:apiVersion: {} f:blockOwnerDeletion: {} f:controller: {} f:kind: {} f:name: {} f:uid: {} f:spec: f:ingress: {} f:podSelector: f:matchLabels: .: {} f:volcano.sh/job-name: {} f:volcano.sh/job-namespace: {} f:policyTypes: {} manager: vc-controller-manager operation: Update time: "2021-07-14T07:37:07Z" name: test-job-v2 namespace: default ownerReferences: - apiVersion: batch.volcano.sh/v1alpha1 blockOwnerDeletion: true controller: true kind: Job name: test-job-v2 uid: dca29fe5-d704-47ed-9ae4-0f447d0f4b26 resourceVersion: "3033543" selfLink: /apis/networking.k8s.io/v1/namespaces/default/networkpolicies/test-job-v2 uid: c6cf39c1-45ca-4467-93c3-78bcec827bd5 spec: ingress: - from: - podSelector: matchLabels: volcano.sh/job-name: test-job-v2 volcano.sh/job-namespace: default podSelector: matchLabels: volcano.sh/job-name: test-job-v2 volcano.sh/job-namespace: default policyTypes: - Ingress