Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidReference if given reference is invalid. ErrInvalidReference = errors.New("reference is invalid") // ErrNotAddressable if found resource isn't addressable. ErrNotAddressable = errors.New("resource isn't addressable") // ErrUnexcpected if something unexpected actually has happened. ErrUnexcpected = errors.New("something unexpected actually has happened") // ErrJobFailed if the job has failed. ErrJobFailed = errors.New("the Kubernetes job failed") )
var ErrNoKubernetesConnection = errors.New("no Kubernetes connection")
ErrNoKubernetesConnection if we can't connect to Kube API server.
Functions ¶
This section is empty.
Types ¶
type Clients ¶
type Clients interface { Namespace() string Typed() kubernetes.Interface Dynamic() dynamic.Interface Serving() servingv1.ServingV1Interface Eventing() eventingv1.EventingV1Interface Messaging() messagingv1.MessagingV1Interface }
Clients holds available Kubernetes clients.
func NewClients ¶ added in v0.43.0
func NewClients(cfg *Configurator) (Clients, error)
NewClients creates kubernetes clients.
type Configurator ¶ added in v0.43.0
type Configurator struct { ClientConfig func() (clientcmd.ClientConfig, error) Namespace *string }
Configurator for creating the Kube's clients.
type JobRunner ¶
JobRunner will launch a Job and monitor it for completion.
func NewJobRunner ¶ added in v0.43.0
NewJobRunner will create a JobRunner, or return an error.
type NewKubeClients ¶ added in v0.43.0
type NewKubeClients func(configurator *Configurator) (Clients, error)
NewKubeClients creates Clients.
type Params ¶ added in v0.43.0
Params contain Kubernetes specific params, that CLI should comply to.
func (*Params) Parse ¶ added in v0.43.0
func (kp *Params) Parse() *Configurator
Parse will build k8s.Configurator struct which could be used to initiate the k8s.Clients.
func (*Params) SetCommandFlags ¶ added in v0.43.0
func (*Params) SetGlobalFlags ¶ added in v0.43.0
type ReferenceAddressResolver ¶
type ReferenceAddressResolver interface {
ResolveAddress(ctx context.Context, ref *sink.Reference, relativeURI string) (*url.URL, error)
}
ReferenceAddressResolver will resolve the tracker.Reference to an url.URL, or return an error.
func NewAddressResolver ¶ added in v0.43.0
func NewAddressResolver(kube Clients) ReferenceAddressResolver
NewAddressResolver will create ReferenceAddressResolver or return an error.