Documentation
¶
Index ¶
- func ApplyKCCTargetConfigToCNC(cnc *apisv1alpha1.CustomNodeConfig, gvr metav1.GroupVersionResource, ...)
- func EnsureKCCTargetFinalizer(ctx context.Context, unstructuredControl control.UnstructuredControl, ...) (*unstructured.Unstructured, error)
- func FindMatchedKCCTargetConfigForNode(cnc *apisv1alpha1.CustomNodeConfig, kccTargetList []util.KCCTargetResource) (*util.KCCTargetResource, error)
- func IsCNCUpdated(cnc *apisv1alpha1.CustomNodeConfig, gvr metav1.GroupVersionResource, ...) bool
- func RemoveKCCTargetFinalizers(ctx context.Context, unstructuredControl control.UnstructuredControl, ...) error
- func UpdateKCCTGenericConditions(status *apisv1alpha1.GenericConfigStatus, ...) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyKCCTargetConfigToCNC ¶
func ApplyKCCTargetConfigToCNC( cnc *apisv1alpha1.CustomNodeConfig, gvr metav1.GroupVersionResource, targetResource util.KCCTargetResource, hash string, )
ApplyKCCTargetConfigToCNC sets the hash value for the given configurations in CNC
func EnsureKCCTargetFinalizer ¶
func EnsureKCCTargetFinalizer(ctx context.Context, unstructuredControl control.UnstructuredControl, finalizerName string, gvr metav1.GroupVersionResource, target *unstructured.Unstructured, ) (*unstructured.Unstructured, error)
EnsureKCCTargetFinalizer is used to add finalizer in kcc target any component (that depends on kcc target) should add a specific finalizer in the target CR
func FindMatchedKCCTargetConfigForNode ¶
func FindMatchedKCCTargetConfigForNode( cnc *apisv1alpha1.CustomNodeConfig, kccTargetList []util.KCCTargetResource, ) (*util.KCCTargetResource, error)
FindMatchedKCCTargetConfigForNode finds the KCC target that should be applied to this CNC. The KCCTs passed in must be non-terminating and updated. The rule of cnc match to config is: 1. if there is only one matched nodeNames config, return it 2. if there is only one matched labelSelector config with the highest priority, return it 3. if there is only one global config (neither nodeNames nor labelSelector exists), return it 4. otherwise, return nil to keep current state no changed
func IsCNCUpdated ¶ added in v0.5.14
func IsCNCUpdated( cnc *apisv1alpha1.CustomNodeConfig, gvr metav1.GroupVersionResource, targetResource util.KCCTargetResource, hash string, ) bool
func RemoveKCCTargetFinalizers ¶ added in v0.5.14
func RemoveKCCTargetFinalizers( ctx context.Context, unstructuredControl control.UnstructuredControl, gvr metav1.GroupVersionResource, target *unstructured.Unstructured, finalizers ...string, ) error
RemoveKCCTargetFinalizers removes finalizer(s) in kcc target
func UpdateKCCTGenericConditions ¶
func UpdateKCCTGenericConditions(status *apisv1alpha1.GenericConfigStatus, conditionType apisv1alpha1.ConfigConditionType, conditionStatus v1.ConditionStatus, reason, message string, ) bool
UpdateKCCTGenericConditions is used to update conditions for kcc
Types ¶
This section is empty.