类 TillerInstaller

    • 字段详细资料

      • VERSION

        public static final String VERSION
        The version of Tiller to install.
        另请参阅:
        常量字段值
    • 构造器详细资料

      • TillerInstaller

        public TillerInstaller​(io.fabric8.kubernetes.client.KubernetesClient kubernetesClient)
        Creates a new TillerInstaller.
        参数:
        kubernetesClient - the KubernetesClient to use to communicate with Kubernetes; must not be null
        另请参阅:
        TillerInstaller(KubernetesClient, String)
      • TillerInstaller

        public TillerInstaller​(io.fabric8.kubernetes.client.KubernetesClient kubernetesClient,
                               String tillerNamespace)
        Creates a new TillerInstaller.
        参数:
        kubernetesClient - the KubernetesClient to use to communicate with Kubernetes; must not be null
        tillerNamespace - the namespace into which to install Tiller; may be null in which case the value of the TILLER_NAMESPACE environment variable will be used—if that is null then kube-system will be used instead
    • 方法详细资料

      • init

        public void init()
      • init

        public void init​(boolean upgrade)
      • init

        public void init​(boolean upgrade,
                         long tillerConnectionTimeout)
      • init

        public void init​(boolean upgrade,
                         String namespace,
                         String deploymentName,
                         String serviceName,
                         Map<String,​String> labels,
                         Map<String,​String> nodeSelector,
                         String serviceAccountName,
                         String imageName,
                         TillerInstaller.ImagePullPolicy imagePullPolicy,
                         int maxHistory,
                         boolean hostNetwork,
                         boolean tls,
                         boolean verifyTls,
                         URI tlsKeyUri,
                         URI tlsCertUri,
                         URI tlsCaCertUri,
                         long tillerConnectionTimeout)
                  throws IOException
        Attempts to install Tiller into the Kubernetes cluster, silently returning if Tiller is already installed and 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 installed
        namespace - 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 used
        deploymentName - the name that the Kubernetes Deployment representing Tiller will have; may be null; tiller-deploy by default
        serviceName - the name that the Kubernetes Service representing Tiller will have; may be null; tiller-deploy (yes, tiller-deploy) by default
        labels - 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 instead
        nodeSelector - a Map representing labels that will be written as a node selector; may be null
        serviceAccountName - the name of the Kubernetes Service Account that Tiller should use; may be null in which case the default Service Account will be used instead
        imageName - the name of the Docker image that contains the Tiller code; may be null in which case the Java String "gcr.io/kubernetes-helm/tiller:v" + "2.8.2" will be used instead
        imagePullPolicy - 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 instead
        maxHistory - the maximum number of release versions stored per release; a value that is less than or equal to zero means there is effectively no limit
        hostNetwork - the value to be used for the hostNetworkproperty of the Tiller Pod's PodSpec
        tls - whether Tiller's conversations with Kubernetes will be encrypted using TLS
        verifyTls - whether, if and only if tls is true , additional TLS-related verification will be performed
        tlsKeyUri - a URI to the public key used during TLS communication with Kubernetes; may be null if tls is false
        tlsCertUri - a URI to the certificate used during TLS communication with Kubernetes; may be null if tls is false
        tlsCaCertUri - a URI to the certificate authority used during TLS communication with Kubernetes; may be null if tls is false
        tillerConnectionTimeout - the number of milliseconds to wait for a Tiller pod to become ready; if less than 0 no wait will occur
        抛出:
        IOException - if a communication error occurs
        另请参阅:
        install(String, String, String, Map, Map, String, String, ImagePullPolicy, int, boolean, boolean, boolean, URI, URI, URI), upgrade(String, String, String, String, String, ImagePullPolicy, Map)
      • install

        public void install()
      • upgrade

        public void upgrade()
      • createService

        protected io.fabric8.kubernetes.api.model.Service createService​(String namespace,
                                                                        String serviceName,
                                                                        Map<String,​String> labels)
      • createContainer

        protected io.fabric8.kubernetes.api.model.Container createContainer​(String imageName,
                                                                            TillerInstaller.ImagePullPolicy imagePullPolicy,
                                                                            int maxHistory,
                                                                            String namespace,
                                                                            boolean tls,
                                                                            boolean verifyTls)
      • createServiceSpec

        protected io.fabric8.kubernetes.api.model.ServiceSpec createServiceSpec​(Map<String,​String> labels)
      • normalizeNamespace

        protected final String normalizeNamespace​(String namespace)
      • ping

        protected final <T extends io.fabric8.kubernetes.client.HttpClientAware & io.fabric8.kubernetes.client.KubernetesClient> void ping​(String namespace,
                                                                                                                                           Map<String,​String> labels,
                                                                                                                                           long timeoutInMilliseconds)
                                                                                                                                    throws MalformedURLException
        If the supplied timeoutInMilliseconds is zero or greater, waits for there to be a Ready Tiller pod and then contacts its health endpoint.

        If the Tiller pod is healthy this method will return normally.

        参数:
        namespace - the namespace housing Tiller; may be null in which case a default will be used
        labels - the Kubernetes labels that will be used to find running Tiller pods; 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 instead
        timeoutInMilliseconds - the number of milliseconds to wait for a Tiller pod to become ready; if less than 0 no wait will occur and this method will return immediately
        抛出:
        io.fabric8.kubernetes.client.KubernetesClientException - if there was a problem connecting to Kubernetes
        MalformedURLException - if there was a problem forwarding a port to Tiller
        TillerPollingDeadlineExceededException - if Tiller could not be contacted in time
        MalformedURLException - if Tiller was not healthy
      • isTillerPodReady

        protected final boolean isTillerPodReady​(String namespace,
                                                 Map<String,​String> labels,
                                                 long timeoutInMilliseconds)
        Returns true if there is a running Tiller pod that is Ready, waiting for a particular amount of time for this result.
        参数:
        namespace - the namespace housing Tiller; may be null in which case a default will be used instead
        labels - labels identifying Tiller pods; may be null in which case a default set will be used instead
        timeoutInMilliseconds - the number of milliseconds to wait for a result; if 0, this method will block and wait forever; if less than 0 this method will take no action and will return false
        返回:
        true if there is a running Tiller pod that is Ready; false otherwise
        抛出:
        io.fabric8.kubernetes.client.KubernetesClientException - if there was a problem communicating with Kubernetes
      • normalizeDeploymentName

        protected static final String normalizeDeploymentName​(String deploymentName)
      • normalizeImageName

        protected static final String normalizeImageName​(String imageName)
      • normalizeServiceAccountName

        protected static final String normalizeServiceAccountName​(String serviceAccountName)
      • normalizeServiceName

        protected static final String normalizeServiceName​(String serviceName)