juju: github.com/juju/juju/caas/kubernetes/clientconfig Index | Files

package clientconfig

import "github.com/juju/juju/caas/kubernetes/clientconfig"


Package Files

k8s.go plugins.go types.go

func EnsureK8sCredential Uses

func EnsureK8sCredential(config *clientcmdapi.Config, contextName string) (*clientcmdapi.Config, error)

EnsureK8sCredential ensures juju admin service account created with admin cluster role binding setup.

func GetKubeConfigPath Uses

func GetKubeConfigPath() string

GetKubeConfigPath - define kubeconfig file path to use

type ClientConfig Uses

type ClientConfig struct {
    Type           string
    Contexts       map[string]Context
    CurrentContext string
    Clouds         map[string]CloudConfig
    Credentials    map[string]cloud.Credential

ClientConfig - a set of cloud endpoint info and user credentials Clouds and user Credentials are joined by Contexts. There should always be a valid Context with same name as the CurrentContext string.

func NewK8sClientConfig Uses

func NewK8sClientConfig(reader io.Reader, contextName, clusterName string, credentialResolver K8sCredentialResolver) (*ClientConfig, error)

NewK8sClientConfig returns a new Kubernetes client, reading the config from the specified reader.

type ClientConfigFunc Uses

type ClientConfigFunc func(io.Reader, string, string, K8sCredentialResolver) (*ClientConfig, error)

ClientConfigFunc is a function that returns a ClientConfig. Functions of this type should be available for each supported CAAS framework, e.g. Kubernetes.

func NewClientConfigReader Uses

func NewClientConfigReader(cloudType string) (ClientConfigFunc, error)

NewClientConfigReader returns a function of type ClientConfigFunc to read the client config for a given cloud type.

type CloudConfig Uses

type CloudConfig struct {
    Endpoint   string
    Attributes map[string]interface{}

CloudConfig stores information about how to connect to a Cloud.

type Context Uses

type Context struct {
    CloudName      string
    CredentialName string

Context joins Clouds and Credentials.

type K8sCredentialResolver Uses

type K8sCredentialResolver func(config *clientcmdapi.Config, contextName string) (*clientcmdapi.Config, error)

K8sCredentialResolver defines the function for resolving non supported k8s credential.

Package clientconfig imports 15 packages (graph) and is imported by 4 packages. Updated 2019-08-23. Refresh now. Tools for package owners.