类 Tiller
- java.lang.Object
-
- org.microbean.helm.Tiller
-
- 所有已实现的接口:
io.fabric8.kubernetes.client.ConfigAware<io.fabric8.kubernetes.client.Config>,Closeable,AutoCloseable
public class Tiller extends Object implements io.fabric8.kubernetes.client.ConfigAware<io.fabric8.kubernetes.client.Config>, Closeable
A convenience class for communicating with a Tiller server.- 作者:
- Laird Nelson
- 另请参阅:
ReleaseServiceGrpc
-
-
字段概要
字段 修饰符和类型 字段 说明 static Map<String,String>DEFAULT_LABELSThe Kubernetes labels with which most Tiller instances are annotated.static StringDEFAULT_NAMESPACEThe Kubernetes namespace into which Tiller server instances are most commonly installed.static intDEFAULT_PORTThe port on which Tiller server instances most commonly listen.static intMAX_MESSAGE_SIZEThe maximum size, in bytes, that messages destined for Tiller may be.static StringVERSIONThe version of TillerTillerinstances expect.
-
构造器概要
构造器 构造器 说明 Tiller(io.fabric8.kubernetes.client.LocalPortForward portForward)Creates a newTillerthat will use information from the suppliedLocalPortForwardto establish a communications channel with the Tiller server.Tiller(io.grpc.ManagedChannel channel)Creates a newTillerthat will use the suppliedManagedChannelfor communication.Tiller(T client)Creates a newTillerthat will forward a local port to port44134on a Pod housing Tiller in thekube-systemnamespace running in the Kubernetes cluster with which the suppliedKubernetesClientis capable of communicating.Tiller(T client, String namespaceHousingTiller)Creates a newTillerthat will forward a local port to port44134on a Pod housing Tiller in the supplied namespace running in the Kubernetes cluster with which the suppliedKubernetesClientis capable of communicating.Tiller(T client, String namespaceHousingTiller, int tillerPort, Map<String,String> tillerLabels)Creates a newTillerthat 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 suppliedKubernetesClientis capable of communicating.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected @Issue(id="42",uri="https://github.com/microbean/microbean-helm/issues/42") io.grpc.ManagedChannelbuildChannel(io.fabric8.kubernetes.client.LocalPortForward portForward)Creates aManagedChannelfor communication with Tiller from the information contained in the suppliedLocalPortForward.voidclose()io.fabric8.kubernetes.client.ConfiggetConfiguration()Returns anyConfigavailable at construction time.io.grpc.health.v1.HealthGrpc.HealthBlockingStubgetHealthBlockingStub()io.grpc.health.v1.HealthGrpc.HealthFutureStubgetHealthFutureStub()io.grpc.health.v1.HealthGrpc.HealthStubgetHealthStub()ReleaseServiceGrpc.ReleaseServiceBlockingStubgetReleaseServiceBlockingStub()Returns the gRPC-generatedReleaseServiceGrpc.ReleaseServiceBlockingStubobject that represents the capabilities of the Tiller server.ReleaseServiceGrpc.ReleaseServiceFutureStubgetReleaseServiceFutureStub()Returns the gRPC-generatedReleaseServiceGrpc.ReleaseServiceFutureStubobject that represents the capabilities of the Tiller server.ReleaseServiceGrpc.ReleaseServiceStubgetReleaseServiceStub()Returns the gRPC-generatedReleaseServiceGrpc.ReleaseServiceStubobject that represents the capabilities of the Tiller server.VersionOuterClass.VersionOrBuildergetVersion()
-
-
-
字段详细资料
-
VERSION
public static final String VERSION
The version of TillerTillerinstances expect.This field is never
null.- 另请参阅:
- 常量字段值
-
DEFAULT_NAMESPACE
public static final String DEFAULT_NAMESPACE
The Kubernetes namespace into which Tiller server instances are most commonly installed.This field is never
null.- 另请参阅:
- 常量字段值
-
DEFAULT_PORT
public static final int DEFAULT_PORT
The port on which Tiller server instances most commonly listen.- 另请参阅:
- 常量字段值
-
DEFAULT_LABELS
public static final Map<String,String> DEFAULT_LABELS
The Kubernetes labels with which most Tiller instances are annotated.This field is never
null.
-
MAX_MESSAGE_SIZE
public static final int MAX_MESSAGE_SIZE
The maximum size, in bytes, that messages destined for Tiller may be.- 另请参阅:
- 常量字段值
-
-
构造器详细资料
-
Tiller
public Tiller(io.grpc.ManagedChannel channel)
Creates a newTillerthat will use the suppliedManagedChannelfor communication.- 参数:
channel- theManagedChannelover which communications will be conducted; must not benull- 抛出:
NullPointerException- ifchannelisnull
-
Tiller
public Tiller(io.fabric8.kubernetes.client.LocalPortForward portForward)
Creates a newTillerthat will use information from the suppliedLocalPortForwardto establish a communications channel with the Tiller server.- 参数:
portForward- theLocalPortForwardto use; must not benull- 抛出:
NullPointerException- ifportForwardisnull
-
Tiller
public Tiller(T client) throws MalformedURLExceptionCreates a newTillerthat will forward a local port to port44134on a Pod housing Tiller in thekube-systemnamespace running in the Kubernetes cluster with which the suppliedKubernetesClientis capable of communicating.The first ready Pod with a
namelabel whose value istillerand with anapplabel whose value ishelmis deemed to be the pod housing the Tiller instance to connect to. (This duplicates the default logic of thehelmcommand line executable.)- 类型参数:
T- aKubernetesClientimplementation that is also anHttpClientAwareimplementation, such asDefaultKubernetesClient- 参数:
client- theKubernetesClient-and-HttpClientAwareimplementation that can communicate with a Kubernetes cluster; must not benull- 抛出:
MalformedURLException- if there was a problem identifying a Pod within the cluster that houses a Tiller instanceNullPointerException- ifclientisnull
-
Tiller
public Tiller(T client, String namespaceHousingTiller) throws MalformedURLExceptionCreates a newTillerthat will forward a local port to port44134on a Pod housing Tiller in the supplied namespace running in the Kubernetes cluster with which the suppliedKubernetesClientis capable of communicating.The first ready Pod with a
namelabel whose value istillerand with anapplabel whose value ishelmis deemed to be the pod housing the Tiller instance to connect to. (This duplicates the default logic of thehelmcommand line executable.)- 类型参数:
T- aKubernetesClientimplementation that is also anHttpClientAwareimplementation, such asDefaultKubernetesClient- 参数:
client- theKubernetesClient-and-HttpClientAwareimplementation that can communicate with a Kubernetes cluster; must not benull; no reference to this object is retained by thisTillerinstancenamespaceHousingTiller- the namespace within which a Tiller instance is hopefully running; ifnull, then the value ofDEFAULT_NAMESPACEwill be used instead- 抛出:
MalformedURLException- if there was a problem identifying a Pod within the cluster that houses a Tiller instanceNullPointerException- ifclientisnullio.fabric8.kubernetes.client.KubernetesClientException- if there was a problem connecting to KubernetesTillerException- if a ready Tiller pod could not be found and consequently a connection could not be established
-
Tiller
public Tiller(T client, String namespaceHousingTiller, int tillerPort, Map<String,String> tillerLabels) throws MalformedURLExceptionCreates a newTillerthat 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 suppliedKubernetesClientis capable of communicating.The first ready Pod with labels matching the supplied
tillerLabelsis deemed to be the pod housing the Tiller instance to connect to.- 类型参数:
T- aKubernetesClientimplementation that is also anHttpClientAwareimplementation, such asDefaultKubernetesClient- 参数:
client- theKubernetesClient-and-HttpClientAwareimplementation that can communicate with a Kubernetes cluster; must not benull; no reference to this object is retained by thisTillerinstancenamespaceHousingTiller- the namespace within which a Tiller instance is hopefully running; ifnull, then the value ofDEFAULT_NAMESPACEwill be used insteadtillerPort- the remote port to attempt to forward a local port to; normally44134tillerLabels- aMaprepresenting the Kubernetes labels (and their values) identifying a Pod housing a Tiller instance; ifnullthen the value ofDEFAULT_LABELSwill be used instead- 抛出:
MalformedURLException- if there was a problem identifying a Pod within the cluster that houses a Tiller instanceNullPointerException- ifclientisnullio.fabric8.kubernetes.client.KubernetesClientException- if there was a problem connecting to KubernetesTillerException- if a ready Tiller pod could not be found and consequently a connection could not be established
-
-
方法详细资料
-
getConfiguration
public io.fabric8.kubernetes.client.Config getConfiguration()
Returns anyConfigavailable at construction time.This method may return
null.- 指定者:
getConfiguration在接口中io.fabric8.kubernetes.client.ConfigAware<io.fabric8.kubernetes.client.Config>- 返回:
- a
Config, ornull
-
buildChannel
@Issue(id="42", uri="https://github.com/microbean/microbean-helm/issues/42") protected @Issue(id="42",uri="https://github.com/microbean/microbean-helm/issues/42") io.grpc.ManagedChannel buildChannel(io.fabric8.kubernetes.client.LocalPortForward portForward)Creates aManagedChannelfor communication with Tiller from the information contained in the suppliedLocalPortForward.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- aLocalPortForward; must not benull- 返回:
- a non-
nullManagedChannel - 抛出:
NullPointerException- ifportForwardisnullIllegalArgumentException- ifportForward'sLocalPortForward.getLocalAddress()method returnsnull
-
close
public void close() throws IOExceptionCloses thisTillerafter use; anyLocalPortForwardorManagedChannelused or created by or for thisTillerinstance will be closed or shut down appropriately.- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable- 抛出:
IOException- if there was a problem closing the underlying connection to a Tiller instance- 另请参阅:
Closeable.close(),ManagedChannel.shutdown()
-
getReleaseServiceBlockingStub
public ReleaseServiceGrpc.ReleaseServiceBlockingStub getReleaseServiceBlockingStub()
Returns the gRPC-generatedReleaseServiceGrpc.ReleaseServiceBlockingStubobject that represents the capabilities of the Tiller server.This method will never return
null.Overrides of this method must never return
null.
-
getReleaseServiceFutureStub
public ReleaseServiceGrpc.ReleaseServiceFutureStub getReleaseServiceFutureStub()
Returns the gRPC-generatedReleaseServiceGrpc.ReleaseServiceFutureStubobject that represents the capabilities of the Tiller server.This method will never return
null.Overrides of this method must never return
null.- 返回:
- a non-
nullReleaseServiceGrpc.ReleaseServiceFutureStub - 另请参阅:
ReleaseServiceGrpc.ReleaseServiceFutureStub
-
getReleaseServiceStub
public ReleaseServiceGrpc.ReleaseServiceStub getReleaseServiceStub()
Returns the gRPC-generatedReleaseServiceGrpc.ReleaseServiceStubobject that represents the capabilities of the Tiller server.This method will never return
null.Overrides of this method must never return
null.- 返回:
- a non-
nullReleaseServiceGrpc.ReleaseServiceStub - 另请参阅:
ReleaseServiceGrpc.ReleaseServiceStub
-
getHealthBlockingStub
public io.grpc.health.v1.HealthGrpc.HealthBlockingStub getHealthBlockingStub()
-
getHealthFutureStub
public io.grpc.health.v1.HealthGrpc.HealthFutureStub getHealthFutureStub()
-
getHealthStub
public io.grpc.health.v1.HealthGrpc.HealthStub getHealthStub()
-
getVersion
public VersionOuterClass.VersionOrBuilder getVersion() throws IOException
- 抛出:
IOException
-
-