rosa

package
v0.0.0-...-9eefff9 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type CreateClusterOptions

type CreateClusterOptions struct {
	FIPS                         bool
	HostedCP                     bool
	MultiAZ                      bool
	STS                          bool
	SkipHealthCheck              bool
	UseDefaultAccountRolesPrefix bool

	HostPrefix int
	Replicas   int

	ArtifactDir               string
	AdditionalTrustBundleFile string
	ChannelGroup              string
	ClusterName               string
	ComputeMachineType        string
	HTTPProxy                 string
	HTTPSProxy                string
	MachineCidr               string
	Mode                      string
	NetworkType               string
	OidcConfigID              string
	PodCIDR                   string
	ServiceCIDR               string
	SubnetIDs                 string
	Version                   string
	WorkingDir                string

	Properties map[string]string

	InstallTimeout     time.Duration
	HealthCheckTimeout time.Duration
	ExpirationDuration time.Duration
	// contains filtered or unexported fields
}

CreateClusterOptions represents data used to create clusters

type DeleteClusterOptions

type DeleteClusterOptions struct {
	ArtifactDir string
	ClusterName string
	WorkingDir  string

	DeleteHostedCPVPC  bool
	DeleteOidcConfigID bool
	HostedCP           bool
	STS                bool

	UninstallTimeout time.Duration
	// contains filtered or unexported fields
}

DeleteClusterOptions represents data used to delete clusters

type Provider

type Provider struct {
	*ocmclient.Client

	AWSRegion string
	// contains filtered or unexported fields
}

Provider is a rosa provider

func New

func New(ctx context.Context, token string, ocmEnvironment ocmclient.Environment, logger logr.Logger, args ...*awscloud.AWSCredentials) (*Provider, error)

New handles constructing the rosa provider which creates a connection to openshift cluster manager "ocm". It is the callers responsibility to close the ocm connection when they are finished (defer provider.Connection.Close())

func (*Provider) CreateCluster

func (r *Provider) CreateCluster(ctx context.Context, options *CreateClusterOptions) (string, error)

CreateCluster creates a rosa cluster using the provided inputs

func (*Provider) DeleteCluster

func (r *Provider) DeleteCluster(ctx context.Context, options *DeleteClusterOptions) error

DeleteCluster deletes a rosa cluster using the provided inputs

func (*Provider) RunCommand

func (r *Provider) RunCommand(ctx context.Context, command *exec.Cmd) (io.Writer, io.Writer, error)

RunCommand runs the rosa command provided

func (*Provider) Uninstall

func (r *Provider) Uninstall(ctx context.Context) error

Uninstall removes the rosa cli that was downloaded to the systems temp directory

func (*Provider) Versions

func (r *Provider) Versions(ctx context.Context, channelGroup string, hostedCP bool, constraints ...string) ([]*version, error)

Versions returns the rosa versions for the supported channel and additional options provided

Jump to

Keyboard shortcuts

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