Documentation ¶
Overview ¶
Package provider handles the interaction with the virtual kubelet library (and node-cli)
Index ¶
- func IsExpected(err error) bool
- func NewProvider(pods podmanager.PodManager, nodeStats *Stats, ...) provider.Provider
- type ExpectedError
- type Provider
- func (p *Provider) ConfigureNode(ctx context.Context, node *corev1.Node)
- func (p *Provider) CreatePod(ctx context.Context, pod *corev1.Pod) error
- func (p *Provider) DeletePod(ctx context.Context, pod *corev1.Pod) error
- func (p *Provider) GetContainerLogs(_ context.Context, ns, name, _ string, _ api.ContainerLogOpts) (io.ReadCloser, error)
- func (p *Provider) GetPod(ctx context.Context, namespace, name string) (*corev1.Pod, error)
- func (p *Provider) GetPodStatus(ctx context.Context, ns string, name string) (*corev1.PodStatus, error)
- func (p *Provider) GetPods(ctx context.Context) ([]*corev1.Pod, error)
- func (p *Provider) GetStatsSummary() (*stats.Summary, error)
- func (p *Provider) NotifyNodeStatus(ctx context.Context, cb func(*corev1.Node))
- func (p *Provider) Ping(ctx context.Context) error
- func (p *Provider) RunInContainer(_ context.Context, ns, name, _ string, _ []string, _ api.AttachIO) error
- func (p *Provider) UpdatePod(ctx context.Context, pod *corev1.Pod) error
- type Stats
- type VirtualKubelet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProvider ¶
func NewProvider(pods podmanager.PodManager, nodeStats *Stats, resources *scenario.NodeResources, cfg *provider.InitConfig, nodeInfo *node.Info, store *store.Store, disableTaints bool, environment env.ApateletEnvironment) provider.Provider
NewProvider returns the provider but with the vk type instead of our own.
Types ¶
type ExpectedError ¶
type ExpectedError interface {
Expected() bool
}
ExpectedError is an error which is thrown during emulation.
type Provider ¶
type Provider struct { Pods podmanager.PodManager // the pods currently used Store *store.Store // the apatelet store Environment env.ApateletEnvironment Cfg *provider.InitConfig // the initial provider config DisableTaints bool // whether to disable taints Stats *Stats // statistics contain static statistics Node *corev1.Node // the reference to "ourselves" NodeInfo *node.Info // static node information sent to kubernetes Resources *scenario.NodeResources // static resource information sent to kubernetes Conditions nodeConditions // a wrapper around kubernetes conditions }
Provider implements the node-cli (virtual kubelet) interface for a virtual kubelet provider
func (*Provider) ConfigureNode ¶
ConfigureNode enables a provider to configure the node object that will be used for Kubernetes.
func (*Provider) GetContainerLogs ¶
func (p *Provider) GetContainerLogs(_ context.Context, ns, name, _ string, _ api.ContainerLogOpts) (io.ReadCloser, error)
GetContainerLogs retrieves the log of a specific container.
func (*Provider) GetPodStatus ¶
func (p *Provider) GetPodStatus(ctx context.Context, ns string, name string) (*corev1.PodStatus, error)
GetPodStatus retrieves the status of a pod by label.
func (*Provider) GetStatsSummary ¶
GetStatsSummary should return a node level statistic report
func (*Provider) NotifyNodeStatus ¶
NotifyNodeStatus sets the function we can use to update the status within kubernetes
type Stats ¶
type Stats struct {
// contains filtered or unexported fields
}
Stats is a simple wrapper for statistics fields
type VirtualKubelet ¶
type VirtualKubelet struct {
// contains filtered or unexported fields
}
VirtualKubelet is a struct containing everything needed to start virtual kubelet
func CreateProvider ¶
func CreateProvider(env *env.ApateletEnvironment, res *scenario.NodeResources, store *store.Store) (*VirtualKubelet, error)
CreateProvider creates the node-cli (virtual kubelet) command
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package condition provides functions to more easily work with kubernetes node conditions
|
Package condition provides functions to more easily work with kubernetes node conditions |
Package mock_cache is a generated GoMock package.
|
Package mock_cache is a generated GoMock package. |
Package podmanager contains the pod manager interface and a simple thread safe map-based implementation
|
Package podmanager contains the pod manager interface and a simple thread safe map-based implementation |
mock_podmanager
Package mock_podmanager is a generated GoMock package.
|
Package mock_podmanager is a generated GoMock package. |