Package org.cdk8s.plus25
Class Workload
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- org.cdk8s.plus25.Resource
-
- org.cdk8s.plus25.AbstractPod
-
- org.cdk8s.plus25.Workload
-
- All Implemented Interfaces:
IApiEndpoint,IApiResource,INetworkPolicyPeer,IPodSelector,IResource,ISubject,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
- Direct Known Subclasses:
CronJob,DaemonSet,Deployment,Job,StatefulSet
@Generated(value="jsii-pacmak/1.88.0 (build eaabd08)", date="2023-09-11T06:17:58.453Z") @Stability(Stable) public abstract class Workload extends AbstractPod
A workload is an application running on Kubernetes.Whether your workload is a single component or several that work together, on Kubernetes you run it inside a set of pods. In Kubernetes, a Pod represents a set of running containers on your cluster.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface org.cdk8s.plus25.IApiEndpoint
IApiEndpoint.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus25.IApiResource
IApiResource.Jsii$Default
-
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus25.INetworkPolicyPeer
INetworkPolicyPeer.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus25.IPodSelector
IPodSelector.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus25.IResource
IResource.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus25.ISubject
ISubject.Jsii$Default
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWorkload(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedWorkload(software.amazon.jsii.JsiiObjectRef objRef)protectedWorkload(software.constructs.Construct scope, String id)protectedWorkload(software.constructs.Construct scope, String id, WorkloadProps props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PodConnectionsgetConnections()List<LabelSelectorRequirement>getMatchExpressions()The expression matchers this workload will use in order to select pods.Map<String,String>getMatchLabels()The label matchers this workload will use in order to select pods.org.cdk8s.ApiObjectMetadataDefinitiongetPodMetadata()The metadata of pods in this workload.WorkloadSchedulinggetScheduling()voidselect(@NotNull LabelSelector... selectors)Configure selectors for this workload.-
Methods inherited from class org.cdk8s.plus25.AbstractPod
addContainer, addHostAlias, addInitContainer, addVolume, attachContainer, getAutomountServiceAccountToken, getContainers, getDns, getDockerRegistryAuth, getHostAliases, getHostNetwork, getInitContainers, getIsolate, getRestartPolicy, getSecurityContext, getServiceAccount, getTerminationGracePeriod, getVolumes, toNetworkPolicyPeerConfig, toPodSelector, toPodSelectorConfig, toSubjectConfiguration
-
Methods inherited from class org.cdk8s.plus25.Resource
asApiResource, asNonApiResource, getApiGroup, getApiObject, getApiVersion, getKind, getMetadata, getName, getPermissions, getResourceName, getResourceType
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
Workload
protected Workload(software.amazon.jsii.JsiiObjectRef objRef)
-
Workload
protected Workload(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
Workload
@Stability(Stable) protected Workload(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable WorkloadProps props)- Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
Workload
@Stability(Stable) protected Workload(@NotNull software.constructs.Construct scope, @NotNull String id)- Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Detail
-
select
@Stability(Stable) public void select(@NotNull @NotNull LabelSelector... selectors)Configure selectors for this workload.- Parameters:
selectors- This parameter is required.
-
getConnections
@Stability(Stable) @NotNull public PodConnections getConnections()
-
getMatchExpressions
@Stability(Stable) @NotNull public List<LabelSelectorRequirement> getMatchExpressions()
The expression matchers this workload will use in order to select pods.Returns a a copy. Use
select()to add expression matchers.
-
getMatchLabels
@Stability(Stable) @NotNull public Map<String,String> getMatchLabels()
The label matchers this workload will use in order to select pods.Returns a a copy. Use
select()to add label matchers.
-
getPodMetadata
@Stability(Stable) @NotNull public org.cdk8s.ApiObjectMetadataDefinition getPodMetadata()
The metadata of pods in this workload.- Specified by:
getPodMetadatain classAbstractPod
-
getScheduling
@Stability(Stable) @NotNull public WorkloadScheduling getScheduling()
-
-