Documentation ¶
Index ¶
Constants ¶
const ( ArchitecturePredicatesConflict = "ArchAwarePredicatesConflict" ImageArchitectureInspectionError = "ArchAwareInspectionError" ArchitectureAwareNodeAffinitySet = "ArchAwarePredicateSet" ArchitectureAwareGatedPodIgnored = "ArchAwareGatedPodIgnored" ArchitectureAwareSchedulingGateAdded = "ArchAwareSchedGateAdded" ArchitectureAwareSchedulingGateRemovalFailure = "ArchAwareSchedGateRemovalFailed" ArchitectureAwareSchedulingGateRemovalSuccess = "ArchAwareSchedGateRemovalSuccess" NoSupportedArchitecturesFound = "NoSupportedArchitecturesFound" SchedulingGateAddedMsg = "Successfully gated with the " + utils.SchedulingGateName + " scheduling gate" SchedulingGateRemovalSuccessMsg = "Successfully removed the " + utils.SchedulingGateName + " scheduling gate" SchedulingGateRemovalFailureMsg = "Failed to remove the scheduling gate \"" + utils.SchedulingGateName + "\"" ArchitecturePredicatesConflictMsg = "All the scheduling predicates already include architecture-specific constraints" ArchitecturePredicateSetupMsg = "Set the nodeAffinity for the architecture to " ImageArchitectureInspectionErrorMsg = "Failed to retrieve the supported architectures: " NoSupportedArchitecturesFoundMsg = "Pod cannot be scheduled due to incompatible image architectures; container images have no supported architectures in common" ArchitectureAwareGatedPodIgnoredMsg = "The gated pod has been modified and is no longer eligible for architecture-aware scheduling" ImageInspectionErrorMaxRetriesMsg = "Failed to retrieve the supported architectures after multiple retries" )
const MaxRetryCount = 5
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigSyncerRunnable ¶
type ConfigSyncerRunnable struct {
// contains filtered or unexported fields
}
func NewConfigSyncerRunnable ¶
func NewConfigSyncerRunnable() *ConfigSyncerRunnable
type GlobalPullSecretSyncer ¶
type GlobalPullSecretSyncer struct {
// contains filtered or unexported fields
}
func NewGlobalPullSecretSyncer ¶
func NewGlobalPullSecretSyncer(clientSet *kubernetes.Clientset, namespace, name string) *GlobalPullSecretSyncer
type ICSPSyncer ¶
type ICSPSyncer struct {
// contains filtered or unexported fields
}
func NewICSPSyncer ¶
func NewICSPSyncer(mgr manager.Manager) *ICSPSyncer
type IDMSSyncer ¶
type IDMSSyncer struct {
// contains filtered or unexported fields
}
func NewIDMSSyncer ¶
func NewIDMSSyncer(mgr manager.Manager) *IDMSSyncer
type ITMSSyncer ¶
type ITMSSyncer struct {
// contains filtered or unexported fields
}
func NewITMSSyncer ¶
func NewITMSSyncer(mgr manager.Manager) *ITMSSyncer
type ImageRegistryConfigSyncer ¶
type ImageRegistryConfigSyncer struct {
// contains filtered or unexported fields
}
func NewImageRegistryConfigSyncer ¶
func NewImageRegistryConfigSyncer(mgr manager.Manager) *ImageRegistryConfigSyncer
type Pod ¶
func (*Pod) GetPodImagePullSecrets ¶
func (*Pod) HasSchedulingGate ¶
func (*Pod) RemoveSchedulingGate ¶
func (pod *Pod) RemoveSchedulingGate()
func (*Pod) SetNodeAffinityArchRequirement ¶
SetNodeAffinityArchRequirement wraps the logic to set the nodeAffinity for the pod. It verifies first that no nodeSelector field is set for the kubernetes.io/arch label. Then, it computes the intersection of the architectures supported by the images used by the pod via pod.getArchitecturePredicate. Finally, it initializes the nodeAffinity for the pod and set it to the computed requirement via the pod.setArchNodeAffinity method.
type PodReconciler ¶
type PodReconciler struct { client.Client Scheme *runtime.Scheme ClientSet *kubernetes.Clientset Recorder record.EventRecorder }
PodReconciler reconciles a Pod object
func (*PodReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. the Pod 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.14.1/pkg/reconcile Reconcile has to watch the pod object if it has the scheduling gate with name SchedulingGateName, inspect the images in the pod spec, update the nodeAffinity accordingly and remove the scheduling gate.
func (*PodReconciler) SetupWithManager ¶
func (r *PodReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type PodSchedulingGateMutatingWebHook ¶
type PodSchedulingGateMutatingWebHook struct {
// contains filtered or unexported fields
}
PodSchedulingGateMutatingWebHook annotates Pods
func NewPodSchedulingGateMutatingWebHook ¶
func NewPodSchedulingGateMutatingWebHook(client client.Client, clientSet *kubernetes.Clientset, scheme *runtime.Scheme, recorder record.EventRecorder, workerPool *ants.MultiPool) *PodSchedulingGateMutatingWebHook
type RegistryCertificatesSyncer ¶
type RegistryCertificatesSyncer struct {
// contains filtered or unexported fields
}
RegistryCertificatesSyncer watches a configmap (openshift-image-registry/image-registry-certificates) and updates the registry certificates accordingly by using the SystemConfigSyncer. The configuration written by the SystemConfigSyncer due to the RegistryCertificatesSyncer is stored in-memory in the SystemConfigSyncer.registryCertTuples (type []system_config.registryCertTuple) and written to disk in the $conf_dir/docker/certs.d directory. In particular, an example of the configuration written by the SystemConfigSyncer due to the RegistryCertificatesSyncer in $conf_dir/docker/certs.d is: $conf_dir/docker/certs.d/registry.redhat.io/ca.crt $conf_dir/docker/certs.d/registry.redhat.io:5000/ca.crt
func NewRegistryCertificatesSyncer ¶
func NewRegistryCertificatesSyncer(clientSet *kubernetes.Clientset, namespace, name string) *RegistryCertificatesSyncer