@Experimental public class TillerInstaller extends Object
helm init command.
In general, this class follows the logic as expressed in the
install.go source code from the Helm project,
problematic or not. The intent is to have an installer, usable as
an idiomatic Java library, that behaves just like helm
init.
Note: This class is experimental and its API is subject to change without notice.
init(),
The
{@code install.go} source code from the Helm project| Modifier and Type | Class and Description |
|---|---|
static class |
TillerInstaller.ImagePullPolicy
An
enum representing valid values for a Kubernetes imagePullPolicy field. |
| Modifier and Type | Field and Description |
|---|---|
static String |
VERSION
The version of Tiller to install.
|
| Constructor and Description |
|---|
TillerInstaller()
Creates a new
TillerInstaller, using a new DefaultKubernetesClient. |
TillerInstaller(KubernetesClient kubernetesClient)
Creates a new
TillerInstaller. |
| Modifier and Type | Method and Description |
|---|---|
protected Container |
createContainer(String imageName,
TillerInstaller.ImagePullPolicy imagePullPolicy,
String namespace,
boolean tls,
boolean verifyTls) |
protected Deployment |
createDeployment(String namespace,
String deploymentName,
Map<String,String> labels,
String serviceAccountName,
String imageName,
TillerInstaller.ImagePullPolicy imagePullPolicy,
boolean hostNetwork,
boolean tls,
boolean verifyTls) |
protected DeploymentSpec |
createDeploymentSpec(Map<String,String> labels,
String serviceAccountName,
String imageName,
TillerInstaller.ImagePullPolicy imagePullPolicy,
String namespace,
boolean hostNetwork,
boolean tls,
boolean verifyTls) |
protected Secret |
createSecret(String namespace,
URI tlsKeyUri,
URI tlsCertUri,
URI tlsCaCertUri,
Map<String,String> labels) |
protected Service |
createService(String namespace,
String serviceName,
Map<String,String> labels) |
protected ServiceSpec |
createServiceSpec(Map<String,String> labels) |
void |
init() |
void |
init(boolean upgrade) |
void |
init(boolean upgrade,
String namespace,
String deploymentName,
String serviceName,
Map<String,String> labels,
String serviceAccountName,
String imageName,
TillerInstaller.ImagePullPolicy imagePullPolicy,
boolean hostNetwork,
boolean tls,
boolean verifyTls,
URI tlsKeyUri,
URI tlsCertUri,
URI tlsCaCertUri)
|
void |
install() |
void |
install(String namespace,
String deploymentName,
String serviceName,
Map<String,String> labels,
String serviceAccountName,
String imageName,
TillerInstaller.ImagePullPolicy imagePullPolicy,
boolean hostNetwork,
boolean tls,
boolean verifyTls,
URI tlsKeyUri,
URI tlsCertUri,
URI tlsCaCertUri) |
protected static String |
normalizeDeploymentName(String deploymentName) |
protected static String |
normalizeImageName(String imageName) |
protected static Map<String,String> |
normalizeLabels(Map<String,String> labels) |
protected String |
normalizeNamespace(String namespace) |
protected static String |
normalizeServiceAccountName(String serviceAccountName) |
protected static String |
normalizeServiceName(String serviceName) |
void |
upgrade() |
void |
upgrade(String namespace,
String deploymentName,
String serviceName,
String serviceAccountName,
String imageName,
TillerInstaller.ImagePullPolicy imagePullPolicy,
Map<String,String> labels) |
public static final String VERSION
public TillerInstaller()
TillerInstaller, using a new DefaultKubernetesClient.TillerInstaller(KubernetesClient)public TillerInstaller(KubernetesClient kubernetesClient)
TillerInstaller.kubernetesClient - the KubernetesClient to use to
communicate with Kubernetes; must not be nullNullPointerException - if kubernetesClient is
nullpublic void init()
public void init(boolean upgrade)
public void init(boolean upgrade, String namespace, String deploymentName, String serviceName, Map<String,String> labels, String serviceAccountName, String imageName, TillerInstaller.ImagePullPolicy imagePullPolicy, boolean hostNetwork, boolean tls, boolean verifyTls, URI tlsKeyUri, URI tlsCertUri, URI tlsCaCertUri) throws IOException
upgrade is
false, or upgrading the Tiller
installation if upgrade is true and a newer
version of Tiller is available.upgrade - whether or not to attempt an upgrade if Tiller is
already installednamespace - the Kubernetes namespace into which Tiller will
be installed, if it is not already installed; may be null
in which case a default will be useddeploymentName - the name that the Kubernetes Deployment
representing Tiller will have; may be null; tiller-deploy by defaultserviceName - the name that the Kubernetes Service
representing Tiller will have; may be null; tiller-deploy (yes, tiller-deploy) by defaultlabels - the Kubernetes Labels that will be applied to
various Kubernetes resources representing Tiller; may be null in which case a Map consisting of a label of app with a value of helm and a label of name
with a value of tiller will be used insteadserviceAccountName - the name of the Kubernetes Service
Account that Tiller should use; may be null in which case
the default Service Account will be used insteadimageName - the name of the Docker image that contains the
Tiller code; may be null in which case gcr.io/kubernetes-helm/tiller:v2.5.0 will be used insteadimagePullPolicy - an TillerInstaller.ImagePullPolicy specifying how
the Tiller image should be pulled; may be null in which
case TillerInstaller.ImagePullPolicy.IF_NOT_PRESENT will be used insteadhostNetwork - the value to be used for the hostNetwork
property of the Tiller Pod's PodSpectls - whether Tiller's conversations with Kubernetes will be
encrypted using TLSverifyTls - whether, if and only if tls is true, additional TLS-related verification will be performedtlsKeyUri - a URI to the public key used during TLS
communication with Kubernetes; may be null if tls
is falsetlsCertUri - a URI to the certificate used during
TLS communication with Kubernetes; may be null if tls is falsetlsCaCertUri - a URI to the certificate authority
used during TLS communication with Kubernetes; may be null if tls is falseIOException - if a communication error occursinstall(String, String, String, Map, String, String,
ImagePullPolicy, boolean, boolean, boolean, URI, URI, URI),
upgrade(String, String, String, String, String,
ImagePullPolicy, Map)public void install()
public void install(String namespace, String deploymentName, String serviceName, Map<String,String> labels, String serviceAccountName, String imageName, TillerInstaller.ImagePullPolicy imagePullPolicy, boolean hostNetwork, boolean tls, boolean verifyTls, URI tlsKeyUri, URI tlsCertUri, URI tlsCaCertUri) throws IOException
IOExceptionpublic void upgrade()
public void upgrade(String namespace, String deploymentName, String serviceName, String serviceAccountName, String imageName, TillerInstaller.ImagePullPolicy imagePullPolicy, Map<String,String> labels)
protected Service createService(String namespace, String serviceName, Map<String,String> labels)
protected Deployment createDeployment(String namespace, String deploymentName, Map<String,String> labels, String serviceAccountName, String imageName, TillerInstaller.ImagePullPolicy imagePullPolicy, boolean hostNetwork, boolean tls, boolean verifyTls)
protected Secret createSecret(String namespace, URI tlsKeyUri, URI tlsCertUri, URI tlsCaCertUri, Map<String,String> labels) throws IOException
IOExceptionprotected DeploymentSpec createDeploymentSpec(Map<String,String> labels, String serviceAccountName, String imageName, TillerInstaller.ImagePullPolicy imagePullPolicy, String namespace, boolean hostNetwork, boolean tls, boolean verifyTls)
protected Container createContainer(String imageName, TillerInstaller.ImagePullPolicy imagePullPolicy, String namespace, boolean tls, boolean verifyTls)
protected ServiceSpec createServiceSpec(Map<String,String> labels)
protected final String normalizeNamespace(String namespace)
protected static final Map<String,String> normalizeLabels(Map<String,String> labels)
protected static final String normalizeDeploymentName(String deploymentName)
protected static final String normalizeImageName(String imageName)
protected static final String normalizeServiceAccountName(String serviceAccountName)
protected static final String normalizeServiceName(String serviceName)
Copyright © 2017–2017, MicroBean. All rights reserved.