Documentation ¶
Index ¶
- func DecideActuationMode(cc opv1beta1.ConfigConnector, ccc opv1beta1.ConfigConnectorContext) opv1beta1.ActuationMode
- func FetchLiveKCCState(ctx context.Context, c client.Client, resourceNN types.NamespacedName) (opv1beta1.ConfigConnector, opv1beta1.ConfigConnectorContext, error)
- func ShouldSkip(u *unstructured.Unstructured) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecideActuationMode ¶ added in v1.114.0
func DecideActuationMode(cc opv1beta1.ConfigConnector, ccc opv1beta1.ConfigConnectorContext) opv1beta1.ActuationMode
DecideActuationMode looks at CC and CCC to see if they specify an actuationMode. - If both CC & CCC specify a actuationMode in Namespaced mode, we defer to the CCC's value.
- If only CC specifies a actuationMode in Namespaced mode, we defer to the CC's value.
- If both CC & CCC specify an actuationMode in cluster mode, the CCC specification is irrelevant. - If neither CC nor CCC specify a actuationMode, we defer to the default value defined in apis.
func FetchLiveKCCState ¶ added in v1.114.0
func FetchLiveKCCState(ctx context.Context, c client.Client, resourceNN types.NamespacedName) (opv1beta1.ConfigConnector, opv1beta1.ConfigConnectorContext, error)
FetchLiveKCCState tries to fetch the ConfigConnector (CC) resource and the ConfigConnectorContext (CCC) for the resource's namespace if running in Namespaced mode. It ignores not found errors for CC fetching but errors out if KCC is running in Namespaced mode and no CCC is found for the namespace of the resource.
func ShouldSkip ¶
func ShouldSkip(u *unstructured.Unstructured) (bool, error)
ShouldSkip skips a resource actuatation if the ReconcileIntervalInSecondsAnnotation = 0 and the KRM resource has not changed since its last UpToDate. This will disable drift correction on corresponding GCP resources since the reconcileInterval is set to 0.
Types ¶
This section is empty.