# Functions
AccountCRHasIAMUserIDLabel check for label.
AddControllerMetricsTransportWrapper adds a transport wrapper to the given rest config which exposes metrics based on the requests being made.
AddFinalizer adds a finalizer to an object.
AddLabels adds a map of labels to an object.
Contains returns true a list of strings includes a specific string.
creationOlderThan returns true if the given account has been in a creation state for longer than the given time, else false.
No description provided by the author
FindAccountClaimCondition finds in the condition that has the specified condition type in the given list.
FindAccountCondition finds in the condition that has the specified condition type in the given list.
FindAWSFederatedAccountAccessCondition Condition finds in the condition that has the specified condition type in the given list.
FindAWSFederatedRoleCondition Condition finds in the condition that has the specified condition type in the given list.
GenerateLabel returns a ObjectMeta Labels.
GenerateShortUID Generates a short UID.
GetControllerMaxReconciles gets the default configMap and then gets the amount of concurrent reconciles to run from it.
No description provided by the author
GetFeatureFlagValue returns feature flag value from configMap data.
GetOperatorConfigMap retrieves the default configMap data for the AWS Account Operator from Kubernetes.
GetOperatorStartTime returns the time at which the operator was brought up, assuming said bringup was well-behaved and invoked InitOperatorStartTime().
GetServiceQuotasFromAccountPool retrieves and processes the account pool's service quotas from ConfigMap.
No description provided by the author
InitOperatorStartTime should be invoked exactly once, early in operator bringup, before controllers are started.
JoinLabelMaps adds a label to CR.
LogAwsError formats and logs aws error and returns if err was an awserr.
MarshalIAMPolicy converts a role CR into a JSON policy that is acceptable to AWS.
NewClientWithMetricsOrDie creates a new controller-runtime client with a wrapper which increments metrics for requests by controller name, HTTP method, URL path, and HTTP status.
NewReconcilerWithMetrics wraps an existing Reconciler such that calls to Reconcile report the reconcileDuration metric.
Remove removes a string from a list of strings.
No description provided by the author
No description provided by the author
SetAccountClaimCondition sets a condition on a AccountClaim resource's status TODO: this should probably be handled within the AccountClaim struct.
SetAccountClaimStatus sets the condition and state of an accountClaim.
SetAccountCondition sets a condition on a Account resource's status TODO: This should probably be handled within the Account Struct.
SetAccountStatus sets the condition and state of an account.
SetAWSFederatedAccountAccessCondition sets a condition on a Account resource's status TODO: this should be moved to the FederatedAccountAccess struct.
SetAWSFederatedRoleCondition sets a condition on a AWSFederatedRole resource's status TODO: This should be moved to the FederatedRole CR.
UpdateConditionAlways returns true.
UpdateConditionIfReasonOrMessageChange returns true if there is a change in the reason or the message of the condition.
UpdateConditionNever return false.
# Constants
#nosec G101 -- This is a false positive.
DevModeCluster should be used when doing development in a "real" cluster via a Deployment such as the one in deploy/operator.yaml.
DevModeLocal should be used when running via operator-sdk in "local" mode.
DevModeProduction (aka non-development mode) is the default running mode.
Finalizer is a constant containing the Kubernetes finalizer used by the AWS Account Operator.
SREAssumeRole is the name of the role that SREs need to use to role-chain to get temporary credentials for a CCS account.
WaitTime is the default wait time for an account to become ready, before erroring.
# Variables
No description provided by the author
DetectDevMode gets the envDevMode environment variable to detect if we are running in production or a development environment.
# Structs
No description provided by the author
The JSON tags as capitals due to requirements for the policydoc.
ControllerMetricsTripper is a RoundTripper implementation which tracks our metrics for client requests.
# Type aliases
UpdateConditionCheck tests whether a condition should be updated from the old condition to the new condition.