Class PodConnections
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- org.cdk8s.plus23.PodConnections
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.61.0 (build abf4039)", date="2022-07-06T20:17:23.659Z") @Stability(Stable) public class PodConnections extends software.amazon.jsii.JsiiObject
Controls network isolation rules for inter-pod communication.
-
-
Constructor Summary
Constructors Modifier Constructor Description PodConnections(AbstractPod instance)protectedPodConnections(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedPodConnections(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidallowFrom(INetworkPolicyPeer peer)Allow network traffic from the peer to this pod.voidallowFrom(INetworkPolicyPeer peer, PodConnectionsAllowFromOptions options)Allow network traffic from the peer to this pod.voidallowTo(INetworkPolicyPeer peer)Allow network traffic from this pod to the peer.voidallowTo(INetworkPolicyPeer peer, PodConnectionsAllowToOptions options)Allow network traffic from this pod to the peer.protected AbstractPodgetInstance()-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
PodConnections
protected PodConnections(software.amazon.jsii.JsiiObjectRef objRef)
-
PodConnections
protected PodConnections(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
PodConnections
@Stability(Stable) public PodConnections(@NotNull AbstractPod instance)- Parameters:
instance- This parameter is required.
-
-
Method Detail
-
allowFrom
@Stability(Stable) public void allowFrom(@NotNull INetworkPolicyPeer peer, @Nullable PodConnectionsAllowFromOptions options)Allow network traffic from the peer to this pod.By default, this will create an ingress network policy for this pod, and an egress network policy for the peer. This is required if both sides are already isolated. Use
options.isolationto control this behavior.Example:
// create only an egress policy that selects the 'web' pod to allow outgoing traffic // to the 'redis' pod. this requires the 'redis' pod to not be isolated for ingress. redis.connections.allowFrom(web, { isolation: Isolation.PEER }) // create only an ingress policy that selects the 'redis' peer to allow incoming traffic // from the 'web' pod. this requires the 'web' pod to not be isolated for egress. redis.connections.allowFrom(web, { isolation: Isolation.POD })- Parameters:
peer- This parameter is required.options-
-
allowFrom
@Stability(Stable) public void allowFrom(@NotNull INetworkPolicyPeer peer)Allow network traffic from the peer to this pod.By default, this will create an ingress network policy for this pod, and an egress network policy for the peer. This is required if both sides are already isolated. Use
options.isolationto control this behavior.Example:
// create only an egress policy that selects the 'web' pod to allow outgoing traffic // to the 'redis' pod. this requires the 'redis' pod to not be isolated for ingress. redis.connections.allowFrom(web, { isolation: Isolation.PEER }) // create only an ingress policy that selects the 'redis' peer to allow incoming traffic // from the 'web' pod. this requires the 'web' pod to not be isolated for egress. redis.connections.allowFrom(web, { isolation: Isolation.POD })- Parameters:
peer- This parameter is required.
-
allowTo
@Stability(Stable) public void allowTo(@NotNull INetworkPolicyPeer peer, @Nullable PodConnectionsAllowToOptions options)Allow network traffic from this pod to the peer.By default, this will create an egress network policy for this pod, and an ingress network policy for the peer. This is required if both sides are already isolated. Use
options.isolationto control this behavior.Example:
// create only an egress policy that selects the 'web' pod to allow outgoing traffic // to the 'redis' pod. this requires the 'redis' pod to not be isolated for ingress. web.connections.allowTo(redis, { isolation: Isolation.POD }) // create only an ingress policy that selects the 'redis' peer to allow incoming traffic // from the 'web' pod. this requires the 'web' pod to not be isolated for egress. web.connections.allowTo(redis, { isolation: Isolation.PEER })- Parameters:
peer- This parameter is required.options-
-
allowTo
@Stability(Stable) public void allowTo(@NotNull INetworkPolicyPeer peer)Allow network traffic from this pod to the peer.By default, this will create an egress network policy for this pod, and an ingress network policy for the peer. This is required if both sides are already isolated. Use
options.isolationto control this behavior.Example:
// create only an egress policy that selects the 'web' pod to allow outgoing traffic // to the 'redis' pod. this requires the 'redis' pod to not be isolated for ingress. web.connections.allowTo(redis, { isolation: Isolation.POD }) // create only an ingress policy that selects the 'redis' peer to allow incoming traffic // from the 'web' pod. this requires the 'web' pod to not be isolated for egress. web.connections.allowTo(redis, { isolation: Isolation.PEER })- Parameters:
peer- This parameter is required.
-
getInstance
@Stability(Stable) @NotNull protected AbstractPod getInstance()
-
-