public class Service extends KubernetesResource implements IService
ANNOTATIONS, APIVERSION, CREATION_TIMESTAMP, KIND, LABELS, METADATA_NAME, NAME, NAMESPACE, OBJECTS, PORTS, PROTOCOL, TYPE, VALUE| Constructor and Description |
|---|
Service(org.jboss.dmr.ModelNode node,
IClient client,
Map<String,String[]> propertyKeys) |
| Modifier and Type | Method and Description |
|---|---|
List<IPod> |
getPods()
Retrieves the pods for this service
|
int |
getPort()
Returns the first exposed port that is mapped to
a running image
|
String |
getPortalIP()
Returns the IP of the service.
|
List<IServicePort> |
getPorts()
Get the collection of ports for the service
|
Map<String,String> |
getSelector()
Returns the selector used to find the Pod
to which this service is routing
|
int |
getTargetPort() |
void |
setPort(int port)
Sets the exposed port that is mapped to a
running image
|
void |
setPorts(List<IServicePort> ports)
Set the collection of ports for the service
|
void |
setSelector(Map<String,String> selector)
Sets the container name that the service
routes traffic to.
|
void |
setSelector(String key,
String value)
Convenience method for setting a selector that has
a singular key/value pair.
|
void |
setTargetPort(int port)
Sets the container port exposed by the image
|
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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddLabel, getAnnotation, getAnnotations, getApiVersion, getCapabilities, getCreationTimeStamp, getKind, getLabels, getName, getNamespace, getProject, isAnnotatedWith, setAnnotation, toJson, toJsonaccept, getCapability, supportspublic void setPort(int port)
IServicepublic int getPort()
IServicepublic List<IServicePort> getPorts()
IServicepublic void setPorts(List<IServicePort> ports)
IServicepublic Map<String,String> getSelector()
IServicegetSelector in interface IServicepublic void setSelector(Map<String,String> selector)
IServicesetSelector in interface IServicepublic void setSelector(String key, String value)
IServicesetSelector in interface IServicepublic void setTargetPort(int port)
IServicesetTargetPort in interface IServicepublic int getTargetPort()
getTargetPort in interface IServicepublic String getPortalIP()
IServicegetPortalIP in interface IServiceCopyright © 2016 Red Hat, Inc. All rights reserved.