controllers

package
v1.0.3-0...-e6bed6d Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

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 (
	ExtendedResourcePrefix = "power.intel.com/"
	NodeAgentDSName        = "power-node-agent"
	IntelPowerNamespace    = "intel-power"
)
View Source
const (
	PowerProfileAnnotation = "PowerProfile"
	ResourcePrefix         = "power.intel.com/"
	CPUResource            = "cpu"
	PowerNamespace         = "intel-power"
)
View Source
const (
	SharedWorkloadName string = "shared-workload"
	WorkloadNameSuffix string = "-workload"
)
View Source
const MinFreqOffset = 200

value deducted from the max freq of a default profile this gives the profile a 0.2 Ghz frequency range

Variables

View Source
var NodeAgentDaemonSetPath = "/power-manifests/power-node-agent-ds.yaml"

Functions

This section is empty.

Types

type CStatesReconciler

type CStatesReconciler struct {
	client.Client
	Log          logr.Logger
	Scheme       *runtime.Scheme
	PowerLibrary power.Host
}

CStatesReconciler reconciles a CStates object

func (*CStatesReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.6.4/pkg/reconcile

func (*CStatesReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type PowerConfigReconciler

type PowerConfigReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
	State  *state.PowerNodeData
}

PowerConfigReconciler reconciles a PowerConfig object

func (*PowerConfigReconciler) Reconcile

func (*PowerConfigReconciler) SetupWithManager

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

type PowerNodeReconciler

type PowerNodeReconciler struct {
	client.Client
	Log          logr.Logger
	Scheme       *runtime.Scheme
	State        *podstate.State
	OrphanedPods map[string]corev1.Pod
	PowerLibrary power.Host
}

PowerNodeReconciler reconciles a PowerNode object

func (*PowerNodeReconciler) Reconcile

func (r *PowerNodeReconciler) Reconcile(c context.Context, req ctrl.Request) (ctrl.Result, error)

func (*PowerNodeReconciler) SetupWithManager

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

type PowerPodReconciler

type PowerPodReconciler struct {
	client.Client
	Log                logr.Logger
	Scheme             *runtime.Scheme
	State              *podstate.State
	PodResourcesClient podresourcesclient.PodResourcesClient
}

PowerPodReconciler reconciles a PowerPod object

func (*PowerPodReconciler) Reconcile

func (r *PowerPodReconciler) Reconcile(c context.Context, req ctrl.Request) (ctrl.Result, error)

func (*PowerPodReconciler) SetupWithManager

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

type PowerProfileReconciler

type PowerProfileReconciler struct {
	client.Client
	Log          logr.Logger
	Scheme       *runtime.Scheme
	PowerLibrary power.Host
}

PowerProfileReconciler reconciles a PowerProfile object

func (*PowerProfileReconciler) Reconcile

Reconcile method that implements the reconcile loop

func (*PowerProfileReconciler) SetupWithManager

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

SetupWithManager specifies how the controller is built and watch a CR and other resources that are owned and managed by the controller

type PowerWorkloadReconciler

type PowerWorkloadReconciler struct {
	client.Client
	Log          logr.Logger
	Scheme       *runtime.Scheme
	PowerLibrary power.Host
}

PowerWorkloadReconciler reconciles a PowerWorkload object

func (*PowerWorkloadReconciler) Reconcile

func (*PowerWorkloadReconciler) SetupWithManager

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

type TimeOfDayCronJobReconciler

type TimeOfDayCronJobReconciler struct {
	client.Client
	Log          logr.Logger
	Scheme       *runtime.Scheme
	State        *podstate.State
	PowerLibrary power.Host
}

TimeOfDayCronJobReconciler reconciles a TimeOfDayCronJob object

func (*TimeOfDayCronJobReconciler) Reconcile

+kubebuilder:rbac:groups=power.intel.com,resources=timeofdaycronjobs,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=power.intel.com,resources=timeofdaycronjobs/status,verbs=get;update;patch +kubebuilder:rbac:groups=security.openshift.io,resources=securitycontextconstraints,resourceNames=privileged,verbs=use Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the TimeOfDayCronJob object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.6.4/pkg/reconcile

func (*TimeOfDayCronJobReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type TimeOfDayReconciler

type TimeOfDayReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

TimeOfDayReconciler reconciles a TimeOfDay object

func (*TimeOfDayReconciler) Reconcile

func (r *TimeOfDayReconciler) Reconcile(c context.Context, req ctrl.Request) (ctrl.Result, error)

func (*TimeOfDayReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type UncoreReconciler

type UncoreReconciler struct {
	client.Client
	Log          logr.Logger
	Scheme       *runtime.Scheme
	PowerLibrary power.Host
}

UncoreReconciler reconciles a Uncore object

func (*UncoreReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Uncore object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.13.1/pkg/reconcile

func (*UncoreReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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