controller-runtime: sigs.k8s.io/controller-runtime/pkg/client/config Index | Files

package config

import "sigs.k8s.io/controller-runtime/pkg/client/config"

Package config contains libraries for initializing REST configs for talking to the Kubernetes API

Index

Package Files

config.go doc.go

func GetConfig Uses

func GetConfig() (*rest.Config, error)

GetConfig creates a *rest.Config for talking to a Kubernetes API server. If --kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running in cluster and use the cluster provided kubeconfig.

It also applies saner defaults for QPS and burst based on the Kubernetes controller manager defaults (20 QPS, 30 burst)

Config precedence

* --kubeconfig flag pointing at a file

* KUBECONFIG environment variable pointing at a file

* In-cluster config if running in cluster

* $HOME/.kube/config if exists

func GetConfigOrDie Uses

func GetConfigOrDie() *rest.Config

GetConfigOrDie creates a *rest.Config for talking to a Kubernetes apiserver. If --kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running in cluster and use the cluster provided kubeconfig.

Will log an error and exit if there is an error creating the rest.Config.

func GetConfigWithContext Uses

func GetConfigWithContext(context string) (*rest.Config, error)

GetConfigWithContext creates a *rest.Config for talking to a Kubernetes API server with a specific context. If --kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running in cluster and use the cluster provided kubeconfig.

It also applies saner defaults for QPS and burst based on the Kubernetes controller manager defaults (20 QPS, 30 burst)

Config precedence

* --kubeconfig flag pointing at a file

* KUBECONFIG environment variable pointing at a file

* In-cluster config if running in cluster

* $HOME/.kube/config if exists

Package config imports 9 packages (graph) and is imported by 39 packages. Updated 2019-06-30. Refresh now. Tools for package owners.