Documentation ¶
Index ¶
- Variables
- type ContainerContext
- func (c *ContainerContext) FromNri(pod *api.PodSandbox, container *api.Container)
- func (c *ContainerContext) FromProxy(req *runtimeapi.ContainerResourceHookRequest)
- func (c *ContainerContext) FromReconciler(podMeta *statesinformer.PodMeta, containerName string, sandbox bool)
- func (c *ContainerContext) GetUpdaters() []resourceexecutor.ResourceUpdater
- func (c *ContainerContext) NriDone(executor resourceexecutor.ResourceUpdateExecutor) (*api.ContainerAdjustment, *api.ContainerUpdate, error)
- func (c *ContainerContext) ProxyDone(resp *runtimeapi.ContainerResourceHookResponse, ...)
- func (c *ContainerContext) ReconcilerDone(executor resourceexecutor.ResourceUpdateExecutor)
- func (c *ContainerContext) ReconcilerProcess(executor resourceexecutor.ResourceUpdateExecutor)
- func (c *ContainerContext) Update()
- type ContainerMeta
- type ContainerRequest
- type ContainerResponse
- type HooksProtocol
- type HostAppContext
- func (c *HostAppContext) FromReconciler(hostAppSpec *slov1alpha1.HostApplicationSpec)
- func (c *HostAppContext) GetUpdaters() []resourceexecutor.ResourceUpdater
- func (c *HostAppContext) ReconcilerDone(executor resourceexecutor.ResourceUpdateExecutor)
- func (c *HostAppContext) ReconcilerProcess(executor resourceexecutor.ResourceUpdateExecutor)
- func (c *HostAppContext) Update()
- type HostAppRequest
- type HostAppResponse
- type KubeQOSContext
- func (k *KubeQOSContext) FromReconciler(kubeQOS corev1.PodQOSClass)
- func (k *KubeQOSContext) GetUpdaters() []resourceexecutor.ResourceUpdater
- func (k *KubeQOSContext) ReconcilerDone(executor resourceexecutor.ResourceUpdateExecutor)
- func (k *KubeQOSContext) ReconcilerProcess(executor resourceexecutor.ResourceUpdateExecutor)
- func (k *KubeQOSContext) Update()
- type KubeQOSRequet
- type KubeQOSResponse
- type PodContext
- func (p *PodContext) FromNri(pod *api.PodSandbox)
- func (p *PodContext) FromProxy(req *runtimeapi.PodSandboxHookRequest)
- func (p *PodContext) FromReconciler(podMeta *statesinformer.PodMeta)
- func (p *PodContext) GetUpdaters() []resourceexecutor.ResourceUpdater
- func (p *PodContext) NriDone(executor resourceexecutor.ResourceUpdateExecutor)
- func (p *PodContext) NriRemoveDone(executor resourceexecutor.ResourceUpdateExecutor)
- func (p *PodContext) ProxyDone(resp *runtimeapi.PodSandboxHookResponse, ...)
- func (p *PodContext) ReconcilerDone(executor resourceexecutor.ResourceUpdateExecutor)
- func (p *PodContext) ReconcilerProcess(executor resourceexecutor.ResourceUpdateExecutor)
- func (p *PodContext) Update()
- type PodMeta
- type PodRequest
- type PodResponse
- type Resources
Constants ¶
This section is empty.
Variables ¶
View Source
var HooksProtocolBuilder = hooksProtocolBuilder{ KubeQOS: func(kubeQOS corev1.PodQOSClass) HooksProtocol { k := &KubeQOSContext{} k.FromReconciler(kubeQOS) return k }, Pod: func(podMeta *statesinformer.PodMeta) HooksProtocol { p := &PodContext{} p.FromReconciler(podMeta) return p }, Sandbox: func(podMeta *statesinformer.PodMeta) HooksProtocol { p := &ContainerContext{} p.FromReconciler(podMeta, "", true) return p }, Container: func(podMeta *statesinformer.PodMeta, containerName string) HooksProtocol { c := &ContainerContext{} c.FromReconciler(podMeta, containerName, false) return c }, HostApp: func(hostAppSpec *slov1alpha1.HostApplicationSpec) HooksProtocol { c := &HostAppContext{} c.FromReconciler(hostAppSpec) return c }, }
Functions ¶
This section is empty.
Types ¶
type ContainerContext ¶
type ContainerContext struct { Request ContainerRequest Response ContainerResponse // contains filtered or unexported fields }
func (*ContainerContext) FromNri ¶ added in v1.3.0
func (c *ContainerContext) FromNri(pod *api.PodSandbox, container *api.Container)
func (*ContainerContext) FromProxy ¶
func (c *ContainerContext) FromProxy(req *runtimeapi.ContainerResourceHookRequest)
func (*ContainerContext) FromReconciler ¶
func (c *ContainerContext) FromReconciler(podMeta *statesinformer.PodMeta, containerName string, sandbox bool)
func (*ContainerContext) GetUpdaters ¶ added in v1.4.0
func (c *ContainerContext) GetUpdaters() []resourceexecutor.ResourceUpdater
func (*ContainerContext) NriDone ¶ added in v1.3.0
func (c *ContainerContext) NriDone(executor resourceexecutor.ResourceUpdateExecutor) (*api.ContainerAdjustment, *api.ContainerUpdate, error)
func (*ContainerContext) ProxyDone ¶
func (c *ContainerContext) ProxyDone(resp *runtimeapi.ContainerResourceHookResponse, executor resourceexecutor.ResourceUpdateExecutor)
func (*ContainerContext) ReconcilerDone ¶
func (c *ContainerContext) ReconcilerDone(executor resourceexecutor.ResourceUpdateExecutor)
func (*ContainerContext) ReconcilerProcess ¶ added in v1.4.0
func (c *ContainerContext) ReconcilerProcess(executor resourceexecutor.ResourceUpdateExecutor)
ReconcilerProcess generate the resource updaters but not do the update until the Update() is called.
func (*ContainerContext) Update ¶ added in v1.4.0
func (c *ContainerContext) Update()
type ContainerMeta ¶
type ContainerMeta struct { Name string ID string // docker://xxx; containerd:// // is sandbox container Sandbox bool }
func (*ContainerMeta) FromNri ¶ added in v1.3.0
func (c *ContainerMeta) FromNri(container *api.Container, podAnnotations map[string]string)
func (*ContainerMeta) FromProxy ¶
func (c *ContainerMeta) FromProxy(containerMeta *runtimeapi.ContainerMetadata, podAnnotations map[string]string)
type ContainerRequest ¶
type ContainerRequest struct { PodMeta PodMeta ContainerMeta ContainerMeta PodLabels map[string]string PodAnnotations map[string]string CgroupParent string ContainerEnvs map[string]string Resources *Resources // TODO: support proxy & nri mode ExtendedResources *apiext.ExtendedResourceContainerSpec }
func (*ContainerRequest) FromNri ¶ added in v1.3.0
func (c *ContainerRequest) FromNri(pod *api.PodSandbox, container *api.Container)
func (*ContainerRequest) FromProxy ¶
func (c *ContainerRequest) FromProxy(req *runtimeapi.ContainerResourceHookRequest)
func (*ContainerRequest) FromReconciler ¶
func (c *ContainerRequest) FromReconciler(podMeta *statesinformer.PodMeta, containerName string, sandbox bool)
type ContainerResponse ¶
func (*ContainerResponse) ProxyDone ¶
func (c *ContainerResponse) ProxyDone(resp *runtimeapi.ContainerResourceHookResponse)
type HooksProtocol ¶
type HooksProtocol interface { ReconcilerDone(executor resourceexecutor.ResourceUpdateExecutor) Update() GetUpdaters() []resourceexecutor.ResourceUpdater }
type HostAppContext ¶ added in v1.4.0
type HostAppContext struct { Request HostAppRequest Response HostAppResponse // contains filtered or unexported fields }
func (*HostAppContext) FromReconciler ¶ added in v1.4.0
func (c *HostAppContext) FromReconciler(hostAppSpec *slov1alpha1.HostApplicationSpec)
func (*HostAppContext) GetUpdaters ¶ added in v1.4.0
func (c *HostAppContext) GetUpdaters() []resourceexecutor.ResourceUpdater
func (*HostAppContext) ReconcilerDone ¶ added in v1.4.0
func (c *HostAppContext) ReconcilerDone(executor resourceexecutor.ResourceUpdateExecutor)
func (*HostAppContext) ReconcilerProcess ¶ added in v1.4.0
func (c *HostAppContext) ReconcilerProcess(executor resourceexecutor.ResourceUpdateExecutor)
func (*HostAppContext) Update ¶ added in v1.4.0
func (c *HostAppContext) Update()
type HostAppRequest ¶ added in v1.4.0
func (*HostAppRequest) FromReconciler ¶ added in v1.4.0
func (r *HostAppRequest) FromReconciler(hostAppSpec *slov1alpha1.HostApplicationSpec)
type HostAppResponse ¶ added in v1.4.0
type HostAppResponse struct {
Resources Resources
}
type KubeQOSContext ¶
type KubeQOSContext struct { Request KubeQOSRequet Response KubeQOSResponse // contains filtered or unexported fields }
func (*KubeQOSContext) FromReconciler ¶
func (k *KubeQOSContext) FromReconciler(kubeQOS corev1.PodQOSClass)
func (*KubeQOSContext) GetUpdaters ¶ added in v1.4.0
func (k *KubeQOSContext) GetUpdaters() []resourceexecutor.ResourceUpdater
func (*KubeQOSContext) ReconcilerDone ¶
func (k *KubeQOSContext) ReconcilerDone(executor resourceexecutor.ResourceUpdateExecutor)
func (*KubeQOSContext) ReconcilerProcess ¶ added in v1.4.0
func (k *KubeQOSContext) ReconcilerProcess(executor resourceexecutor.ResourceUpdateExecutor)
ReconcilerProcess generate the resource updaters but not do the update until the Update() is called.
func (*KubeQOSContext) Update ¶ added in v1.4.0
func (k *KubeQOSContext) Update()
type KubeQOSRequet ¶
type KubeQOSRequet struct { KubeQOSClass corev1.PodQOSClass CgroupParent string }
func (*KubeQOSRequet) FromReconciler ¶
func (r *KubeQOSRequet) FromReconciler(kubeQOS corev1.PodQOSClass)
type KubeQOSResponse ¶
type KubeQOSResponse struct {
Resources Resources
}
type PodContext ¶
type PodContext struct { Request PodRequest Response PodResponse // contains filtered or unexported fields }
func (*PodContext) FromNri ¶ added in v1.3.0
func (p *PodContext) FromNri(pod *api.PodSandbox)
func (*PodContext) FromProxy ¶
func (p *PodContext) FromProxy(req *runtimeapi.PodSandboxHookRequest)
func (*PodContext) FromReconciler ¶
func (p *PodContext) FromReconciler(podMeta *statesinformer.PodMeta)
func (*PodContext) GetUpdaters ¶ added in v1.4.0
func (p *PodContext) GetUpdaters() []resourceexecutor.ResourceUpdater
func (*PodContext) NriDone ¶ added in v1.3.0
func (p *PodContext) NriDone(executor resourceexecutor.ResourceUpdateExecutor)
func (*PodContext) NriRemoveDone ¶ added in v1.5.0
func (p *PodContext) NriRemoveDone(executor resourceexecutor.ResourceUpdateExecutor)
func (*PodContext) ProxyDone ¶
func (p *PodContext) ProxyDone(resp *runtimeapi.PodSandboxHookResponse, executor resourceexecutor.ResourceUpdateExecutor)
func (*PodContext) ReconcilerDone ¶
func (p *PodContext) ReconcilerDone(executor resourceexecutor.ResourceUpdateExecutor)
func (*PodContext) ReconcilerProcess ¶ added in v1.4.0
func (p *PodContext) ReconcilerProcess(executor resourceexecutor.ResourceUpdateExecutor)
ReconcilerProcess generate the resource updaters but not do the update until the Update() is called.
func (*PodContext) Update ¶ added in v1.4.0
func (p *PodContext) Update()
type PodMeta ¶
func (*PodMeta) FromNri ¶ added in v1.3.0
func (p *PodMeta) FromNri(pod *api.PodSandbox)
func (*PodMeta) FromProxy ¶
func (p *PodMeta) FromProxy(meta *runtimeapi.PodSandboxMetadata)
func (*PodMeta) FromReconciler ¶
func (p *PodMeta) FromReconciler(meta metav1.ObjectMeta)
type PodRequest ¶
type PodRequest struct { PodMeta PodMeta Labels map[string]string Annotations map[string]string CgroupParent string Resources *Resources // TODO: support proxy & nri mode ExtendedResources *apiext.ExtendedResourceSpec }
func (*PodRequest) FromNri ¶ added in v1.3.0
func (p *PodRequest) FromNri(pod *api.PodSandbox)
func (*PodRequest) FromProxy ¶
func (p *PodRequest) FromProxy(req *runtimeapi.PodSandboxHookRequest)
func (*PodRequest) FromReconciler ¶
func (p *PodRequest) FromReconciler(podMeta *statesinformer.PodMeta)
type PodResponse ¶
type PodResponse struct {
Resources Resources
}
func (*PodResponse) ProxyDone ¶
func (p *PodResponse) ProxyDone(resp *runtimeapi.PodSandboxHookResponse)
Click to show internal directories.
Click to hide internal directories.