Fix list_type_missing in api/networking

This commit is contained in:
Tim Hockin
2023-11-16 11:52:42 -08:00
parent 7fc3ef1fec
commit b2458e456a
11 changed files with 145 additions and 35 deletions

View File

@@ -1,18 +1,3 @@
API rule violation: list_type_missing,k8s.io/api/networking/v1,IPBlock,Except
API rule violation: list_type_missing,k8s.io/api/networking/v1,IngressLoadBalancerStatus,Ingress
API rule violation: list_type_missing,k8s.io/api/networking/v1,NetworkPolicyEgressRule,Ports
API rule violation: list_type_missing,k8s.io/api/networking/v1,NetworkPolicyEgressRule,To
API rule violation: list_type_missing,k8s.io/api/networking/v1,NetworkPolicyIngressRule,From
API rule violation: list_type_missing,k8s.io/api/networking/v1,NetworkPolicyIngressRule,Ports
API rule violation: list_type_missing,k8s.io/api/networking/v1,NetworkPolicySpec,Egress
API rule violation: list_type_missing,k8s.io/api/networking/v1,NetworkPolicySpec,Ingress
API rule violation: list_type_missing,k8s.io/api/networking/v1,NetworkPolicySpec,PolicyTypes
API rule violation: list_type_missing,k8s.io/api/networking/v1alpha1,ServiceCIDRSpec,CIDRs
API rule violation: list_type_missing,k8s.io/api/networking/v1beta1,HTTPIngressRuleValue,Paths
API rule violation: list_type_missing,k8s.io/api/networking/v1beta1,IngressLoadBalancerStatus,Ingress
API rule violation: list_type_missing,k8s.io/api/networking/v1beta1,IngressSpec,Rules
API rule violation: list_type_missing,k8s.io/api/networking/v1beta1,IngressSpec,TLS
API rule violation: list_type_missing,k8s.io/api/networking/v1beta1,IngressTLS,Hosts
API rule violation: list_type_missing,k8s.io/api/rbac/v1,AggregationRule,ClusterRoleSelectors
API rule violation: list_type_missing,k8s.io/api/rbac/v1,ClusterRole,Rules
API rule violation: list_type_missing,k8s.io/api/rbac/v1,ClusterRoleBinding,Subjects

View File

@@ -12862,7 +12862,8 @@
"items": {
"type": "string"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
@@ -13090,7 +13091,8 @@
"items": {
"$ref": "#/definitions/io.k8s.api.networking.v1.IngressLoadBalancerIngress"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"type": "object"
@@ -13243,14 +13245,16 @@
"items": {
"$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPort"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"to": {
"description": "to is a list of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.",
"items": {
"$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPeer"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"type": "object"
@@ -13263,14 +13267,16 @@
"items": {
"$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPeer"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"ports": {
"description": "ports is a list of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.",
"items": {
"$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPort"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"type": "object"
@@ -13355,14 +13361,16 @@
"items": {
"$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyEgressRule"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"ingress": {
"description": "ingress is a list of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)",
"items": {
"$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyIngressRule"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"podSelector": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector",
@@ -13373,7 +13381,8 @@
"items": {
"type": "string"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
@@ -13568,7 +13577,8 @@
"items": {
"type": "string"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"type": "object"

View File

@@ -89,7 +89,8 @@
"default": "",
"type": "string"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [
@@ -386,7 +387,8 @@
],
"default": {}
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"type": "object"
@@ -582,7 +584,8 @@
],
"default": {}
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"to": {
"description": "to is a list of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.",
@@ -594,7 +597,8 @@
],
"default": {}
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"type": "object"
@@ -612,7 +616,8 @@
],
"default": {}
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"ports": {
"description": "ports is a list of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.",
@@ -624,7 +629,8 @@
],
"default": {}
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"type": "object"
@@ -740,7 +746,8 @@
],
"default": {}
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"ingress": {
"description": "ingress is a list of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)",
@@ -752,7 +759,8 @@
],
"default": {}
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"podSelector": {
"allOf": [
@@ -769,7 +777,8 @@
"default": "",
"type": "string"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"required": [

View File

@@ -223,7 +223,8 @@
"default": "",
"type": "string"
},
"type": "array"
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"type": "object"