Documentation
¶
Index ¶
- Constants
- func BindOptions(opts *DelegatedAWSCredentialOptions, flags *pflag.FlagSet)
- func DefaultProfileName(infraID string) string
- func LookupZone(ctx context.Context, client route53iface.Route53API, name string, ...) (string, error)
- func NewCreateCLIRoleCommand() *cobra.Command
- func NewCreateCommand() *cobra.Command
- func NewCreateIAMCommand() *cobra.Command
- func NewDestroyCommand() *cobra.Command
- func NewDestroyIAMCommand() *cobra.Command
- func ZoneName(clusterName, prefix, baseDomain string) string
- type CreateCLIRoleOptions
- type CreateIAMOptions
- func (o *CreateIAMOptions) CreateIAM(ctx context.Context, client crclient.Client, logger logr.Logger) (*CreateIAMOutput, error)
- func (o *CreateIAMOptions) CreateOIDCProvider(iamClient iamiface.IAMAPI, logger logr.Logger) (string, error)
- func (o *CreateIAMOptions) CreateOIDCResources(iamClient iamiface.IAMAPI, logger logr.Logger, sharedVPC bool) (*CreateIAMOutput, error)
- func (o *CreateIAMOptions) CreateOIDCRole(client iamiface.IAMAPI, name, trustPolicy, permPolicy string, allowAssume bool, ...) (string, error)
- func (o *CreateIAMOptions) CreateSharedVPCEndpointRole(iamClient iamiface.IAMAPI, logger logr.Logger, controlPlaneRole string) (string, error)
- func (o *CreateIAMOptions) CreateSharedVPCRoute53Role(iamClient iamiface.IAMAPI, logger logr.Logger, ...) (string, error)
- func (o *CreateIAMOptions) CreateWorkerInstanceProfile(client iamiface.IAMAPI, profileName string, logger logr.Logger) error
- func (o *CreateIAMOptions) Output(results *CreateIAMOutput) error
- func (o *CreateIAMOptions) ParseAdditionalTags() error
- func (o *CreateIAMOptions) Run(ctx context.Context, client crclient.Client, logger logr.Logger) error
- type CreateIAMOutput
- type CreateIAMRoleOptions
- type CreateInfraOptions
- func (o *CreateInfraOptions) CreateDHCPOptions(l logr.Logger, client ec2iface.EC2API, vpcID string) error
- func (o *CreateInfraOptions) CreateInfra(ctx context.Context, l logr.Logger) (*CreateInfraOutput, error)
- func (o *CreateInfraOptions) CreateInternetGateway(l logr.Logger, client ec2iface.EC2API, vpcID string) (string, error)
- func (o *CreateInfraOptions) CreateNATGateway(l logr.Logger, client ec2iface.EC2API, publicSubnetID, availabilityZone string) (string, error)
- func (o *CreateInfraOptions) CreatePrivateRouteTable(l logr.Logger, client ec2iface.EC2API, ...) (string, error)
- func (o *CreateInfraOptions) CreatePrivateSubnet(l logr.Logger, client ec2iface.EC2API, vpcID string, zone string, cidr string) (string, error)
- func (o *CreateInfraOptions) CreatePrivateZone(ctx context.Context, logger logr.Logger, client route53iface.Route53API, ...) (string, error)
- func (o *CreateInfraOptions) CreatePublicRouteTable(l logr.Logger, client ec2iface.EC2API, vpcID, igwID string, subnetIDs []string) (string, error)
- func (o *CreateInfraOptions) CreatePublicSubnet(l logr.Logger, client ec2iface.EC2API, vpcID string, zone string, cidr string) (string, error)
- func (o *CreateInfraOptions) CreateSubnet(l logr.Logger, client ec2iface.EC2API, ...) (string, error)
- func (o *CreateInfraOptions) CreateVPCS3Endpoint(l logr.Logger, client ec2iface.EC2API, vpcID string, routeTableIds []*string) error
- func (o *CreateInfraOptions) LookupPublicZone(ctx context.Context, logger logr.Logger, client route53iface.Route53API) (string, error)
- func (o *CreateInfraOptions) Output(result *CreateInfraOutput) error
- func (o *CreateInfraOptions) Run(ctx context.Context, l logr.Logger) error
- type CreateInfraOutput
- type CreateInfraOutputZone
- type DelegatedAWSCredentialOptions
- type DelegatingClient
- type DestroyIAMOptions
- func (o *DestroyIAMOptions) DestroyIAM(ctx context.Context) error
- func (o *DestroyIAMOptions) DestroyOIDCResources(ctx context.Context, iamClient iamiface.IAMAPI) error
- func (o *DestroyIAMOptions) DestroyOIDCRole(client iamiface.IAMAPI, name string, includeAssumePolicy bool) error
- func (o *DestroyIAMOptions) DestroySharedVPCRoles(ctx context.Context, iamClient, vpcOwnerIAMClient iamiface.IAMAPI) error
- func (o *DestroyIAMOptions) DestroyWorkerInstanceProfile(client iamiface.IAMAPI) error
- func (o *DestroyIAMOptions) Run(ctx context.Context) error
- type DestroyInfraOptions
- func (o *DestroyInfraOptions) CleanupPublicZone(ctx context.Context, client route53iface.Route53API) error
- func (o *DestroyInfraOptions) DestroyDHCPOptions(ctx context.Context, client ec2iface.EC2API) []error
- func (o *DestroyInfraOptions) DestroyDNS(ctx context.Context, client route53iface.Route53API) []error
- func (o *DestroyInfraOptions) DestroyEIPs(ctx context.Context, client ec2iface.EC2API) []error
- func (o *DestroyInfraOptions) DestroyInfra(ctx context.Context) error
- func (o *DestroyInfraOptions) DestroyInternetGateways(ctx context.Context, client ec2iface.EC2API) []error
- func (o *DestroyInfraOptions) DestroyNATGateways(ctx context.Context, client ec2iface.EC2API, vpcID *string) []error
- func (o *DestroyInfraOptions) DestroyPrivateZones(ctx context.Context, listClient, recordsClient route53iface.Route53API, ...) []error
- func (o *DestroyInfraOptions) DestroyRouteTables(ctx context.Context, client ec2iface.EC2API, vpcID *string) []error
- func (o *DestroyInfraOptions) DestroyS3Buckets(ctx context.Context, client s3iface.S3API) []error
- func (o *DestroyInfraOptions) DestroySecurityGroups(ctx context.Context, client ec2iface.EC2API, vpcID *string) []error
- func (o *DestroyInfraOptions) DestroySubnets(ctx context.Context, client ec2iface.EC2API, vpcID *string) []error
- func (o *DestroyInfraOptions) DestroyV1ELBs(ctx context.Context, client elbiface.ELBAPI, vpcID *string) []error
- func (o *DestroyInfraOptions) DestroyV2ELBs(ctx context.Context, client elbv2iface.ELBV2API, vpcID *string) []error
- func (o *DestroyInfraOptions) DestroyVPCEndpointServices(ctx context.Context, client ec2iface.EC2API) []error
- func (o *DestroyInfraOptions) DestroyVPCEndpoints(ctx context.Context, client ec2iface.EC2API, vpcID *string) []error
- func (o *DestroyInfraOptions) DestroyVPCShare(ctx context.Context, client ramiface.RAMAPI) []error
- func (o *DestroyInfraOptions) DestroyVPCs(ctx context.Context, ec2client ec2iface.EC2API, ...) []error
- func (o *DestroyInfraOptions) Run(ctx context.Context) error
- func (o *DestroyInfraOptions) Validate() error
- type EndpointsByService
- type ServicesByDelegate
Constants ¶
const (
DefaultCIDRBlock = "10.0.0.0/16"
)
Variables ¶
This section is empty.
Functions ¶
func BindOptions ¶ added in v0.1.38
func BindOptions(opts *DelegatedAWSCredentialOptions, flags *pflag.FlagSet)
func DefaultProfileName ¶
func LookupZone ¶ added in v0.1.47
func LookupZone(ctx context.Context, client route53iface.Route53API, name string, isPrivateZone bool) (string, error)
func NewCreateCLIRoleCommand ¶ added in v0.1.31
func NewCreateCommand ¶
func NewCreateIAMCommand ¶
func NewDestroyCommand ¶
func NewDestroyIAMCommand ¶
Types ¶
type CreateCLIRoleOptions ¶ added in v0.1.31
type CreateCLIRoleOptions struct { AWSCredentialsFile string RoleName string AdditionalTags map[string]string }
func (*CreateCLIRoleOptions) ParseAdditionalTags ¶ added in v0.1.31
func (o *CreateCLIRoleOptions) ParseAdditionalTags() ([]*iam.Tag, error)
type CreateIAMOptions ¶
type CreateIAMOptions struct { Region string AWSCredentialsOpts awsutil.AWSCredentialsOptions OIDCStorageProviderS3BucketName string OIDCStorageProviderS3Region string PublicZoneID string PrivateZoneID string LocalZoneID string InfraID string IssuerURL string OutputFile string KMSKeyARN string AdditionalTags []string VPCOwnerCredentialsOpts awsutil.AWSCredentialsOptions PrivateZonesInClusterAccount bool CredentialsSecretData *util.CredentialsSecretData CreateKarpenterRoleARN bool // contains filtered or unexported fields }
func (*CreateIAMOptions) CreateIAM ¶
func (o *CreateIAMOptions) CreateIAM(ctx context.Context, client crclient.Client, logger logr.Logger) (*CreateIAMOutput, error)
func (*CreateIAMOptions) CreateOIDCProvider ¶ added in v0.1.4
func (*CreateIAMOptions) CreateOIDCResources ¶
func (o *CreateIAMOptions) CreateOIDCResources(iamClient iamiface.IAMAPI, logger logr.Logger, sharedVPC bool) (*CreateIAMOutput, error)
inputs: none outputs rsa keypair
func (*CreateIAMOptions) CreateOIDCRole ¶
func (o *CreateIAMOptions) CreateOIDCRole(client iamiface.IAMAPI, name, trustPolicy, permPolicy string, allowAssume bool, logger logr.Logger) (string, error)
CreateOIDCRole create an IAM Role with a trust policy for the OIDC provider
func (*CreateIAMOptions) CreateSharedVPCEndpointRole ¶ added in v0.1.52
func (*CreateIAMOptions) CreateSharedVPCRoute53Role ¶ added in v0.1.52
func (*CreateIAMOptions) CreateWorkerInstanceProfile ¶
func (*CreateIAMOptions) Output ¶ added in v0.1.37
func (o *CreateIAMOptions) Output(results *CreateIAMOutput) error
func (*CreateIAMOptions) ParseAdditionalTags ¶ added in v0.1.6
func (o *CreateIAMOptions) ParseAdditionalTags() error
type CreateIAMOutput ¶
type CreateIAMOutput struct { Region string `json:"region"` ProfileName string `json:"profileName"` InfraID string `json:"infraID"` IssuerURL string `json:"issuerURL"` Roles hyperv1.AWSRolesRef `json:"roles"` KMSKeyARN string `json:"kmsKeyARN"` KMSProviderRoleARN string `json:"kmsProviderRoleARN"` KarpenterRoleARN string `json:"karpenterRoleARN,omitempty"` }
type CreateIAMRoleOptions ¶ added in v0.1.31
type CreateInfraOptions ¶
type CreateInfraOptions struct { AWSCredentialsOpts awsutil.AWSCredentialsOptions Region string InfraID string Name string BaseDomain string BaseDomainPrefix string Zones []string OutputFile string AdditionalTags []string EnableProxy bool ProxyVPCEndpointServiceName string SSHKeyFile string SingleNATGateway bool VPCCIDR string CredentialsSecretData *util.CredentialsSecretData VPCOwnerCredentialOpts awsutil.AWSCredentialsOptions PrivateZonesInClusterAccount bool PublicOnly bool // contains filtered or unexported fields }
func (*CreateInfraOptions) CreateDHCPOptions ¶
func (*CreateInfraOptions) CreateInfra ¶
func (o *CreateInfraOptions) CreateInfra(ctx context.Context, l logr.Logger) (*CreateInfraOutput, error)
func (*CreateInfraOptions) CreateInternetGateway ¶
func (*CreateInfraOptions) CreateNATGateway ¶
func (*CreateInfraOptions) CreatePrivateRouteTable ¶
func (*CreateInfraOptions) CreatePrivateSubnet ¶
func (*CreateInfraOptions) CreatePrivateZone ¶
func (o *CreateInfraOptions) CreatePrivateZone(ctx context.Context, logger logr.Logger, client route53iface.Route53API, name, vpcID string, authorizeAssociation bool, vpcOwnerClient route53iface.Route53API, initialVPC string) (string, error)
func (*CreateInfraOptions) CreatePublicRouteTable ¶
func (*CreateInfraOptions) CreatePublicSubnet ¶
func (*CreateInfraOptions) CreateSubnet ¶
func (*CreateInfraOptions) CreateVPCS3Endpoint ¶
func (*CreateInfraOptions) LookupPublicZone ¶
func (o *CreateInfraOptions) LookupPublicZone(ctx context.Context, logger logr.Logger, client route53iface.Route53API) (string, error)
func (*CreateInfraOptions) Output ¶ added in v0.1.37
func (o *CreateInfraOptions) Output(result *CreateInfraOutput) error
type CreateInfraOutput ¶
type CreateInfraOutput struct { Region string `json:"region"` Zone string `json:"zone"` InfraID string `json:"infraID"` MachineCIDR string `json:"machineCIDR"` VPCID string `json:"vpcID"` Zones []*CreateInfraOutputZone `json:"zones"` Name string `json:"Name"` BaseDomain string `json:"baseDomain"` BaseDomainPrefix string `json:"baseDomainPrefix"` PublicZoneID string `json:"publicZoneID"` PrivateZoneID string `json:"privateZoneID"` LocalZoneID string `json:"localZoneID"` ProxyAddr string `json:"proxyAddr"` PublicOnly bool `json:"publicOnly"` // Fields related to shared VPCs VPCCreatorAccountID string `json:"vpcCreatorAccountID"` ClusterAccountID string `json:"clusterAccountID"` }
type CreateInfraOutputZone ¶
type DelegatedAWSCredentialOptions ¶ added in v0.1.38
type DelegatedAWSCredentialOptions struct { AWSCredentialsOpts *awsutil.AWSCredentialsOptions AWSEbsCsiDriverControllerCredentialsFile string CloudControllerCredentialsFile string CloudNetworkConfigControllerCredentialsFile string ControlPlaneOperatorCredentialsFile string NodePoolCredentialsFile string OpenshiftImageRegistryCredentialsFile string }
func DefaultDelegatedAWSCredentialOptions ¶ added in v0.1.38
func DefaultDelegatedAWSCredentialOptions() *DelegatedAWSCredentialOptions
func (*DelegatedAWSCredentialOptions) Validate ¶ added in v0.1.38
func (o *DelegatedAWSCredentialOptions) Validate() error
type DelegatingClient ¶ added in v0.1.38
type DelegatingClient struct { ec2iface.EC2API elbiface.ELBAPI elbv2iface.ELBV2API route53iface.Route53API s3iface.S3API }
DelegatingClient embeds clients for AWS services we have privileges to use with guest cluster component roles.
func NewDelegatingClient ¶ added in v0.1.38
func NewDelegatingClient( awsEbsCsiDriverControllerCredentialsFile string, cloudControllerCredentialsFile string, cloudNetworkConfigControllerCredentialsFile string, controlPlaneOperatorCredentialsFile string, nodePoolCredentialsFile string, openshiftImageRegistryCredentialsFile string, ) (*DelegatingClient, error)
NewDelegatingClient creates a new set of AWS service clients that delegate individual calls to the right credentials.
type DestroyIAMOptions ¶
type DestroyIAMOptions struct { Region string AWSCredentialsOpts awsutil.AWSCredentialsOptions InfraID string Log logr.Logger VPCOwnerCredentialsOpts awsutil.AWSCredentialsOptions PrivateZonesInClusterAccount bool CredentialsSecretData *util.CredentialsSecretData }
func (*DestroyIAMOptions) DestroyIAM ¶
func (o *DestroyIAMOptions) DestroyIAM(ctx context.Context) error
func (*DestroyIAMOptions) DestroyOIDCResources ¶
func (*DestroyIAMOptions) DestroyOIDCRole ¶
func (o *DestroyIAMOptions) DestroyOIDCRole(client iamiface.IAMAPI, name string, includeAssumePolicy bool) error
CreateOIDCRole create an IAM Role with a trust policy for the OIDC provider
func (*DestroyIAMOptions) DestroySharedVPCRoles ¶ added in v0.1.49
func (*DestroyIAMOptions) DestroyWorkerInstanceProfile ¶
func (o *DestroyIAMOptions) DestroyWorkerInstanceProfile(client iamiface.IAMAPI) error
type DestroyInfraOptions ¶
type DestroyInfraOptions struct { Region string InfraID string AWSCredentialsOpts *DelegatedAWSCredentialOptions Name string BaseDomain string BaseDomainPrefix string AwsInfraGracePeriod time.Duration Log logr.Logger CredentialsSecretData *util.CredentialsSecretData AWSEbsCsiDriverControllerCredentialsFile string CloudControllerCredentialsFile string CloudNetworkConfigControllerCredentialsFile string ControlPlaneOperatorCredentialsFile string NodePoolCredentialsFile string OpenshiftImageRegistryCredentialsFile string VPCOwnerCredentialsOpts awsutil.AWSCredentialsOptions PrivateZonesInClusterAccount bool }
func (*DestroyInfraOptions) CleanupPublicZone ¶
func (o *DestroyInfraOptions) CleanupPublicZone(ctx context.Context, client route53iface.Route53API) error
func (*DestroyInfraOptions) DestroyDHCPOptions ¶
func (*DestroyInfraOptions) DestroyDNS ¶
func (o *DestroyInfraOptions) DestroyDNS(ctx context.Context, client route53iface.Route53API) []error
func (*DestroyInfraOptions) DestroyEIPs ¶
func (*DestroyInfraOptions) DestroyInfra ¶
func (o *DestroyInfraOptions) DestroyInfra(ctx context.Context) error
func (*DestroyInfraOptions) DestroyInternetGateways ¶
func (*DestroyInfraOptions) DestroyNATGateways ¶
func (*DestroyInfraOptions) DestroyPrivateZones ¶
func (o *DestroyInfraOptions) DestroyPrivateZones(ctx context.Context, listClient, recordsClient route53iface.Route53API, vpcID *string) []error
func (*DestroyInfraOptions) DestroyRouteTables ¶
func (*DestroyInfraOptions) DestroyS3Buckets ¶
func (*DestroyInfraOptions) DestroySecurityGroups ¶
func (*DestroyInfraOptions) DestroySubnets ¶
func (*DestroyInfraOptions) DestroyV1ELBs ¶
func (*DestroyInfraOptions) DestroyV2ELBs ¶
func (o *DestroyInfraOptions) DestroyV2ELBs(ctx context.Context, client elbv2iface.ELBV2API, vpcID *string) []error
func (*DestroyInfraOptions) DestroyVPCEndpointServices ¶
func (*DestroyInfraOptions) DestroyVPCEndpoints ¶
func (*DestroyInfraOptions) DestroyVPCShare ¶ added in v0.1.49
func (*DestroyInfraOptions) DestroyVPCs ¶
func (o *DestroyInfraOptions) DestroyVPCs(ctx context.Context, ec2client ec2iface.EC2API, vpcOwnerEC2Client ec2iface.EC2API, elbclient elbiface.ELBAPI, elbv2client elbv2iface.ELBV2API, route53listClient route53iface.Route53API, route53client route53iface.Route53API, ramClient ramiface.RAMAPI) []error
func (*DestroyInfraOptions) Validate ¶ added in v0.1.38
func (o *DestroyInfraOptions) Validate() error
type EndpointsByService ¶ added in v0.1.38
type ServicesByDelegate ¶ added in v0.1.38
type ServicesByDelegate map[string]EndpointsByService
func APIsByDelegatedServices ¶ added in v0.1.38
func APIsByDelegatedServices() (ServicesByDelegate, error)
APIsByDelegatedServices uses the known policies and their bindings to cluster components in order to create a mapping of AWS services to delegates for each cluster component, recording the APIs that each component has access to with their limited credentials.