Documentation ¶
Index ¶
- type Client
- func (c *Client) FindVpcId(ctx context.Context) error
- func (c *Client) NewApiLoadBalancer() NetworkLoadBalancer
- func (c *Client) NewDhcpOptions() DhcpOptions
- func (c *Client) NewInstances() Instances
- func (c *Client) NewPrivateHostedZone() PrivateHostedZone
- func (c *Client) NewPublicHostedZone() PublicHostedZone
- func (c *Client) NewSecurityGroup() SecurityGroup
- func (c *Client) NewVpc() Vpc
- func (c *Client) NewVpcEndpointService() VpcEndpointService
- func (c *Client) ValidateComponents(ctx context.Context, components ...Component) error
- type ClusterInfo
- type Component
- type DhcpOptions
- type Ec2AwsApi
- type Instances
- type MirrosaDhcpOptionsAPIClient
- type MirrosaInstancesAPIClient
- type MirrosaVpcAPIClient
- type MirrosaVpcEndpointServiceAPIClient
- type NetworkLoadBalancer
- type NetworkLoadBalancerAPIClient
- type PrivateHostedZone
- type PublicHostedZone
- type Route53AwsApi
- type SecurityGroup
- type Vpc
- type VpcEndpointService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Cluster holds a cluster object from OCM Cluster *cmv1.Cluster // AwsConfig holds the configuration for building an AWS client AwsConfig aws.Config // ClusterInfo contains information about the ROSA cluster that will be used to validate it ClusterInfo *ClusterInfo // contains filtered or unexported fields }
Client holds relevant information about a ROSA cluster gleaned from OCM and an AwsApi to validate the cluster in AWS
func NewClient ¶
NewClient looks up information in OCM about a given cluster id and returns a new mirrosa client. Requires valid AWS and OCM credentials to be present beforehand.
func NewRosaClient ¶
func (*Client) FindVpcId ¶
FindVpcId determines c.ClusterInfo.VpcId by determining the AWS VPC ID of a cluster
func (*Client) NewApiLoadBalancer ¶
func (c *Client) NewApiLoadBalancer() NetworkLoadBalancer
func (*Client) NewDhcpOptions ¶
func (c *Client) NewDhcpOptions() DhcpOptions
func (*Client) NewInstances ¶
func (*Client) NewPrivateHostedZone ¶
func (c *Client) NewPrivateHostedZone() PrivateHostedZone
func (*Client) NewPublicHostedZone ¶
func (c *Client) NewPublicHostedZone() PublicHostedZone
func (*Client) NewSecurityGroup ¶
func (c *Client) NewSecurityGroup() SecurityGroup
func (*Client) NewVpcEndpointService ¶
func (c *Client) NewVpcEndpointService() VpcEndpointService
type ClusterInfo ¶
type ClusterInfo struct { // Name of the cluster Name string // InfraName is the name with an additional slug that hive gives a ROSA cluster InfraName string // BaseDomain is the DNS base domain of the cluster BaseDomain string // VpcId is the AWS ID of the VPC the cluster is installed in VpcId string }
ClusterInfo contains information about the ROSA cluster that will be used to validate it
func (ClusterInfo) LogValue ¶ added in v0.0.6
func (c ClusterInfo) LogValue() slog.Value
type Component ¶
type Component interface { // FilterValue returns the name of the component to implement the github.com/charmbracelet/bubbles/list Item interface FilterValue() string // Title returns the name of the component for the bubbletea TUI Title() string // Description returns a thorough description of the component's expected configuration. // It should allow a new user of ROSA to understand what the expected state is and why it should be that way. Description() string // Validate checks a component for any misconfiguration and returns any error Validate(ctx context.Context) error }
Component represents a specific component that will be validated
type DhcpOptions ¶
type DhcpOptions struct { VpcId string Ec2Client MirrosaDhcpOptionsAPIClient // contains filtered or unexported fields }
func (DhcpOptions) Description ¶ added in v0.0.3
func (d DhcpOptions) Description() string
func (DhcpOptions) FilterValue ¶
func (d DhcpOptions) FilterValue() string
func (DhcpOptions) Title ¶ added in v0.0.3
func (d DhcpOptions) Title() string
type Ec2AwsApi ¶
type Ec2AwsApi interface { DescribeInstances(ctx context.Context, params *ec2.DescribeInstancesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstancesOutput, error) ec2.DescribeSecurityGroupsAPIClient ec2.DescribeSecurityGroupRulesAPIClient ec2.DescribeSubnetsAPIClient ec2.DescribeVpcsAPIClient }
type Instances ¶
type Instances struct { InfraName string MultiAZ bool Ec2Client MirrosaInstancesAPIClient // contains filtered or unexported fields }
func (Instances) Description ¶ added in v0.0.3
func (Instances) FilterValue ¶
type MirrosaDhcpOptionsAPIClient ¶
type MirrosaDhcpOptionsAPIClient interface { ec2.DescribeDhcpOptionsAPIClient ec2.DescribeVpcsAPIClient }
type MirrosaInstancesAPIClient ¶ added in v0.0.2
type MirrosaInstancesAPIClient interface { ec2.DescribeInstancesAPIClient }
type MirrosaVpcAPIClient ¶
type MirrosaVpcAPIClient interface {
DescribeVpcAttribute(ctx context.Context, params *ec2.DescribeVpcAttributeInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVpcAttributeOutput, error)
}
MirrosaVpcAPIClient is a client that implements what's needed to validate a Vpc
type MirrosaVpcEndpointServiceAPIClient ¶
type MirrosaVpcEndpointServiceAPIClient interface { DescribeVpcEndpointServices(ctx context.Context, params *ec2.DescribeVpcEndpointServicesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVpcEndpointServicesOutput, error) ec2.DescribeVpcEndpointConnectionsAPIClient }
MirrosaVpcEndpointServiceAPIClient is a client that implements what's needed to validate a VpcEndpointService
type NetworkLoadBalancer ¶
type NetworkLoadBalancer struct { InfraName string PrivateLink bool Sts bool VpcId string ElbV2Client NetworkLoadBalancerAPIClient // contains filtered or unexported fields }
func (NetworkLoadBalancer) Description ¶ added in v0.0.3
func (n NetworkLoadBalancer) Description() string
func (NetworkLoadBalancer) FilterValue ¶
func (n NetworkLoadBalancer) FilterValue() string
func (NetworkLoadBalancer) Title ¶ added in v0.0.3
func (n NetworkLoadBalancer) Title() string
type NetworkLoadBalancerAPIClient ¶
type NetworkLoadBalancerAPIClient interface { elbv2.DescribeLoadBalancersAPIClient elbv2.DescribeListenersAPIClient elbv2.DescribeTargetGroupsAPIClient elbv2.DescribeTargetHealthAPIClient }
NetworkLoadBalancerAPIClient is a client that implements what's needed to validate a NetworkLoadBalancer
type PrivateHostedZone ¶
type PrivateHostedZone struct { ClusterName string BaseDomain string Region types.VPCRegion VpcId string Route53Client Route53AwsApi // contains filtered or unexported fields }
func (PrivateHostedZone) Description ¶ added in v0.0.3
func (p PrivateHostedZone) Description() string
func (PrivateHostedZone) FilterValue ¶
func (p PrivateHostedZone) FilterValue() string
func (PrivateHostedZone) Title ¶ added in v0.0.3
func (p PrivateHostedZone) Title() string
type PublicHostedZone ¶
type PublicHostedZone struct { BaseDomain string PrivateLink bool Route53Client Route53AwsApi // contains filtered or unexported fields }
func (PublicHostedZone) Description ¶ added in v0.0.3
func (p PublicHostedZone) Description() string
func (PublicHostedZone) FilterValue ¶
func (p PublicHostedZone) FilterValue() string
func (PublicHostedZone) Title ¶ added in v0.0.3
func (p PublicHostedZone) Title() string
type Route53AwsApi ¶
type Route53AwsApi interface { GetHostedZone(ctx context.Context, params *route53.GetHostedZoneInput, optFns ...func(*route53.Options)) (*route53.GetHostedZoneOutput, error) ListHostedZonesByName(ctx context.Context, params *route53.ListHostedZonesByNameInput, optFns ...func(*route53.Options)) (*route53.ListHostedZonesByNameOutput, error) ListResourceRecordSets(ctx context.Context, params *route53.ListResourceRecordSetsInput, optFns ...func(*route53.Options)) (*route53.ListResourceRecordSetsOutput, error) }
type SecurityGroup ¶
type SecurityGroup struct { InfraName string MachineCIDR string Ec2Client Ec2AwsApi // contains filtered or unexported fields }
func (SecurityGroup) Description ¶ added in v0.0.3
func (s SecurityGroup) Description() string
func (SecurityGroup) FilterValue ¶
func (s SecurityGroup) FilterValue() string
func (SecurityGroup) Title ¶ added in v0.0.3
func (s SecurityGroup) Title() string
type Vpc ¶
type Vpc struct { Id string Ec2Client MirrosaVpcAPIClient // contains filtered or unexported fields }
func (Vpc) Description ¶ added in v0.0.3
func (Vpc) FilterValue ¶
type VpcEndpointService ¶
type VpcEndpointService struct { InfraName string PrivateLink bool Ec2Client MirrosaVpcEndpointServiceAPIClient // contains filtered or unexported fields }
func (VpcEndpointService) Description ¶ added in v0.0.3
func (v VpcEndpointService) Description() string
func (VpcEndpointService) FilterValue ¶
func (v VpcEndpointService) FilterValue() string
func (VpcEndpointService) Title ¶ added in v0.0.3
func (v VpcEndpointService) Title() string