public class Tiller extends Object implements ConfigAware<Config>, Closeable
ReleaseServiceGrpc| Modifier and Type | Field and Description |
|---|---|
static Map<String,String> |
DEFAULT_LABELS
The Kubernetes labels with which most Tiller instances are
annotated.
|
static String |
DEFAULT_NAMESPACE
The Kubernetes namespace into which Tiller server instances are
most commonly installed.
|
static int |
DEFAULT_PORT
The port on which Tiller server instances most commonly listen.
|
static String |
VERSION
The version of Tiller
Tiller instances expect. |
| Constructor and Description |
|---|
Tiller(LocalPortForward portForward)
Creates a new
Tiller that will use information from the
supplied LocalPortForward to establish a communications
channel with the Tiller server. |
Tiller(io.grpc.ManagedChannel channel)
Creates a new
Tiller that will use the supplied ManagedChannel for communication. |
Tiller(T client)
Creates a new
Tiller that will forward a local port to
port 44134 on a Pod housing Tiller in the kube-system namespace running in the Kubernetes cluster with
which the supplied KubernetesClient is capable of
communicating. |
Tiller(T client,
String namespaceHousingTiller)
Creates a new
Tiller that will forward a local port to
port 44134 on a Pod housing Tiller in the supplied
namespace running in the Kubernetes cluster with which the
supplied KubernetesClient is capable of communicating. |
Tiller(T client,
String namespaceHousingTiller,
int tillerPort,
Map<String,String> tillerLabels)
Creates a new
Tiller that will forward a local port to
the supplied (remote) port on a Pod housing Tiller in the supplied
namespace running in the Kubernetes cluster with which the
supplied KubernetesClient is capable of communicating. |
| Modifier and Type | Method and Description |
|---|---|
protected io.grpc.ManagedChannel |
buildChannel(LocalPortForward portForward)
Creates a
ManagedChannel for communication with Tiller
from the information contained in the supplied LocalPortForward. |
void |
close()
Closes this
Tiller after use; any LocalPortForward or ManagedChannel used or
created by or for this Tiller instance will be
closed or shut down
appropriately. |
Config |
getConfiguration()
Returns any
Config available at construction time. |
ReleaseServiceGrpc.ReleaseServiceBlockingStub |
getReleaseServiceBlockingStub()
Returns the gRPC-generated
ReleaseServiceGrpc.ReleaseServiceBlockingStub
object that represents the capabilities of the Tiller server. |
ReleaseServiceGrpc.ReleaseServiceFutureStub |
getReleaseServiceFutureStub()
Returns the gRPC-generated
ReleaseServiceGrpc.ReleaseServiceFutureStub
object that represents the capabilities of the Tiller server. |
ReleaseServiceGrpc.ReleaseServiceStub |
getReleaseServiceStub()
Returns the gRPC-generated
ReleaseServiceGrpc.ReleaseServiceStub
object that represents the capabilities of the Tiller server. |
VersionOuterClass.VersionOrBuilder |
getVersion() |
public static final String VERSION
Tiller instances expect.
This field is never null.
public static final String DEFAULT_NAMESPACE
This field is never null.
public static final int DEFAULT_PORT
public static final Map<String,String> DEFAULT_LABELS
This field is never null.
public Tiller(io.grpc.ManagedChannel channel)
Tiller that will use the supplied ManagedChannel for communication.channel - the ManagedChannel over which
communications will be conducted; must not be nullNullPointerException - if channel is nullpublic Tiller(LocalPortForward portForward)
Tiller that will use information from the
supplied LocalPortForward to establish a communications
channel with the Tiller server.portForward - the LocalPortForward to use; must not
be nullNullPointerException - if portForward is nullpublic Tiller(T client) throws MalformedURLException
Tiller that will forward a local port to
port 44134 on a Pod housing Tiller in the kube-system namespace running in the Kubernetes cluster with
which the supplied KubernetesClient is capable of
communicating.
The first ready
Pod with a name label whose value is tiller and
with an app label whose value is helm is deemed
to be the pod housing the Tiller instance to connect to. (This
duplicates the default logic of the helm command line
executable.)
T - a KubernetesClient implementation that is also
an HttpClientAware implementation, such as DefaultKubernetesClientclient - the KubernetesClient-and-HttpClientAware implementation that can communicate with a
Kubernetes cluster; must not be nullMalformedURLException - if there was a problem
identifying a Pod within the cluster that houses a Tiller instanceNullPointerException - if client is nullpublic Tiller(T client, String namespaceHousingTiller) throws MalformedURLException
Tiller that will forward a local port to
port 44134 on a Pod housing Tiller in the supplied
namespace running in the Kubernetes cluster with which the
supplied KubernetesClient is capable of communicating.
The first ready
Pod with a name label whose value is tiller and
with an app label whose value is helm is deemed
to be the pod housing the Tiller instance to connect to. (This
duplicates the default logic of the helm command line
executable.)
T - a KubernetesClient implementation that is also
an HttpClientAware implementation, such as DefaultKubernetesClientclient - the KubernetesClient-and-HttpClientAware implementation that can communicate with a
Kubernetes cluster; must not be null; no reference to
this object is retained by this Tiller instancenamespaceHousingTiller - the namespace within which a Tiller
instance is hopefully running; if null, then the value of
DEFAULT_NAMESPACE will be used insteadMalformedURLException - if there was a problem
identifying a Pod within the cluster that houses a Tiller instanceNullPointerException - if client is nullpublic Tiller(T client, String namespaceHousingTiller, int tillerPort, Map<String,String> tillerLabels) throws MalformedURLException
Tiller that will forward a local port to
the supplied (remote) port on a Pod housing Tiller in the supplied
namespace running in the Kubernetes cluster with which the
supplied KubernetesClient is capable of communicating.
The first ready
Pod with labels matching the supplied tillerLabels is
deemed to be the pod housing the Tiller instance to connect
to.
T - a KubernetesClient implementation that is also
an HttpClientAware implementation, such as DefaultKubernetesClientclient - the KubernetesClient-and-HttpClientAware implementation that can communicate with a
Kubernetes cluster; must not be null; no reference to
this object is retained by this Tiller instancenamespaceHousingTiller - the namespace within which a Tiller
instance is hopefully running; if null, then the value of
DEFAULT_NAMESPACE will be used insteadtillerPort - the remote port to attempt to forward a local
port to; normally 44134tillerLabels - a Map representing the Kubernetes
labels (and their values) identifying a Pod housing a Tiller
instance; if null then the value of DEFAULT_LABELS will be used insteadMalformedURLException - if there was a problem
identifying a Pod within the cluster that houses a Tiller instanceNullPointerException - if client is nullpublic Config getConfiguration()
Config available at construction time.
This method may return null.
getConfiguration in interface ConfigAware<Config>Config, or nullprotected io.grpc.ManagedChannel buildChannel(LocalPortForward portForward)
ManagedChannel for communication with Tiller
from the information contained in the supplied LocalPortForward.
Note: This method is (deliberately) called from constructors so must have stateless semantics.
This method never returns null.
Overrides of this method must not return null.
portForward - a LocalPortForward; must not be nullnull ManagedChannelNullPointerException - if portForward is nullpublic void close() throws IOException
Tiller after use; any LocalPortForward or ManagedChannel used or
created by or for this Tiller instance will be
closed or shut down
appropriately.close in interface Closeableclose in interface AutoCloseableIOException - if there was a problem closing the
underlying connection to a Tiller instanceCloseable.close(),
ManagedChannel.shutdown()public ReleaseServiceGrpc.ReleaseServiceBlockingStub getReleaseServiceBlockingStub()
ReleaseServiceGrpc.ReleaseServiceBlockingStub
object that represents the capabilities of the Tiller server.
This method will never return null.
Overrides of this method must never return null.
null ReleaseServiceGrpc.ReleaseServiceBlockingStubReleaseServiceGrpc.ReleaseServiceBlockingStubpublic ReleaseServiceGrpc.ReleaseServiceFutureStub getReleaseServiceFutureStub()
ReleaseServiceGrpc.ReleaseServiceFutureStub
object that represents the capabilities of the Tiller server.
This method will never return null.
Overrides of this method must never return null.
null ReleaseServiceGrpc.ReleaseServiceFutureStubReleaseServiceGrpc.ReleaseServiceFutureStubpublic ReleaseServiceGrpc.ReleaseServiceStub getReleaseServiceStub()
ReleaseServiceGrpc.ReleaseServiceStub
object that represents the capabilities of the Tiller server.
This method will never return null.
Overrides of this method must never return null.
null ReleaseServiceGrpc.ReleaseServiceStubReleaseServiceGrpc.ReleaseServiceStubpublic VersionOuterClass.VersionOrBuilder getVersion() throws IOException
IOExceptionCopyright © 2017–2017, MicroBean. All rights reserved.