Documentation
¶
Index ¶
- Variables
- type AllocatedNetwork
- type ApiServer
- type Backend
- type BackendFunc
- type BackendName
- type Client
- type DataDir
- type Driver
- type Error
- type FileName
- type Host
- type LogStream
- type Manager
- type Nanokube
- type Network
- type NetworkService
- type NetworkType
- type Options
- type Path
- type PortMap
- type Protocol
- type Ready
- type ServiceName
- type Storage
- type StorageClient
- type TunnelName
- type VolumeService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HTTP2 = true Backends []BackendFunc = []BackendFunc{} DockerBackend BackendName = "docker" PodmanBackend BackendName = "podman" AWSLambdaBackend BackendName = "awslambda" // KubeletTunnel TunnelName = "shared" SharedTunnel TunnelName = "shared" APIServerService ServiceName = "apiserver" KubeletService ServiceName = "kubelet" ControllerManagerService ServiceName = "controller-manager" SchedulerService ServiceName = "scheduler" Node ServiceName = "node" DataDirLock DataDir = "lock" DataDirKubelet DataDir = "kubelet" DataDirCerts DataDir = "certs" DataDirLogs DataDir = "logs" DataDirEtcd DataDir = "etcd" DataDirKube DataDir = ".kube" DataDirStaticPods DataDir = DataDir(filepath.Join(string(DataDirKubelet), "static-pods")) DataDirVolumePlugins DataDir = DataDir(filepath.Join(string(DataDirKubelet), "volume-plugins")) PidFile = func(options Options) FileName { return FileName(options.Name() + ".pid") } LogFile = func(options Options) FileName { return FileName(options.Name() + ".log") } CAFile FileName = FileName(filepath.Join(string(DataDirCerts), "ca.crt")) CertFile FileName = FileName(filepath.Join(string(DataDirCerts), "apiserver.crt")) KeyFile FileName = FileName(filepath.Join(string(DataDirCerts), "apiserver.key")) KubeconfigFile FileName = FileName(filepath.Join(string(DataDirKube), "config")) NetworkHost NetworkType = "host" NetworkBridge NetworkType = "bridge" NetworkSubnetSize = 28 NetworkProtocolTCP = corev1.ProtocolTCP NetworkProtocolUDP = corev1.ProtocolUDP SandboxExecSentinel = "__sandbox__" )
Functions ¶
This section is empty.
Types ¶
type AllocatedNetwork ¶
type BackendFunc ¶
type BackendName ¶
type BackendName string
type Client ¶
type Client interface {
Ready
client.Interface
Clientset() *client.Clientset
InformerFactory() informers.SharedInformerFactory
WithHeartbeat(interval time.Duration) Client
WithQps(qps float32) Client
WithTimeout(timeout time.Duration) Client
WithTunnel(tunnel tunnel.Tunnel, local bool) Client
Kubeconfig(name string) *clientcmdapi.Config
WriteKubeconfig(path string) error
}
type Driver ¶
type Driver interface {
internalapi.ImageManagerService
internalapi.RuntimeService
NetworkService
VolumeService
Context() context.Context
Name() string
ExecOnHost(ctx context.Context, image string, cmd []string, mounts []Path) (string, error)
ExecOnNetwork(ctx context.Context, network AllocatedNetwork, image string, cmd []string, portMap []PortMap) (string, error)
CgroupRoot() string
LogStream(containerID string, status *criv1.ContainerStatus) LogStream
Service() *restful.WebService
WithBaseURL(baseURL *url.URL) Driver
BaseURL() *url.URL
WithNetwork(network Network) Driver
Network() Network
}
type Host ¶
type Host interface {
hostutil.HostUtils
container.OSInterface
volume.VolumePlugin
subpath.Interface
mount.Interface
VolumePlugins() []volume.VolumePlugin
}
type LogStream ¶
type LogStream interface {
Start()
Stop()
Destroy()
Stdout() io.ReadCloser
Stderr() io.ReadCloser
}
LogStream represents a container's log pump. Runtimes construct one via NewLogStream, providing a LogSource that knows how to open stdout/stderr readers. The impl owns pipes, CRI-format formatting, and log-file I/O.
type Manager ¶
type Manager interface {
Ready
cm.ContainerManager
lifecycle.PodAdmitHandler
cm.InternalContainerLifecycle
cm.PodContainerManager
}
type Nanokube ¶
type Nanokube interface {
context.Context
record.EventRecorder
record.EventRecorderLogger
Options() Options
WithCancel() (context.Context, context.CancelFunc)
Cancel(reason Error)
CancelErr(reason error)
Errors() []error
Backend(name BackendName) Backend
DefaultBackend() Backend
Host() Host
Client() Client
Tunnel() tunnel.Tunnel
StaticPods() []*corev1.Pod
Services(baseURL *url.URL) []*restful.WebService
Environ() []string
CertFilePath() string
KeyFilePath() string
RootCaFilePath() string
WithLoopback(loopback *rest.Config) Nanokube
KubeconfigPath() string
NodeReady() <-chan struct{}
NodeRef() *corev1.ObjectReference
Storage() Storage
}
type Network ¶
type Network interface {
Networks() []AllocatedNetwork
FromID(ctx context.Context, id string) (AllocatedNetwork, error)
FromIP(ctx context.Context, ip net.IP) (AllocatedNetwork, error)
FromUID(ctx context.Context, sandboxUID types.UID) (AllocatedNetwork, error)
FromStatus(ctx context.Context, status *criv1.PodSandboxStatus) (AllocatedNetwork, error)
FromConfig(ctx context.Context, config *criv1.PodSandboxConfig) (AllocatedNetwork, error)
Default(ctx context.Context) AllocatedNetwork
}
type NetworkService ¶
type NetworkService interface {
Context() context.Context
GetNetwork(ctx context.Context, id string) (*NetworkType, *net.IP, *net.IPNet, error)
CreateNetwork(ctx context.Context, networkType NetworkType, net *net.IPNet, gateway *net.IP) (string, error)
RemoveNetwork(ctx context.Context, id string) error
}
type NetworkType ¶
type NetworkType string
type Options ¶
type Options interface {
Name() string
Verbosity() int
DataDir() DataDir
DataDirAt(name DataDir) string
FilePathAt(file FileName) string
InDataDir(path string) bool
Args() []string
}
TODO(deprecate)
type ServiceName ¶
type ServiceName string
type Storage ¶
type Storage interface {
generic.RESTOptionsGetter
SetConfig(config *server.Config) *server.Config
WithResource(inner kubestorage.Interface, resource schema.GroupResource) StorageClient
Servers() []string
Shutdown()
}
type StorageClient ¶
type StorageClient interface {
kubestorage.Interface
}
type TunnelName ¶
type TunnelName string
type VolumeService ¶
type VolumeService interface {
ClaimVolume(backend Backend, client Client, pvc *corev1.PersistentVolumeClaim) *corev1ac.PersistentVolumeClaimApplyConfiguration
CreateVolume(pv *corev1.LocalVolumeSource) error
DeleteVolume(pv *corev1.LocalVolumeSource) error
ReleaseVolume(backend Backend, client Client, pvc *corev1.PersistentVolumeClaim) error
}
Click to show internal directories.
Click to hide internal directories.