Documentation ¶
Index ¶
- Variables
- func IsInclusterClient(c *k8s.Clientset) bool
- func LoadExistingConfiguration(kubeConfig, contextName string) (clientcmd.ClientConfig, error)
- func MakeApiConfig(cr *StaticConfig) *api.Config
- func MakeGroupVersionBasedClient(ctx context.Context, original *rest.Config, gv schema.GroupVersion) (rest.Interface, error)
- func MakeGroupVersionBasedClientAndConfig(ctx context.Context, original *rest.Config, gv schema.GroupVersion) (*rest.Config, rest.Interface, error)
- func NewDiscoveryClient(config *rest.Config, ephemeral bool) (discovery.CachedDiscoveryInterface, error)
- func NewRESTMapper(config *rest.Config, ephemeral bool) (*restmapper.DeferredDiscoveryRESTMapper, error)
- func PollImmediateWithContext(ctx context.Context, interval, timeout time.Duration, ...) error
- func RegisterConfigurationProvider(name string, p ProviderFunc)
- type ClusterConfiguration
- type DeferredProvider
- type HostEnv
- func (*HostEnv) Descriptor() ([]byte, []int)deprecated
- func (x *HostEnv) GetBearerTokenProvider() string
- func (x *HostEnv) GetContext() string
- func (x *HostEnv) GetIncluster() bool
- func (x *HostEnv) GetKubeconfig() string
- func (x *HostEnv) GetProvider() string
- func (x *HostEnv) GetStaticConfig() *StaticConfig
- func (*HostEnv) ProtoMessage()
- func (x *HostEnv) ProtoReflect() protoreflect.Message
- func (x *HostEnv) Reset()
- func (x *HostEnv) String() string
- type Prepared
- type ProviderFunc
- type StaticConfig
- func (*StaticConfig) Descriptor() ([]byte, []int)deprecated
- func (x *StaticConfig) GetCertificateAuthorityData() []byte
- func (x *StaticConfig) GetClientCertificateData() []byte
- func (x *StaticConfig) GetClientKeyData() []byte
- func (x *StaticConfig) GetEndpointAddress() string
- func (*StaticConfig) ProtoMessage()
- func (x *StaticConfig) ProtoReflect() protoreflect.Message
- func (x *StaticConfig) Reset()
- func (x *StaticConfig) String() string
- type TokenProviderFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var File_internal_runtime_kubernetes_client_clientconfig_proto protoreflect.FileDescriptor
Functions ¶
func IsInclusterClient ¶
func LoadExistingConfiguration ¶ added in v0.0.90
func LoadExistingConfiguration(kubeConfig, contextName string) (clientcmd.ClientConfig, error)
func MakeApiConfig ¶
func MakeApiConfig(cr *StaticConfig) *api.Config
func NewDiscoveryClient ¶
func NewRESTMapper ¶
func NewRESTMapper(config *rest.Config, ephemeral bool) (*restmapper.DeferredDiscoveryRESTMapper, error)
func RegisterConfigurationProvider ¶
func RegisterConfigurationProvider(name string, p ProviderFunc)
Types ¶
type ClusterConfiguration ¶
type ClusterConfiguration struct { Config clientcmdapi.Config TokenProvider TokenProviderFunc Ephemeral bool // Set to true if thie target cluster is ephemeral. ProviderSpecific any // Up to an implementation to attach state if needed. Labels []*fnschema.Label }
type DeferredProvider ¶
type DeferredProvider struct{}
type HostEnv ¶
type HostEnv struct { Kubeconfig string `protobuf:"bytes,1,opt,name=kubeconfig,proto3" json:"kubeconfig,omitempty"` Context string `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"` // If empty, uses default context. Incluster bool `protobuf:"varint,3,opt,name=incluster,proto3" json:"incluster,omitempty"` BearerTokenProvider string `protobuf:"bytes,4,opt,name=bearer_token_provider,json=bearerTokenProvider,proto3" json:"bearer_token_provider,omitempty"` Provider string `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider,omitempty"` // If set, relies on the specified provider to produce a kube config. StaticConfig *StaticConfig `protobuf:"bytes,6,opt,name=static_config,json=staticConfig,proto3" json:"static_config,omitempty"` // contains filtered or unexported fields }
func CheckGetHostEnv ¶
func CheckGetHostEnv(cfg cfg.Configuration) (*HostEnv, error)
func (*HostEnv) Descriptor
deprecated
func (*HostEnv) GetBearerTokenProvider ¶
func (*HostEnv) GetContext ¶
func (*HostEnv) GetIncluster ¶
func (*HostEnv) GetKubeconfig ¶
func (*HostEnv) GetProvider ¶
func (*HostEnv) GetStaticConfig ¶
func (x *HostEnv) GetStaticConfig() *StaticConfig
func (*HostEnv) ProtoMessage ¶
func (*HostEnv) ProtoMessage()
func (*HostEnv) ProtoReflect ¶
func (x *HostEnv) ProtoReflect() protoreflect.Message
type Prepared ¶
type Prepared struct { Clientset *k8s.Clientset RESTConfig *rest.Config ClientConfig clientcmd.ClientConfig HostEnv *HostEnv Configuration ClusterConfiguration }
type ProviderFunc ¶
type ProviderFunc func(context.Context, cfg.Configuration) (ClusterConfiguration, error)
type StaticConfig ¶
type StaticConfig struct { EndpointAddress string `protobuf:"bytes,1,opt,name=endpoint_address,json=endpointAddress,proto3" json:"endpoint_address,omitempty"` CertificateAuthorityData []byte `` /* 135-byte string literal not displayed */ ClientCertificateData []byte `` /* 126-byte string literal not displayed */ ClientKeyData []byte `protobuf:"bytes,4,opt,name=client_key_data,json=clientKeyData,proto3" json:"client_key_data,omitempty"` // contains filtered or unexported fields }
func (*StaticConfig) Descriptor
deprecated
func (*StaticConfig) Descriptor() ([]byte, []int)
Deprecated: Use StaticConfig.ProtoReflect.Descriptor instead.
func (*StaticConfig) GetCertificateAuthorityData ¶
func (x *StaticConfig) GetCertificateAuthorityData() []byte
func (*StaticConfig) GetClientCertificateData ¶
func (x *StaticConfig) GetClientCertificateData() []byte
func (*StaticConfig) GetClientKeyData ¶
func (x *StaticConfig) GetClientKeyData() []byte
func (*StaticConfig) GetEndpointAddress ¶
func (x *StaticConfig) GetEndpointAddress() string
func (*StaticConfig) ProtoMessage ¶
func (*StaticConfig) ProtoMessage()
func (*StaticConfig) ProtoReflect ¶
func (x *StaticConfig) ProtoReflect() protoreflect.Message
func (*StaticConfig) Reset ¶
func (x *StaticConfig) Reset()
func (*StaticConfig) String ¶
func (x *StaticConfig) String() string
Click to show internal directories.
Click to hide internal directories.