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

Update Antrea-native policy doc for Namespace labels #2596

Merged
merged 2 commits into from
Aug 16, 2021

Conversation

abhiraut
Copy link
Contributor

Add note regarding how to use the Namespace by Name feature in K8s and Antrea-native network policies depending on the
K8s version.

Signed-off-by: abhiraut rauta@vmware.com

Add note regarding how to use the Namespace by Name
feature in K8s and Antrea-native network policies
depending on the K8s version.

Signed-off-by: abhiraut <rauta@vmware.com>
@abhiraut abhiraut added the kind/documentation Categorizes issue or PR as related to a documentation. label Aug 12, 2021
@abhiraut abhiraut added this to the Antrea v1.3 release milestone Aug 12, 2021

### K8s clusters with version 1.21 and above

Starting with K8s v1.21, all Namespaces will be labeled with `kubernetes.io/metadata.name: <namespaceName>` [label](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#automatic-labelling)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Starting with K8s v1.21, all Namespaces will be labeled with `kubernetes.io/metadata.name: <namespaceName>` [label](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#automatic-labelling)
Starting with K8s v1.21, all Namespaces are labeled with the `kubernetes.io/metadata.name: <namespaceName>` [label]

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 clusters with version 1.21 and above

Starting with K8s v1.21, all Namespaces will be labeled with `kubernetes.io/metadata.name: <namespaceName>` [label](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#automatic-labelling)
provided that the `NamespaceDefaultLabelName` feature gate is enabled. K8s NetworkPolicy
Copy link
Contributor

Choose a reason for hiding this comment

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

should emphasize that the feature gate is enabled by default in v1.21, this was never an alpha feature, it went straight to Beta

in v1.22, it is GA and cannot even be disabled anymore

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

Signed-off-by: abhiraut <rauta@vmware.com>
@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2021

Codecov Report

Merging #2596 (d77b65a) into main (535b7a3) will decrease coverage by 17.91%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2596       +/-   ##
===========================================
- Coverage   60.10%   42.18%   -17.92%     
===========================================
  Files         282      153      -129     
  Lines       22337    18491     -3846     
===========================================
- Hits        13426     7801     -5625     
- Misses       7491     9986     +2495     
+ Partials     1420      704      -716     
Flag Coverage Δ
kind-e2e-tests ?
unit-tests 42.18% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/ovs/openflow/default.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/util/runtime/runtime.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/agent/config/node_config.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/agent/cniserver/pod_configuration_linux.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/apis/controlplane/v1beta1/register.go 0.00% <0.00%> (-92.86%) ⬇️
pkg/ovs/openflow/logs.go 9.52% <0.00%> (-90.48%) ⬇️
pkg/apis/controlplane/register.go 0.00% <0.00%> (-90.00%) ⬇️
pkg/agent/nodeportlocal/k8s/annotations.go 0.00% <0.00%> (-83.88%) ⬇️
pkg/agent/client.go 0.00% <0.00%> (-80.65%) ⬇️
pkg/agent/agent_linux.go 0.00% <0.00%> (-80.00%) ⬇️
... and 229 more

Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

LGTM

@antoninbas
Copy link
Contributor

/skip-all

@antoninbas antoninbas merged commit 382f49e into antrea-io:main Aug 16, 2021
zyiou pushed a commit to zyiou/antrea that referenced this pull request Aug 17, 2021
* Update Antrea-native policy doc for Namespace labels

Add note regarding how to use the Namespace by Name
feature in K8s and Antrea-native network policies
depending on the K8s version.

Signed-off-by: abhiraut <rauta@vmware.com>

* Add note regarding feature gate deletion

Signed-off-by: abhiraut <rauta@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to a documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants