Help us shape the future of Go! Take the 2026 Go Developer Survey

deletecomplete

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package deletecomplete provides the durable record a controller uses to tell the Crossplane managed reconciler that it has finished releasing the external resource it owns.

The reconciler removes a managed resource's finalizer only once Observe reports the external resource as gone, and while Observe keeps reporting it present it re-runs Delete on every pass - it deliberately requeues to verify the external resource actually disappeared. A controller therefore has to be able to say "gone" at some point, or the object never terminates.

Delete has no channel to report completion through, so controllers record it here and Observe reports ResourceExists: false once it is present.

Index

Constants

View Source
const (
	// Annotation records that Delete has finished releasing the external
	// resource this managed resource owns.
	Annotation = "keycloak.m.crossplane.io/delete-completed"

	// AnnotationValue is the only value that counts as complete.
	AnnotationValue = "true"

	// ErrMarkFailed is returned when completion cannot be persisted.
	ErrMarkFailed = "cannot record that the external resource was released"
)

Variables

This section is empty.

Functions

func Done

func Done(o client.Object) bool

Done reports whether deletion has already been recorded as complete.

func Mark

func Mark(ctx context.Context, kube client.Client, o client.Object) error

Mark records that the external resource has been released.

The annotation is persisted with an explicit patch rather than assigned in memory, because the reconciler only writes back status - a metadata change made inside an external client is otherwise discarded with the reconcile.

Callers must not call Mark when release failed, or the finalizer will be removed while the external resource still exists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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