Documentation ¶
Index ¶
- Constants
- Variables
- func GetDefaultTags(config *ackconfig.Config, obj rtclient.Object, ...) acktags.Tags
- func IsAdopted(res acktypes.AWSResource) bool
- func IsSynced(res acktypes.AWSResource) bool
- func NewAdoptionReconciler(sc acktypes.ServiceController, log logr.Logger, cfg ackcfg.Config, ...) acktypes.AdoptedResourceReconciler
- func NewAdoptionReconcilerWithClient(sc acktypes.ServiceController, log logr.Logger, cfg ackcfg.Config, ...) acktypes.AdoptedResourceReconciler
- func NewFieldExportReconcilerForAWSResource(sc acktypes.ServiceController, log logr.Logger, cfg ackcfg.Config, ...) acktypes.FieldExportReconciler
- func NewFieldExportReconcilerForFieldExport(sc acktypes.ServiceController, log logr.Logger, cfg ackcfg.Config, ...) acktypes.FieldExportReconciler
- func NewFieldExportReconcilerWithClient(sc acktypes.ServiceController, log logr.Logger, cfg ackcfg.Config, ...) acktypes.FieldExportReconciler
- func NewFieldExportResourceReconcilerWithClient(sc acktypes.ServiceController, log logr.Logger, cfg ackcfg.Config, ...) acktypes.FieldExportReconciler
- func NewReconciler(sc acktypes.ServiceController, rmf acktypes.AWSResourceManagerFactory, ...) acktypes.AWSResourceReconciler
- func NewReconcilerWithClient(sc acktypes.ServiceController, kc client.Client, ...) acktypes.AWSResourceReconciler
- func NewServiceController(svcAlias string, svcAPIGroup string, svcEndpointsID string, ...) acktypes.ServiceController
- type Registry
Constants ¶
const ( // MissingImageTagValue is the placeholder value when ACK controller // image tag(release semver) cannot be determined. MissingImageTagValue = "unknown" )
Variables ¶
var ACKResourceTagFormats = map[string]resolveTagFormat{ acktags.ServiceAliasTagFormat: func( obj rtclient.Object, md acktypes.ServiceControllerMetadata, ) string { return md.ServiceAlias }, acktags.ControllerVersionTagFormat: func( obj rtclient.Object, md acktypes.ServiceControllerMetadata, ) string { controllerImageTag := md.GitVersion if controllerImageTag == "" { controllerImageTag = MissingImageTagValue } return controllerImageTag }, acktags.NamespaceTagFormat: func( obj rtclient.Object, md acktypes.ServiceControllerMetadata, ) string { return obj.GetNamespace() }, acktags.ResourceNameTagFormat: func( obj rtclient.Object, md acktypes.ServiceControllerMetadata, ) string { return obj.GetName() }, }
ACKResourceTagFormats is map of ACK resource tag formats to it's resolveTagFormat function.
To add a new ACKResourceTag format, include it in this map, along with the resolveTagFormat function and expandTagValue() method will start expanding the new resource tag format.
var (
UnstructuredConverter runtime.UnstructuredConverter = runtime.DefaultUnstructuredConverter
)
Localise the global to make it easier to mock
Functions ¶
func GetDefaultTags ¶
func GetDefaultTags( config *ackconfig.Config, obj rtclient.Object, md acktypes.ServiceControllerMetadata, ) acktags.Tags
GetDefaultTags provides Default tags (key value pairs) for given resource
func IsAdopted ¶
func IsAdopted(res acktypes.AWSResource) bool
IsAdopted returns true if the supplied AWSResource was created with a non-nil ARN annotation, which indicates that the Kubernetes user who created the CR for the resource expects the ACK service controller to "adopt" a pre-existing resource and bring it under ACK management.
func IsSynced ¶
func IsSynced(res acktypes.AWSResource) bool
IsSynced returns true if the supplied AWSResource's CR and associated backend AWS service API resource are in sync.
func NewAdoptionReconciler ¶ added in v0.1.0
func NewAdoptionReconciler( sc acktypes.ServiceController, log logr.Logger, cfg ackcfg.Config, metrics *ackmetrics.Metrics, cache ackrtcache.Caches, ) acktypes.AdoptedResourceReconciler
NewAdoptionReconciler returns a new adoptionReconciler object
func NewAdoptionReconcilerWithClient ¶ added in v0.14.1
func NewAdoptionReconcilerWithClient( sc acktypes.ServiceController, log logr.Logger, cfg ackcfg.Config, metrics *ackmetrics.Metrics, cache ackrtcache.Caches, kc client.Client, apiReader client.Reader, ) acktypes.AdoptedResourceReconciler
NewAdoptionReconcilerWithClient returns a new adoptionReconciler object with specified k8s client and Reader. Currently this function is used for testing purpose only because "adoptionReconciler" struct is not available outside 'runtime' package for dependency injection.
func NewFieldExportReconcilerForAWSResource ¶ added in v0.18.0
func NewFieldExportReconcilerForAWSResource( sc acktypes.ServiceController, log logr.Logger, cfg ackcfg.Config, metrics *ackmetrics.Metrics, cache ackrtcache.Caches, rd acktypes.AWSResourceDescriptor, ) acktypes.FieldExportReconciler
NewFieldExportReconcilerForAWSResource returns a new FieldExportReconciler object
func NewFieldExportReconcilerForFieldExport ¶ added in v0.18.0
func NewFieldExportReconcilerForFieldExport( sc acktypes.ServiceController, log logr.Logger, cfg ackcfg.Config, metrics *ackmetrics.Metrics, cache ackrtcache.Caches, ) acktypes.FieldExportReconciler
NewFieldExportReconcilerForFieldExport returns a new FieldExportReconciler object
func NewFieldExportReconcilerWithClient ¶ added in v0.18.0
func NewFieldExportReconcilerWithClient( sc acktypes.ServiceController, log logr.Logger, cfg ackcfg.Config, metrics *ackmetrics.Metrics, cache ackrtcache.Caches, kc client.Client, apiReader client.Reader, ) acktypes.FieldExportReconciler
NewFieldExportReconcilerWithClient returns a new FieldExportReconciler object with specified k8s client and Reader. Currently this function is used for testing purpose only because "FieldExportReconciler" struct is not available outside 'runtime' package for dependency injection.
func NewFieldExportResourceReconcilerWithClient ¶ added in v0.18.0
func NewFieldExportResourceReconcilerWithClient( sc acktypes.ServiceController, log logr.Logger, cfg ackcfg.Config, metrics *ackmetrics.Metrics, cache ackrtcache.Caches, kc client.Client, apiReader client.Reader, rd acktypes.AWSResourceDescriptor, ) acktypes.FieldExportReconciler
NewFieldExportResourceReconcilerWithClient returns a new FieldExportReconciler object with specified k8s client and Reader. Currently this function is used for testing purpose only because "FieldExportReconciler" struct is not available outside 'runtime' package for dependency injection.
func NewReconciler ¶
func NewReconciler( sc acktypes.ServiceController, rmf acktypes.AWSResourceManagerFactory, log logr.Logger, cfg ackcfg.Config, metrics *ackmetrics.Metrics, cache ackrtcache.Caches, ) acktypes.AWSResourceReconciler
NewReconciler returns a new reconciler object
func NewReconcilerWithClient ¶ added in v0.7.0
func NewReconcilerWithClient( sc acktypes.ServiceController, kc client.Client, rmf acktypes.AWSResourceManagerFactory, log logr.Logger, cfg ackcfg.Config, metrics *ackmetrics.Metrics, cache ackrtcache.Caches, ) acktypes.AWSResourceReconciler
NewReconcilerWithClient returns a new reconciler object with Client(controller-runtime/pkg/client) already set.
func NewServiceController ¶
func NewServiceController( svcAlias string, svcAPIGroup string, svcEndpointsID string, versionInfo acktypes.VersionInfo, ) acktypes.ServiceController
NewServiceController returns a new serviceController instance
Types ¶
type Registry ¶
func (*Registry) GetResourceManagerFactories ¶
func (r *Registry) GetResourceManagerFactories() []types.AWSResourceManagerFactory
GetResourceManagerFactories returns AWSResourceManagerFactories that are registered with the RegistryA
func (*Registry) RegisterResourceManagerFactory ¶
func (r *Registry) RegisterResourceManagerFactory(f types.AWSResourceManagerFactory)
RegisterResourceManagerFactory registers a resource manager factory with the package's registry