public class DeploymentConfig extends KubernetesResource implements IDeploymentConfig
Modifier and Type | Field and Description |
---|---|
static String |
DEPLOYMENTCONFIG_CONTAINERS |
ANNOTATIONS, APIVERSION, CREATION_TIMESTAMP, KIND, LABELS, METADATA_NAME, NAME, NAMESPACE, OBJECTS, PORTS, PROTOCOL, VALUE
Constructor and Description |
---|
DeploymentConfig(org.jboss.dmr.ModelNode node,
IClient client,
Map<String,String[]> propertyKeys) |
Modifier and Type | Method and Description |
---|---|
void |
addContainer(DockerImageURI tag,
Set<IPort> containerPorts,
Map<String,String> envVars)
Add a container to the pod that will be spun up as
part of this deployment, defaulting the name to the image name
|
void |
addContainer(String name,
DockerImageURI tag,
Set<IPort> containerPorts,
Map<String,String> envVars,
List<String> emptyDirVolumes)
Add a container to the pod that will be spun up as
part of this deployment.
|
void |
addTemplateLabel(String key,
String value)
Add or update a label to the template spec;
|
IDeploymentTrigger |
addTrigger(String type)
Add a trigger of the given type
or null if the type is unrecognized
|
String |
getDeploymentStrategyType()
Convenience method to get the deployment
strategy type
|
List<String> |
getImageNames() |
int |
getReplicas()
Returns the number of replicas to be created by the replication
controller generated from this deployment config
|
Map<String,String> |
getReplicaSelector()
Returns the replica selector to be used by the replication
controller generated from this deployment config
|
List<String> |
getTriggerTypes()
Get the list of deployment triggers
|
void |
setReplicas(int replicas) |
void |
setReplicaSelector(Map<String,String> selector)
Set the selector by completely replacing the values
that were there before
|
void |
setReplicaSelector(String key,
String value)
Convenience method to set the selector when there
is a single key/value pair
|
accept, addLabel, asBoolean, asInt, asInt, asMap, asString, asString, equals, get, get, getAnnotation, getAnnotations, getApiVersion, getCapabilities, getCapability, getClient, getCreationTimeStamp, getEnvMap, getKind, getLabels, getModifiableCapabilities, getName, getNamespace, getNode, getPath, getProject, hashCode, isAnnotatedWith, refresh, set, set, set, set, set, set, set, setAnnotation, setEnvMap, setName, setNamespace, supports, toJson, toJson, toPrettyString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addLabel, getAnnotation, getAnnotations, getApiVersion, getCapabilities, getCreationTimeStamp, getKind, getLabels, getName, getNamespace, getProject, isAnnotatedWith, setAnnotation, toJson, toJson
accept, getCapability, supports
public static final String DEPLOYMENTCONFIG_CONTAINERS
public Map<String,String> getReplicaSelector()
IDeploymentConfig
getReplicaSelector
in interface IDeploymentConfig
public void setReplicaSelector(Map<String,String> selector)
IDeploymentConfig
setReplicaSelector
in interface IDeploymentConfig
public void setReplicaSelector(String key, String value)
IDeploymentConfig
setReplicaSelector
in interface IDeploymentConfig
public List<String> getTriggerTypes()
IDeploymentConfig
getTriggerTypes
in interface IDeploymentConfig
public int getReplicas()
IDeploymentConfig
getReplicas
in interface IDeploymentConfig
public void setReplicas(int replicas)
setReplicas
in interface IDeploymentConfig
public void addTemplateLabel(String key, String value)
IDeploymentConfig
addTemplateLabel
in interface IDeploymentConfig
public void addContainer(DockerImageURI tag, Set<IPort> containerPorts, Map<String,String> envVars)
IDeploymentConfig
addContainer
in interface IDeploymentConfig
tag
- the docker uricontainerPorts
- the container portspublic void addContainer(String name, DockerImageURI tag, Set<IPort> containerPorts, Map<String,String> envVars, List<String> emptyDirVolumes)
IDeploymentConfig
addContainer
in interface IDeploymentConfig
name
- the name of the containertag
- the docker uricontainerPorts
- the container portsemptyDirVolumes
- the set of emptyDir volumes to add to the configpublic IDeploymentTrigger addTrigger(String type)
IDeploymentConfig
addTrigger
in interface IDeploymentConfig
public String getDeploymentStrategyType()
IDeploymentConfig
getDeploymentStrategyType
in interface IDeploymentConfig
Copyright © 2016 Red Hat, Inc. All rights reserved.