Package net.stickycode.kuuty.model.v18
Class IoK8sApiNetworkingV1NetworkPolicySpec
- java.lang.Object
-
- net.stickycode.kuuty.model.v18.IoK8sApiNetworkingV1NetworkPolicySpec
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2020-11-26T11:01:11.402583+13:00[Pacific/Auckland]") public class IoK8sApiNetworkingV1NetworkPolicySpec extends Object
NetworkPolicySpec provides the specification of a NetworkPolicy
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_EGRESSstatic StringJSON_PROPERTY_INGRESSstatic StringJSON_PROPERTY_POD_SELECTORstatic StringJSON_PROPERTY_POLICY_TYPES
-
Constructor Summary
Constructors Constructor Description IoK8sApiNetworkingV1NetworkPolicySpec()
-
Method Summary
-
-
-
Field Detail
-
JSON_PROPERTY_EGRESS
public static final String JSON_PROPERTY_EGRESS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_INGRESS
public static final String JSON_PROPERTY_INGRESS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_POD_SELECTOR
public static final String JSON_PROPERTY_POD_SELECTOR
- See Also:
- Constant Field Values
-
JSON_PROPERTY_POLICY_TYPES
public static final String JSON_PROPERTY_POLICY_TYPES
- See Also:
- Constant Field Values
-
-
Method Detail
-
egress
public IoK8sApiNetworkingV1NetworkPolicySpec egress(List<IoK8sApiNetworkingV1NetworkPolicyEgressRule> egress)
-
addEgressItem
public IoK8sApiNetworkingV1NetworkPolicySpec addEgressItem(IoK8sApiNetworkingV1NetworkPolicyEgressRule egressItem)
-
getEgress
@Nullable public List<IoK8sApiNetworkingV1NetworkPolicyEgressRule> getEgress()
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- Returns:
- egress
-
setEgress
public void setEgress(List<IoK8sApiNetworkingV1NetworkPolicyEgressRule> egress)
-
ingress
public IoK8sApiNetworkingV1NetworkPolicySpec ingress(List<IoK8sApiNetworkingV1NetworkPolicyIngressRule> ingress)
-
addIngressItem
public IoK8sApiNetworkingV1NetworkPolicySpec addIngressItem(IoK8sApiNetworkingV1NetworkPolicyIngressRule ingressItem)
-
getIngress
@Nullable public List<IoK8sApiNetworkingV1NetworkPolicyIngressRule> getIngress()
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)- Returns:
- ingress
-
setIngress
public void setIngress(List<IoK8sApiNetworkingV1NetworkPolicyIngressRule> ingress)
-
podSelector
public IoK8sApiNetworkingV1NetworkPolicySpec podSelector(IoK8sApimachineryPkgApisMetaV1LabelSelector podSelector)
-
getPodSelector
public IoK8sApimachineryPkgApisMetaV1LabelSelector getPodSelector()
Get podSelector- Returns:
- podSelector
-
setPodSelector
public void setPodSelector(IoK8sApimachineryPkgApisMetaV1LabelSelector podSelector)
-
policyTypes
public IoK8sApiNetworkingV1NetworkPolicySpec policyTypes(List<String> policyTypes)
-
addPolicyTypesItem
public IoK8sApiNetworkingV1NetworkPolicySpec addPolicyTypesItem(String policyTypesItem)
-
getPolicyTypes
@Nullable public List<String> getPolicyTypes()
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- Returns:
- policyTypes
-
-