Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ARMResourceModifier ¶
type ARMResourceModifier interface {
// ModifyARMResource takes a genruntime.ARMResource and returns an updated genruntime.ARMResource. The updated resource
// is then serialized and sent to ARM in the body of a PUT request.
ModifyARMResource(
ctx context.Context,
armObj genruntime.ARMResource,
obj genruntime.MetaObject,
kubeClient kubeclient.Client,
resolver *resolver.Resolver,
log logr.Logger) (genruntime.ARMResource, error)
}
ARMResourceModifier provides a hook allowing resources to modify the payload that will be sent to ARM just before it is sent.
type ARMResourceModifierFunc ¶
type ARMResourceModifierFunc = func(ctx context.Context, obj genruntime.MetaObject, armObj genruntime.ARMResource) (genruntime.ARMResource, error)
func CreateARMResourceModifier ¶
func CreateARMResourceModifier( host genruntime.ResourceExtension, kubeClient kubeclient.Client, resolver *resolver.Resolver, log logr.Logger) ARMResourceModifierFunc
CreateARMResourceModifier returns a function that performs per-resource modifications. If the ARMResourceModifier extension has not been implemented for the resource in question, the default behavior is to return the provided genruntime.ARMResource unmodified.
type ErrorClassifier ¶
type ErrorClassifier interface {
// ClassifyError evaluates the provided error, returning including whether it is fatal or can be retried.
// cloudError is the error returned from ARM.
// apiVersion is the ARM API version used for the request.
// log is a logger than can be used for telemetry.
// next is the next implementation to call.
ClassifyError(
cloudError *genericarmclient.CloudError,
apiVersion string,
log logr.Logger,
next ErrorClassifierFunc) (core.CloudErrorDetails, error)
}
ErrorClassifier can be implemented to customize how the reconciler reacts to specific errors
type ErrorClassifierFunc ¶
type ErrorClassifierFunc func(cloudError *genericarmclient.CloudError) (core.CloudErrorDetails, error)
ErrorClassifierFunc is the signature of a function that can be used to create a DefaultErrorClassifier
func CreateErrorClassifier ¶
func CreateErrorClassifier( host genruntime.ResourceExtension, classifier ErrorClassifierFunc, apiVersion string, log logr.Logger) ErrorClassifierFunc
type SecretRetrievalFunc ¶
type SecretRetrievalFunc = func(obj genruntime.MetaObject) ([]*corev1.Secret, error)
func CreateSecretRetriever ¶
func CreateSecretRetriever( ctx context.Context, host genruntime.ResourceExtension, armClient *genericarmclient.GenericClient, log logr.Logger) SecretRetrievalFunc
CreateSecretRetriever creates a function to retrieve secrets from Azure. If the resource in question has not been configured with the SecretsRetriever extension, the returned function is a no-op.
type SecretsRetriever ¶
type SecretsRetriever interface {
// RetrieveSecrets is called to retrieve secrets from Azure. The generic controller
// will write the secrets to their destination.
RetrieveSecrets(
ctx context.Context,
obj genruntime.MetaObject,
armClient *genericarmclient.GenericClient,
log logr.Logger) ([]*corev1.Secret, error)
}
SecretsRetriever is an extension interface which allows code-generated resources to include manual implementations querying Azure for secrets, which can then be written to Kubernetes (or elsewhere).