Documentation ¶
Index ¶
- Constants
- Variables
- func GetAuthnKeychain(ctx context.Context, spec types.ImageSpec, clnt client.Client) (authn.Keychain, error)
- func PostRunCreateCR(ctx context.Context, skr declarative.Client, kcp client.Client, ...) error
- func PreDeleteDeleteCR(ctx context.Context, skr declarative.Client, kcp client.Client, ...) error
- type ManifestCustomResourceReadyCheck
- type ManifestSpecResolver
- type RESTConfigGetter
- type RemoteClusterLookup
Constants ¶
const CustomResourceManager = "resource.kyma-project.io/finalizer"
Variables ¶
var ErrCustomResourceStateNotFound = errors.New("custom resource state not found")
var ErrNoAuthSecretFound = errors.New("no auth secret found")
var ErrWaitingForAsyncCustomResourceDeletion = errors.New(
"deletion of custom resource was triggered and is now waiting to be completed",
)
Functions ¶
func GetAuthnKeychain ¶
func PostRunCreateCR ¶
func PostRunCreateCR( ctx context.Context, skr declarative.Client, kcp client.Client, obj declarative.Object, ) error
PostRunCreateCR is a hook for creating the manifest default custom resource if not available in the cluster It is used to provide the controller with default data in the Runtime.
func PreDeleteDeleteCR ¶
func PreDeleteDeleteCR( ctx context.Context, skr declarative.Client, kcp client.Client, obj declarative.Object, ) error
PreDeleteDeleteCR is a hook for deleting the manifest default custom resource if available in the cluster It is used to clean up the controller default data. It uses DeletePropagationBackground as it will return an error if the resource exists, even if deletion is triggered This leads to the reconciled resource immediately being requeued due to ErrWaitingForAsyncCustomResourceDeletion. In this case, the next time it will run into this delete function, it will either say that the resource is already being deleted (2xx) and retry or its no longer found. Then the finalizer is dropped, and we consider the CR removal successful.
Types ¶
type ManifestCustomResourceReadyCheck ¶
type ManifestCustomResourceReadyCheck struct{}
func NewManifestCustomResourceReadyCheck ¶
func NewManifestCustomResourceReadyCheck() *ManifestCustomResourceReadyCheck
NewManifestCustomResourceReadyCheck creates a readiness check that verifies that the Resource in the Manifest returns the ready state, if not it returns not ready.
func (*ManifestCustomResourceReadyCheck) Run ¶
func (c *ManifestCustomResourceReadyCheck) Run( ctx context.Context, clnt declarative.Client, obj declarative.Object, _ []*resource.Info, ) error
type ManifestSpecResolver ¶
type ManifestSpecResolver struct { KCP client.Client *types.Codec Insecure bool ChartCache string // contains filtered or unexported fields }
func NewManifestSpecResolver ¶
func NewManifestSpecResolver(codec *types.Codec, insecure bool) *ManifestSpecResolver
func (*ManifestSpecResolver) Spec ¶
func (m *ManifestSpecResolver) Spec(ctx context.Context, obj declarative.Object) (*declarative.Spec, error)
type RESTConfigGetter ¶
type RemoteClusterLookup ¶
type RemoteClusterLookup struct { KCP *types.ClusterInfo ConfigGetter RESTConfigGetter }
func (*RemoteClusterLookup) ConfigResolver ¶
func (r *RemoteClusterLookup) ConfigResolver(ctx context.Context, obj declarative.Object) (*types.ClusterInfo, error)