Documentation ¶
Index ¶
- func GetOpsRequestSliceFromCluster(cluster *appsv1alpha1.Cluster) ([]appsv1alpha1.OpsRecorder, error)
- func MarkRunningOpsRequestAnnotation(ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster) error
- func PatchClusterOpsAnnotations(ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster, ...) error
- func PatchOpsRequestReconcileAnnotation(ctx context.Context, cli client.Client, namespace string, ...) error
- func RemoveClusterInvalidOpsRequestAnnotation(ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster, ...) error
- func UpdateClusterOpsAnnotations(ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOpsRequestSliceFromCluster ¶
func GetOpsRequestSliceFromCluster(cluster *appsv1alpha1.Cluster) ([]appsv1alpha1.OpsRecorder, error)
GetOpsRequestSliceFromCluster gets OpsRequest slice from cluster annotations. this records what OpsRequests are running in cluster
func MarkRunningOpsRequestAnnotation ¶
func MarkRunningOpsRequestAnnotation(ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster) error
MarkRunningOpsRequestAnnotation marks reconcile annotation to the OpsRequest which is running in the cluster. then the related OpsRequest can reconcile. Note: if the client-go fetches the Cluster resources from cache, it should record the Cluster.ResourceVersion to check if the Cluster object from client-go is the latest in OpsRequest controller. @return could return ErrNoOps
func PatchClusterOpsAnnotations ¶
func PatchClusterOpsAnnotations(ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster, opsRequestSlice []appsv1alpha1.OpsRecorder) error
PatchClusterOpsAnnotations patches OpsRequest annotation in Cluster.annotations
func PatchOpsRequestReconcileAnnotation ¶
func PatchOpsRequestReconcileAnnotation(ctx context.Context, cli client.Client, namespace string, opsRequestName string) error
PatchOpsRequestReconcileAnnotation patches the reconcile annotation to OpsRequest
func RemoveClusterInvalidOpsRequestAnnotation ¶
func RemoveClusterInvalidOpsRequestAnnotation( ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster, opsRequestSlice []appsv1alpha1.OpsRecorder, notExistOps map[string]struct{}) error
RemoveClusterInvalidOpsRequestAnnotation deletes the OpsRequest annotation in cluster when the OpsRequest not existing.
func UpdateClusterOpsAnnotations ¶
func UpdateClusterOpsAnnotations(ctx context.Context, cli client.Client, cluster *appsv1alpha1.Cluster, opsRequestSlice []appsv1alpha1.OpsRecorder) error
UpdateClusterOpsAnnotations updates OpsRequest annotation in Cluster.annotations
Types ¶
This section is empty.