Package org.cdk8s.plus20
Class Workload
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- org.cdk8s.plus20.Resource
-
- org.cdk8s.plus20.AbstractPod
-
- org.cdk8s.plus20.Workload
-
- All Implemented Interfaces:
IResource,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
- Direct Known Subclasses:
DaemonSet,Deployment,Job,StatefulSet
@Generated(value="jsii-pacmak/1.57.0 (build f614666)", date="2022-04-27T18:54:21.425Z") @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.constructs.Construct
software.constructs.Construct.Builder
-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus20.IResource
IResource.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 Map<String,String>getLabelSelector()The labels this workload will match against in order to select pods.org.cdk8s.ApiObjectMetadataDefinitiongetPodMetadata()The metadata of pods in this workload.voidselectByLabel(String key, String value)Configure a label selector to this workload.-
Methods inherited from class org.cdk8s.plus20.AbstractPod
addContainer, addHostAlias, addInitContainer, addVolume, getContainers, getDns, getDockerRegistryAuth, getHostAliases, getInitContainers, getRestartPolicy, getSecurityContext, getServiceAccount, getVolumes
-
Methods inherited from class org.cdk8s.plus20.Resource
getApiObject, getMetadata, getName
-
Methods inherited from class software.constructs.Construct
onPrepare, onSynthesize, onValidate, toString
-
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
-
selectByLabel
@Stability(Stable) public void selectByLabel(@NotNull String key, @NotNull String value)Configure a label selector to this workload.Pods that have the label will be selected by workloads configured with this spec.
- Parameters:
key- - The label key. This parameter is required.value- - The label value. This parameter is required.
-
getLabelSelector
@Stability(Stable) @NotNull public Map<String,String> getLabelSelector()
The labels this workload will match against in order to select pods.Returns a a copy. Use
selectByLabel()to add labels.
-
getPodMetadata
@Stability(Stable) @NotNull public org.cdk8s.ApiObjectMetadataDefinition getPodMetadata()
The metadata of pods in this workload.
-
-