bootstrap

package
v2.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 14 Imported by: 5

Documentation

Index

Constants

View Source
const (
	AWSIAMGroupBootstrapper                      = "AWSIAMGroupBootstrapper"
	AWSIAMInstanceProfileControllers             = "AWSIAMInstanceProfileControllers"
	AWSIAMInstanceProfileControlPlane            = "AWSIAMInstanceProfileControlPlane"
	AWSIAMInstanceProfileNodes                   = "AWSIAMInstanceProfileNodes"
	AWSIAMRoleControllers                        = "AWSIAMRoleControllers"
	AWSIAMRoleControlPlane                       = "AWSIAMRoleControlPlane"
	AWSIAMRoleNodes                              = "AWSIAMRoleNodes"
	AWSIAMRoleEKSControlPlane                    = "AWSIAMRoleEKSControlPlane"
	AWSIAMRoleEKSNodegroup                       = "AWSIAMRoleEKSNodegroup"
	AWSIAMRoleEKSFargate                         = "AWSIAMRoleEKSFargate"
	AWSIAMUserBootstrapper                       = "AWSIAMUserBootstrapper"
	ControllersPolicy                 PolicyName = "AWSIAMManagedPolicyControllers"
	ControllersPolicyEKS              PolicyName = "AWSIAMManagedPolicyControllersEKS"
	ControlPlanePolicy                PolicyName = "AWSIAMManagedPolicyCloudProviderControlPlane"
	NodePolicy                        PolicyName = "AWSIAMManagedPolicyCloudProviderNodes"
	CSIPolicy                         PolicyName = "AWSEBSCSIPolicyController"
	EKSConsolePolicy                  PolicyName = "AWSIAMManagedPolicyEKSConsole"
)

Constants that define resources for a Template.

Variables

ManagedIAMPolicyNames slice of managed IAM policies.

Functions

func AWSArnAssumeRolePolicy

func AWSArnAssumeRolePolicy(identityID string) *iamv1.PolicyDocument

AWSArnAssumeRolePolicy will assume Policies using PolicyArns.

func AWSServiceAssumeRolePolicy

func AWSServiceAssumeRolePolicy(identityID string) *iamv1.PolicyDocument

AWSServiceAssumeRolePolicy will assume an AWS Service policy.

func AssumeRolePolicy

func AssumeRolePolicy(identityType iamv1.PrincipalType, principalIDs []string) *iamv1.PolicyDocument

AssumeRolePolicy will create a role session and pass session policies programmatically.

Types

type PolicyName

type PolicyName string

PolicyName defines the name of a managed IAM policy.

func (PolicyName) IsValid

func (p PolicyName) IsValid() bool

IsValid will check if a given policy name is valid. That is, it will check if the given policy name is one of the ManagedIAMPolicyNames.

type Template

type Template struct {
	Spec *bootstrapv1.AWSIAMConfigurationSpec
}

Template is an AWS CloudFormation template to bootstrap IAM policies, users and roles for use by Cluster API Provider AWS.

func NewTemplate

func NewTemplate() Template

NewTemplate will generate a new Template.

func (Template) ControllersPolicy

func (t Template) ControllersPolicy() *iamv1.PolicyDocument

ControllersPolicy will create a policy from a Template for AWS Controllers.

func (Template) ControllersPolicyEKS

func (t Template) ControllersPolicyEKS() *iamv1.PolicyDocument

ControllersPolicyEKS creates a policy from a template for AWS Controllers.

func (Template) GenerateManagedIAMPolicyDocuments

func (t Template) GenerateManagedIAMPolicyDocuments(policyDocDir string) error

GenerateManagedIAMPolicyDocuments generates JSON representation of policy documents for all ManagedIAMPolicy.

func (Template) GetPolicyDocFromPolicyName

func (t Template) GetPolicyDocFromPolicyName(policyName PolicyName) *iamv1.PolicyDocument

GetPolicyDocFromPolicyName returns a Template's policy document.

func (Template) NewManagedName

func (t Template) NewManagedName(name string) string

NewManagedName creates an IAM acceptable name prefixed with this Cluster API implementation's prefix.

func (Template) RenderCloudFormation

func (t Template) RenderCloudFormation() *cloudformation.Template

RenderCloudFormation will render and return a cloudformation Template.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL