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
- type LogicVolumeReconciler
- type NodeReconciler
- type PersistentVolumeReconciler
- type PodReconciler
- func (r *PodReconciler) AllPodCGroupConfig(ctx context.Context) error
- func (r *PodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *PodReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *PodReconciler) SinglePodCGroupConfig(ctx context.Context, pod *corev1.Pod) error
Constants ¶
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) 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) 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 ¶
func (r *PersistentVolumeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
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) SetupWithManager ¶
func (r *PodReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up Reconciler with Manager.
func (*PodReconciler) SinglePodCGroupConfig ¶
对于单独一个Pod的创建,修改事件只需要判断当前cgroup和pod.annotations对比,即可判定是否需要变更