client

package
v0.0.227 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_internal_runtime_kubernetes_client_clientconfig_proto protoreflect.FileDescriptor

Functions

func IsInclusterClient

func IsInclusterClient(c *k8s.Clientset) bool

func LoadExistingConfiguration added in v0.0.90

func LoadExistingConfiguration(kubeConfig, contextName string) (clientcmd.ClientConfig, error)

func MakeGroupVersionBasedClient

func MakeGroupVersionBasedClient(ctx context.Context, original *rest.Config, gv schema.GroupVersion) (rest.Interface, error)

func MakeGroupVersionBasedClientAndConfig

func MakeGroupVersionBasedClientAndConfig(ctx context.Context, original *rest.Config, gv schema.GroupVersion) (*rest.Config, rest.Interface, error)

func NewDiscoveryClient

func NewDiscoveryClient(config *rest.Config, ephemeral bool) (discovery.CachedDiscoveryInterface, error)

func PollImmediateWithContext

func PollImmediateWithContext(ctx context.Context, interval, timeout time.Duration, condition wait.ConditionWithContextFunc) 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
	SupportedIngressClasses []string
}

func (ClusterConfiguration) AsResult added in v0.0.104

func (conf ClusterConfiguration) AsResult() *configResult

type DeferredProvider

type DeferredProvider struct{}

type DeploymentPlanning added in v0.0.137

type DeploymentPlanning struct {
	DefaultNodeSelector  []*schema.Label                            `protobuf:"bytes,1,rep,name=default_node_selector,json=defaultNodeSelector,proto3" json:"default_node_selector,omitempty"`
	OverrideNodeSelector []*DeploymentPlanning_OverrideNodeSelector `protobuf:"bytes,2,rep,name=override_node_selector,json=overrideNodeSelector,proto3" json:"override_node_selector,omitempty"`
	// contains filtered or unexported fields
}

func (*DeploymentPlanning) Descriptor deprecated added in v0.0.137

func (*DeploymentPlanning) Descriptor() ([]byte, []int)

Deprecated: Use DeploymentPlanning.ProtoReflect.Descriptor instead.

func (*DeploymentPlanning) GetDefaultNodeSelector added in v0.0.137

func (x *DeploymentPlanning) GetDefaultNodeSelector() []*schema.Label

func (*DeploymentPlanning) GetOverrideNodeSelector added in v0.0.137

func (x *DeploymentPlanning) GetOverrideNodeSelector() []*DeploymentPlanning_OverrideNodeSelector

func (*DeploymentPlanning) ProtoMessage added in v0.0.137

func (*DeploymentPlanning) ProtoMessage()

func (*DeploymentPlanning) ProtoReflect added in v0.0.137

func (x *DeploymentPlanning) ProtoReflect() protoreflect.Message

func (*DeploymentPlanning) Reset added in v0.0.137

func (x *DeploymentPlanning) Reset()

func (*DeploymentPlanning) String added in v0.0.137

func (x *DeploymentPlanning) String() string

type DeploymentPlanning_OverrideNodeSelector added in v0.0.137

type DeploymentPlanning_OverrideNodeSelector struct {
	DeployablePackageRef *schema.PackageRef `protobuf:"bytes,1,opt,name=deployable_package_ref,json=deployablePackageRef,proto3" json:"deployable_package_ref,omitempty"`
	NodeSelector         []*schema.Label    `protobuf:"bytes,2,rep,name=node_selector,json=nodeSelector,proto3" json:"node_selector,omitempty"`
	// contains filtered or unexported fields
}

func (*DeploymentPlanning_OverrideNodeSelector) Descriptor deprecated added in v0.0.137

func (*DeploymentPlanning_OverrideNodeSelector) Descriptor() ([]byte, []int)

Deprecated: Use DeploymentPlanning_OverrideNodeSelector.ProtoReflect.Descriptor instead.

func (*DeploymentPlanning_OverrideNodeSelector) GetDeployablePackageRef added in v0.0.137

func (x *DeploymentPlanning_OverrideNodeSelector) GetDeployablePackageRef() *schema.PackageRef

func (*DeploymentPlanning_OverrideNodeSelector) GetNodeSelector added in v0.0.137

func (x *DeploymentPlanning_OverrideNodeSelector) GetNodeSelector() []*schema.Label

func (*DeploymentPlanning_OverrideNodeSelector) ProtoMessage added in v0.0.137

func (*DeploymentPlanning_OverrideNodeSelector) ProtoReflect added in v0.0.137

func (*DeploymentPlanning_OverrideNodeSelector) Reset added in v0.0.137

func (*DeploymentPlanning_OverrideNodeSelector) String added in v0.0.137

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        *kubeclient.StaticConfig `protobuf:"bytes,6,opt,name=static_config,json=staticConfig,proto3" json:"static_config,omitempty"`
	IngressClass        string                   `protobuf:"bytes,7,opt,name=ingress_class,json=ingressClass,proto3" json:"ingress_class,omitempty"`
	// contains filtered or unexported fields
}

func CheckGetHostEnv

func CheckGetHostEnv(cfg cfg.Configuration) (*HostEnv, error)

func NewLocalHostEnv

func NewLocalHostEnv(contextName string, env cfg.Context) *HostEnv

func (*HostEnv) Descriptor deprecated

func (*HostEnv) Descriptor() ([]byte, []int)

Deprecated: Use HostEnv.ProtoReflect.Descriptor instead.

func (*HostEnv) GetBearerTokenProvider

func (x *HostEnv) GetBearerTokenProvider() string

func (*HostEnv) GetContext

func (x *HostEnv) GetContext() string

func (*HostEnv) GetIncluster

func (x *HostEnv) GetIncluster() bool

func (*HostEnv) GetIngressClass added in v0.0.124

func (x *HostEnv) GetIngressClass() string

func (*HostEnv) GetKubeconfig

func (x *HostEnv) GetKubeconfig() string

func (*HostEnv) GetProvider

func (x *HostEnv) GetProvider() string

func (*HostEnv) GetStaticConfig

func (x *HostEnv) GetStaticConfig() *kubeclient.StaticConfig

func (*HostEnv) ProtoMessage

func (*HostEnv) ProtoMessage()

func (*HostEnv) ProtoReflect

func (x *HostEnv) ProtoReflect() protoreflect.Message

func (*HostEnv) Reset

func (x *HostEnv) Reset()

func (*HostEnv) String

func (x *HostEnv) String() string

type Prepared

type Prepared struct {
	Clientset     *k8s.Clientset
	RESTConfig    *rest.Config
	ClientConfig  clientcmd.ClientConfig
	HostEnv       *HostEnv
	Configuration ClusterConfiguration
}

func NewClient

func NewClient(ctx context.Context, cfg cfg.Configuration) (*Prepared, error)

func NewClientFromResult added in v0.0.104

func NewClientFromResult(ctx context.Context, hostEnv *HostEnv, computed *configResult) (*Prepared, error)

type TokenProviderFunc

type TokenProviderFunc func(context.Context) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL