Documentation ¶
Index ¶
- func CreateRestConfig(apiConf APIConfig) (*rest.Config, error)
- func MakeClient(apiConf APIConfig) (k8s.Interface, error)
- func MakeDynamicClient(apiConf APIConfig) (dynamic.Interface, error)
- func MakeOpenShiftQuotaClient(apiConf APIConfig) (quotaclientset.Interface, error)
- func NewNodeSharedInformer(client k8s.Interface, nodeName string, watchSyncPeriod time.Duration) cache.SharedInformer
- type APIConfig
- type AuthType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRestConfig ¶ added in v0.74.0
CreateRestConfig creates an Kubernetes API config from user configuration.
func MakeClient ¶
MakeClient can take configuration if needed for other types of auth
func MakeDynamicClient ¶ added in v0.63.0
MakeDynamicClient can take configuration if needed for other types of auth
func MakeOpenShiftQuotaClient ¶ added in v0.31.0
func MakeOpenShiftQuotaClient(apiConf APIConfig) (quotaclientset.Interface, error)
MakeOpenShiftQuotaClient can take configuration if needed for other types of auth and return an OpenShift quota API client
func NewNodeSharedInformer ¶ added in v0.100.0
Types ¶
type APIConfig ¶
type APIConfig struct { // How to authenticate to the K8s API server. This can be one of `none` // (for no auth), `serviceAccount` (to use the standard service account // token provided to the agent pod), or `kubeConfig` to use credentials // from `~/.kube/config`. AuthType AuthType `mapstructure:"auth_type"` // When using auth_type `kubeConfig`, override the current context. Context string `mapstructure:"context"` }
APIConfig contains options relevant to connecting to the K8s API
type AuthType ¶
type AuthType string
AuthType describes the type of authentication to use for the K8s API
const ( // AuthTypeNone means no auth is required AuthTypeNone AuthType = "none" // AuthTypeServiceAccount means to use the built-in service account that // K8s automatically provisions for each pod. AuthTypeServiceAccount AuthType = "serviceAccount" // AuthTypeKubeConfig uses local credentials like those used by kubectl. AuthTypeKubeConfig AuthType = "kubeConfig" // AuthTypeTLS indicates that client TLS auth is desired AuthTypeTLS AuthType = "tls" )
TODO: Add option for TLS once https://go.opentelemetry.io/collector/issues/933 is addressed.
Click to show internal directories.
Click to hide internal directories.