mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Update NetworkPolicy comments to reflect reality.
NetworkPolicy has been implemented with no distinction between nil and empty Ports/From, and we don't intend to change that now.
This commit is contained in:
@@ -127,7 +127,6 @@ func SetDefaults_ReplicaSet(obj *ReplicaSet) {
|
||||
func SetDefaults_NetworkPolicy(obj *NetworkPolicy) {
|
||||
// Default any undefined Protocol fields to TCP.
|
||||
for _, i := range obj.Spec.Ingress {
|
||||
// TODO: Update Ports to be a pointer to slice as soon as auto-generation supports it.
|
||||
for _, p := range i.Ports {
|
||||
if p.Protocol == nil {
|
||||
proto := v1.ProtocolTCP
|
||||
|
||||
Reference in New Issue
Block a user