controllers

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Copyright @ 2021 fushaosong <fushaosong@beyondlet.com>.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright @ 2021 fushaosong <fushaosong@beyondlet.com>.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright @ 2021 fushaosong <fushaosong@beyondlet.com>.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	// pod annotation KubernetesCustomized/BlkIOThrottleReadBPS
	KubernetesCustomized   = "kubernetes.customized"
	BlkIOThrottleReadBPS   = "blkio.throttle.read_bps_device"
	BlkIOThrottleReadIOPS  = "blkio.throttle.read_iops_device"
	BlkIOThrottleWriteBPS  = "blkio.throttle.write_bps_device"
	BlkIOThrottleWriteIOPS = "blkio.throttle.write_iops_device"
	BlkIOCGroupPath        = "/sys/fs/cgroup/blkio/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LogicVolumeReconciler

type LogicVolumeReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
	// contains filtered or unexported fields
}

LogicVolumeReconciler reconciles a LogicVolume object

func NewLogicVolumeReconciler

func NewLogicVolumeReconciler(client client.Client, scheme *runtime.Scheme, recorder record.EventRecorder, nodeName string, volume volume.LocalVolume) *LogicVolumeReconciler

func (*LogicVolumeReconciler) Reconcile

func (r *LogicVolumeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*LogicVolumeReconciler) SetupWithManager

func (r *LogicVolumeReconciler) SetupWithManager(mgr ctrl.Manager) error

type NodeReconciler

type NodeReconciler struct {
	client.Client
	// stop
	StopChan <-chan struct{}
	// contains filtered or unexported fields
}

NodeReconciler reconciles a Node object

func (*NodeReconciler) Reconcile

func (r *NodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile finalize Node

func (*NodeReconciler) SetupWithManager

func (r *NodeReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up Reconciler with Manager.

type PersistentVolumeReconciler

type PersistentVolumeReconciler struct {
	client.Client
	APIReader client.Reader
	// contains filtered or unexported fields
}

PersistentVolumeClaimReconciler reconciles a PersistentVolumeClaim object

func (*PersistentVolumeReconciler) Reconcile

Reconcile finalize PVC

func (*PersistentVolumeReconciler) SetupWithManager

func (r *PersistentVolumeReconciler) SetupWithManager(mgr ctrl.Manager, stopChan <-chan struct{}) error

SetupWithManager sets up Reconciler with Manager.

type PodReconciler

type PodReconciler struct {
	client.Client
	NodeName string
	Executor exec.Executor
	// stop
	StopChan <-chan struct{}
}

PodReconciler reconciles a Node object

func (*PodReconciler) AllPodCGroupConfig

func (r *PodReconciler) AllPodCGroupConfig(ctx context.Context) error

func (*PodReconciler) Reconcile

func (r *PodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile finalize Node

func (*PodReconciler) SetupWithManager

func (r *PodReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up Reconciler with Manager.

func (*PodReconciler) SinglePodCGroupConfig

func (r *PodReconciler) SinglePodCGroupConfig(ctx context.Context, pod *corev1.Pod) error

对于单独一个Pod的创建,修改事件只需要判断当前cgroup和pod.annotations对比,即可判定是否需要变更

Jump to

Keyboard shortcuts

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