Documentation ¶
Index ¶
- Constants
- func CreateOrFindOU(reqLogger logr.Logger, client awsclient.Client, ouName string, baseID string) (string, error)
- func DeleteBucketContent(awsClient awsclient.Client, bucketName string) error
- func MoveAccount(reqLogger logr.Logger, client awsclient.Client, account *awsv1alpha1.Account, ...) error
- func MoveAccountToOU(r *AccountClaimReconciler, reqLogger logr.Logger, awsClient awsclient.Client, ...) error
- type AccountClaimReconciler
- func (r *AccountClaimReconciler) CleanUpAwsAccountVpcEndpointServiceConfigurations(reqLogger logr.Logger, awsClient awsclient.Client, ...) error
- func (r *AccountClaimReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
- func (r *AccountClaimReconciler) SetupWithManager(mgr ctrl.Manager) error
Constants ¶
const ( // AccountClaimed indicates the account has been claimed in the accountClaim status AccountClaimed = "AccountClaimed" // AccountUnclaimed indicates the account has not been claimed in the accountClaim status AccountUnclaimed = "AccountUnclaimed" )
const ( // AccountReady indicates account creation is ready AccountReady = "Ready" // AccountFailed indicates account reuse has failed AccountFailed = "Failed" )
Variables ¶
This section is empty.
Functions ¶
func CreateOrFindOU ¶
func CreateOrFindOU(reqLogger logr.Logger, client awsclient.Client, ouName string, baseID string) (string, error)
CreateOrFindOU will create or find an existing OU and return its ID
func DeleteBucketContent ¶
DeleteBucketContent deletes any content in a bucket if it is not empty
func MoveAccount ¶
func MoveAccount(reqLogger logr.Logger, client awsclient.Client, account *awsv1alpha1.Account, ouID string, parentID string) error
MoveAccount will take an account and move it into the specified OU
func MoveAccountToOU ¶
func MoveAccountToOU(r *AccountClaimReconciler, reqLogger logr.Logger, awsClient awsclient.Client, accountClaim *awsv1alpha1.AccountClaim, account *awsv1alpha1.Account) error
MoveAccountToOU takes care of all the logic surrounding moving an account into an OU
Types ¶
type AccountClaimReconciler ¶
type AccountClaimReconciler struct { client.Client Scheme *runtime.Scheme // contains filtered or unexported fields }
AccountClaimReconciler reconciles a AccountClaim object
func NewAccountClaimReconciler ¶
func NewAccountClaimReconciler(client client.Client, scheme *runtime.Scheme, awsClientBuilder awsclient.IBuilder) *AccountClaimReconciler
NewReconcileAccountClaim initializes ReconcileAccountClaim
func (*AccountClaimReconciler) CleanUpAwsAccountVpcEndpointServiceConfigurations ¶
func (*AccountClaimReconciler) Reconcile ¶
func (r *AccountClaimReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile reads that state of the cluster for a AccountClaim object and makes changes based on the state read and what is in the AccountClaim.Spec The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
func (*AccountClaimReconciler) SetupWithManager ¶
func (r *AccountClaimReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.