Documentation ¶
Index ¶
- func IsAdopted(res acktypes.AWSResource) bool
- func IsSynced(res acktypes.AWSResource) bool
- func NewReconciler(rmf acktypes.AWSResourceManagerFactory, log logr.Logger, cfg ackcfg.Config, ...) acktypes.AWSResourceReconciler
- func NewSession(region ackv1alpha1.AWSRegion, assumeRoleARN ackv1alpha1.AWSResourceName, ...) (*session.Session, error)
- type Registry
- type ServiceController
- func (c *ServiceController) BindControllerManager(mgr ctrlrt.Manager, cfg ackcfg.Config) error
- func (c *ServiceController) GetReconcilers() []acktypes.AWSResourceReconciler
- func (c *ServiceController) WithLogger(log logr.Logger) *ServiceController
- func (c *ServiceController) WithPrometheusRegistry(reg prometheus.Registerer) *ServiceController
- func (c *ServiceController) WithResourceManagerFactories(rmfs []acktypes.AWSResourceManagerFactory) *ServiceController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 NewReconciler ¶
func NewReconciler( rmf acktypes.AWSResourceManagerFactory, log logr.Logger, cfg ackcfg.Config, metrics *ackmetrics.Metrics, ) acktypes.AWSResourceReconciler
NewReconciler returns a new reconciler object that
func NewSession ¶
func NewSession( region ackv1alpha1.AWSRegion, assumeRoleARN ackv1alpha1.AWSResourceName, groupVersionKind schema.GroupVersionKind, ) (*session.Session, error)
NewSession returns a new session object. Buy default the returned session is created using pod IRSA environment variables. If assumeRoleARN is not empty, NewSession will call STS::AssumeRole and use the returned credentials to create the session.
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
type ServiceController ¶
type ServiceController struct { // ServiceAlias is a string with the alias of the service API, e.g. "s3" ServiceAlias string // ServiceAPIGroup is a string with the full DNS-correct API group that // this service controller manages, e.g. "s3.services.k8s.aws" ServiceAPIGroup string // contains filtered or unexported fields }
ServiceController wraps a number of `controller-runtime.Reconciler` that are related to a specific AWS service API.
func NewServiceController ¶
func NewServiceController( svcAlias string, svcAPIGroup string, ) *ServiceController
NewServiceController returns a new ServiceController instance
func (*ServiceController) BindControllerManager ¶
BindControllerManager takes a `controller-runtime.Manager`, creates all the AWSResourceReconcilers needed for the service and binds all of the reconcilers within the service controller with that manager
func (*ServiceController) GetReconcilers ¶
func (c *ServiceController) GetReconcilers() []acktypes.AWSResourceReconciler
GetReconcilers returns a slice of types.AWSResourceReconcilers associated with this service controller
func (*ServiceController) WithLogger ¶
func (c *ServiceController) WithLogger(log logr.Logger) *ServiceController
WithLogger sets up the service controller with the supplied logger
func (*ServiceController) WithPrometheusRegistry ¶ added in v0.0.2
func (c *ServiceController) WithPrometheusRegistry( reg prometheus.Registerer, ) *ServiceController
WithPrometheusRegistry registers all ACK service controller metrics with the supplied prometheus Registry
func (*ServiceController) WithResourceManagerFactories ¶
func (c *ServiceController) WithResourceManagerFactories( rmfs []acktypes.AWSResourceManagerFactory, ) *ServiceController
WithResourceManagerFactories sets the controller up to manage resources with a set of supplied factories