Interface Generated.NetworkPolicySpecOrBuilder

    • Method Detail

      • hasPodSelector

        boolean hasPodSelector()
         podSelector selects the pods to which this NetworkPolicy object applies.
         The array of ingress rules is applied to any pods selected by this field.
         Multiple network policies can select the same set of pods. In this case,
         the ingress rules for each are combined additively.
         This field is NOT optional and follows standard label selector semantics.
         An empty podSelector matches all pods in this namespace.
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
        Returns:
        Whether the podSelector field is set.
      • getPodSelector

        Generated.LabelSelector getPodSelector()
         podSelector selects the pods to which this NetworkPolicy object applies.
         The array of ingress rules is applied to any pods selected by this field.
         Multiple network policies can select the same set of pods. In this case,
         the ingress rules for each are combined additively.
         This field is NOT optional and follows standard label selector semantics.
         An empty podSelector matches all pods in this namespace.
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
        Returns:
        The podSelector.
      • getPodSelectorOrBuilder

        Generated.LabelSelectorOrBuilder getPodSelectorOrBuilder()
         podSelector selects the pods to which this NetworkPolicy object applies.
         The array of ingress rules is applied to any pods selected by this field.
         Multiple network policies can select the same set of pods. In this case,
         the ingress rules for each are combined additively.
         This field is NOT optional and follows standard label selector semantics.
         An empty podSelector matches all pods in this namespace.
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
      • getIngressList

        List<Generated.NetworkPolicyIngressRule> getIngressList()
         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)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • getIngress

        Generated.NetworkPolicyIngressRule getIngress​(int index)
         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)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • getIngressCount

        int getIngressCount()
         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)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • getIngressOrBuilderList

        List<? extends Generated.NetworkPolicyIngressRuleOrBuilder> getIngressOrBuilderList()
         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)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • getIngressOrBuilder

        Generated.NetworkPolicyIngressRuleOrBuilder getIngressOrBuilder​(int index)
         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)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • getEgressList

        List<Generated.NetworkPolicyEgressRule> getEgressList()
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • getEgress

        Generated.NetworkPolicyEgressRule getEgress​(int index)
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • getEgressCount

        int getEgressCount()
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • getEgressOrBuilderList

        List<? extends Generated.NetworkPolicyEgressRuleOrBuilder> getEgressOrBuilderList()
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • getEgressOrBuilder

        Generated.NetworkPolicyEgressRuleOrBuilder getEgressOrBuilder​(int index)
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • getPolicyTypesList

        List<String> getPolicyTypesList()
         policyTypes is a list of rule types that the NetworkPolicy relates to.
         Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"].
         If this field is not specified, it will default based on the existence of ingress or egress rules;
         policies that contain an egress section are assumed to affect egress, and all policies
         (whether or not they contain an ingress section) are assumed to affect ingress.
         If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
         Likewise, if you want to write a policy that specifies that no egress is allowed,
         you must specify a policyTypes value that include "Egress" (since such a policy would not include
         an egress section and would otherwise default to just [ "Ingress" ]).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated string policyTypes = 4;
        Returns:
        A list containing the policyTypes.
      • getPolicyTypesCount

        int getPolicyTypesCount()
         policyTypes is a list of rule types that the NetworkPolicy relates to.
         Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"].
         If this field is not specified, it will default based on the existence of ingress or egress rules;
         policies that contain an egress section are assumed to affect egress, and all policies
         (whether or not they contain an ingress section) are assumed to affect ingress.
         If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
         Likewise, if you want to write a policy that specifies that no egress is allowed,
         you must specify a policyTypes value that include "Egress" (since such a policy would not include
         an egress section and would otherwise default to just [ "Ingress" ]).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated string policyTypes = 4;
        Returns:
        The count of policyTypes.
      • getPolicyTypes

        String getPolicyTypes​(int index)
         policyTypes is a list of rule types that the NetworkPolicy relates to.
         Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"].
         If this field is not specified, it will default based on the existence of ingress or egress rules;
         policies that contain an egress section are assumed to affect egress, and all policies
         (whether or not they contain an ingress section) are assumed to affect ingress.
         If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
         Likewise, if you want to write a policy that specifies that no egress is allowed,
         you must specify a policyTypes value that include "Egress" (since such a policy would not include
         an egress section and would otherwise default to just [ "Ingress" ]).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated string policyTypes = 4;
        Parameters:
        index - The index of the element to return.
        Returns:
        The policyTypes at the given index.
      • getPolicyTypesBytes

        com.google.protobuf.ByteString getPolicyTypesBytes​(int index)
         policyTypes is a list of rule types that the NetworkPolicy relates to.
         Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"].
         If this field is not specified, it will default based on the existence of ingress or egress rules;
         policies that contain an egress section are assumed to affect egress, and all policies
         (whether or not they contain an ingress section) are assumed to affect ingress.
         If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
         Likewise, if you want to write a policy that specifies that no egress is allowed,
         you must specify a policyTypes value that include "Egress" (since such a policy would not include
         an egress section and would otherwise default to just [ "Ingress" ]).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated string policyTypes = 4;
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the policyTypes at the given index.