Documentation ¶
Index ¶
- func BuildDynamicClient(bbConfig *bbConfig.GlobalConfiguration) (dynamic.Interface, error)
- func BuildKubeConfig(bbConfig *bbConfig.GlobalConfiguration) (*restClient.Config, error)
- func CreateJob(client kubernetes.Interface, namespace string, jobDesc *JobDesc) (*batchV1.Job, error)
- func CreateNamespace(k8sInterface kubernetes.Interface, namespace string) (*coreV1.Namespace, error)
- func CreateRegistrySecret(k8sInterface kubernetes.Interface, namespace string, name string, ...) (*coreV1.Secret, error)
- func DeleteNamespace(k8sInterface kubernetes.Interface, namespace string) error
- func DeleteRegistrySecret(k8sInterface kubernetes.Interface, namespace string, name string) error
- func GetIOStream() genericIOOptions.IOStreams
- func GetKubeConfigFromPathList(configPaths string) (*restClient.Config, error)
- type DockerConfig
- type DockerConfigEntry
- type DockerConfigJSON
- type JobDesc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDynamicClient ¶
func BuildDynamicClient(bbConfig *bbConfig.GlobalConfiguration) (dynamic.Interface, error)
BuildDynamicClientFromFlags is a helper function that builds a dynamic client used to interact with the k8s cluster.
func BuildKubeConfig ¶
func BuildKubeConfig(bbConfig *bbConfig.GlobalConfiguration) (*restClient.Config, error)
BuildKubeConfigFromFlags - is a helper function that builds config object used to interact with the k8s cluster. The configuration is sourced in the following order:
Read config from file specified using --kubeconfig flag Read config from file(s) specified using KUBECONFIG env variable Read config from default location at $HOME/.kube/config
If all these steps fail, fallback to default kubernetes config mechanism.
func CreateJob ¶
func CreateJob(client kubernetes.Interface, namespace string, jobDesc *JobDesc) (*batchV1.Job, error)
CreateJob function creates a new job
func CreateNamespace ¶
func CreateNamespace(k8sInterface kubernetes.Interface, namespace string) (*coreV1.Namespace, error)
CreateNamespace creates a new namespace
func CreateRegistrySecret ¶
func CreateRegistrySecret(k8sInterface kubernetes.Interface, namespace string, name string, server string, username string, password string) (*coreV1.Secret, error)
CreateRegistrySecret creates a new secret for docker registry
func DeleteNamespace ¶
func DeleteNamespace(k8sInterface kubernetes.Interface, namespace string) error
DeleteNamespace deletes a namespace
func DeleteRegistrySecret ¶
func DeleteRegistrySecret(k8sInterface kubernetes.Interface, namespace string, name string) error
DeleteRegistrySecret deletes docker registry secret
func GetKubeConfigFromPathList ¶
func GetKubeConfigFromPathList(configPaths string) (*restClient.Config, error)
GetKubeConfigFromPathList is a helper function that builds config object used to interact with the k8s cluster using a list of kubeconfig file(s)
Types ¶
type DockerConfig ¶
type DockerConfig map[string]DockerConfigEntry
DockerConfig represents the config file used by the docker CLI. This config that represents the credentials that should be used when pulling images from specific image repositories.
type DockerConfigEntry ¶
type DockerConfigEntry struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty" datapolicy:"password"` Auth string `json:"auth,omitempty" datapolicy:"token"` }
DockerConfigEntry holds the user information that grant the access to docker registry
type DockerConfigJSON ¶
type DockerConfigJSON struct { Authorizations DockerConfig `json:"auths" datapolicy:"token"` // +optional HTTPHeaders map[string]string `json:"HttpHeaders,omitempty" datapolicy:"token"` }
DockerConfigJSON represents a local docker auth config file for pulling images.