public interface IReplicationController extends IResource
| Modifier and Type | Field and Description |
|---|---|
static String |
DEPLOYMENT_PHASE |
| Modifier and Type | Method and Description |
|---|---|
IContainer |
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
|
IContainer |
addContainer(String name)
Add a container with the given name
|
IContainer |
addContainer(String name,
DockerImageURI tag,
Set<IPort> containerPorts,
Map<String,String> envVars,
List<String> volumes)
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;
|
void |
addVolume(IVolumeSource volumeSource)
Adds a volume to the pod spec.
|
<T extends IVolumeSource> |
addVolume(String volumetype,
String name)
Add a volume source of the given type with the given name.
|
IContainer |
getContainer(String name)
Retrieve a container by name or null if it is not found
|
Collection<IContainer> |
getContainers()
Retrieve the containers defined in spec
|
int |
getCurrentReplicaCount()
Returns the current number of replicas
|
int |
getDesiredReplicaCount()
Returns the desired number of replicas
|
Collection<IEnvironmentVariable> |
getEnvironmentVariables()
Return the list of env vars of the first container
|
Collection<IEnvironmentVariable> |
getEnvironmentVariables(String containerName)
Return the list of env vars for the given container or an empty list if the
container is not found
|
Collection<String> |
getImages()
Retrieves the list of images deployed in the pod containers from this
controller
|
int |
getReplicas() |
Map<String,String> |
getReplicaSelector()
Returns the selector used by the controller
|
String |
getServiceAccountName()
Retrieves the service account used by the controller
|
Map<String,String> |
getTemplateLabels()
Returns the labels for the template in this replication controller
|
Set<IVolumeSource> |
getVolumes()
The volumes associated with the pod spec
|
void |
removeEnvironmentVariable(String name)
Removes an environment variable with the given name.
|
void |
removeEnvironmentVariable(String containerName,
String name)
Removes an environment variable with the given name and value on the given
container.
|
void |
setContainers(Collection<IContainer> containers) |
void |
setDesiredReplicaCount(int numOfReplicas)
Sets a new desired number of replicas
|
void |
setEnvironmentVariable(String name,
String value)
Set an environment variable to the given name and value on the first
container in the list of containers
|
void |
setEnvironmentVariable(String containerName,
String name,
String value)
Set an environment variable to the given name and value on the given
container.
|
void |
setReplicas(int count) |
void |
setReplicaSelector(Map<String,String> selector)
Set the selector using the map of values
|
void |
setReplicaSelector(String key,
String value) |
void |
setServiceAccountName(String serviceAccount)
Sets the service account to run this replication controller under.
|
void |
setVolumes(Set<IVolumeSource> volumes)
Sets the volumes associated with the pod spec.
|
addLabel, getAnnotation, getAnnotations, getCapabilities, getCreationTimeStamp, getLabels, getMetadata, getName, getNamespace, getNamespaceName, getProject, getResourceVersion, isAnnotatedWith, removeAnnotation, setAnnotationaccept, getCapability, supportsgetApiVersiontoJson, toJsonstatic final String DEPLOYMENT_PHASE
void setEnvironmentVariable(String name, String value)
void setEnvironmentVariable(String containerName, String name, String value)
void removeEnvironmentVariable(String name)
IllegalArgumentException - if name is nullvoid removeEnvironmentVariable(String containerName, String name)
IllegalArgumentException - if name is nullCollection<IEnvironmentVariable> getEnvironmentVariables()
Collection<IEnvironmentVariable> getEnvironmentVariables(String containerName)
int getDesiredReplicaCount()
int getReplicas()
void setReplicas(int count)
void setDesiredReplicaCount(int numOfReplicas)
new - number of replicasint getCurrentReplicaCount()
Map<String,String> getReplicaSelector()
void setReplicaSelector(Map<String,String> selector)
Collection<String> getImages()
IContainer addContainer(String name, DockerImageURI tag, Set<IPort> containerPorts, Map<String,String> envVars, List<String> volumes)
name - the name of the containertag - the docker uricontainerPorts - the container portsvolumes - the set of emptyDir volumes to add to the configIContainer addContainer(DockerImageURI tag, Set<IPort> containerPorts, Map<String,String> envVars)
tag - the docker uricontainerPorts - the container portsIContainer addContainer(String name)
IContainer getContainer(String name)
Collection<IContainer> getContainers()
Map<String,String> getTemplateLabels()
void addTemplateLabel(String key, String value)
Set<IVolumeSource> getVolumes()
void addVolume(IVolumeSource volumeSource)
volumeSource - The volume to add to the pod spec<T extends IVolumeSource> T addVolume(String volumetype, String name)
volumetype - name - void setVolumes(Set<IVolumeSource> volumes)
volumes - The volumes to assign to the pod spec.void setContainers(Collection<IContainer> containers)
void setServiceAccountName(String serviceAccount)
volumes - The service account to assign to the spec.String getServiceAccountName()
Copyright © 2019 Red Hat, Inc. All Rights Reserved.