powervs

package
v0.1.52 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAPIKey

func GetAPIKey() (string, error)

func NewCreateCommand

func NewCreateCommand() *cobra.Command

func NewDestroyCommand

func NewDestroyCommand() *cobra.Command

Types

type CreateInfraOptions

type CreateInfraOptions struct {
	Name                        string
	Namespace                   string
	BaseDomain                  string
	ResourceGroup               string
	InfraID                     string
	Region                      string
	Zone                        string
	CloudInstanceID             string
	CloudConnection             string
	VPCRegion                   string
	VPC                         string
	OutputFile                  string
	Debug                       bool
	RecreateSecrets             bool
	PER                         bool
	TransitGatewayGlobalRouting bool
	TransitGatewayLocation      string
	TransitGateway              string
}

CreateInfraOptions command line options for setting up infra in IBM PowerVS cloud

func (*CreateInfraOptions) Output added in v0.1.37

func (options *CreateInfraOptions) Output(infra *Infra, logger logr.Logger)

func (*CreateInfraOptions) Run

func (options *CreateInfraOptions) Run(ctx context.Context, logger logr.Logger) error

Run Hypershift Infra Creation

type CreateStat

type CreateStat struct {
	Duration TimeDuration `json:"duration"`
	Status   string       `json:"status,omitempty"`
}

type DestroyInfraOptions

type DestroyInfraOptions struct {
	Name                   string
	Namespace              string
	InfraID                string
	InfrastructureJson     string
	BaseDomain             string
	CISCRN                 string
	CISDomainID            string
	ResourceGroup          string
	Region                 string
	Zone                   string
	CloudInstanceID        string
	DHCPID                 string
	CloudConnection        string
	VPCRegion              string
	VPC                    string
	Debug                  bool
	PER                    bool
	TransitGatewayLocation string
	TransitGateway         string
}

DestroyInfraOptions command line options to destroy infra created in IBMCloud for Hypershift

func (*DestroyInfraOptions) DestroyInfra

func (options *DestroyInfraOptions) DestroyInfra(ctx context.Context, logger logr.Logger, infra *Infra) error

DestroyInfra infra destruction orchestration

func (*DestroyInfraOptions) Run

func (options *DestroyInfraOptions) Run(ctx context.Context, logger logr.Logger) error

Run Hypershift Infra Destroy

type Infra

type Infra struct {
	ID                     string            `json:"id"`
	Region                 string            `json:"region"`
	Zone                   string            `json:"zone"`
	VPCRegion              string            `json:"vpcRegion"`
	AccountID              string            `json:"accountID"`
	BaseDomain             string            `json:"baseDomain"`
	CISCRN                 string            `json:"cisCrn"`
	CISDomainID            string            `json:"cisDomainID"`
	ResourceGroup          string            `json:"resourceGroup"`
	ResourceGroupID        string            `json:"-"`
	CloudInstanceID        string            `json:"cloudInstanceID"`
	DHCPSubnet             string            `json:"dhcpSubnet"`
	DHCPSubnetID           string            `json:"dhcpSubnetID"`
	DHCPID                 string            `json:"-"`
	CloudConnectionID      string            `json:"-"`
	VPCName                string            `json:"vpcName"`
	VPCID                  string            `json:"-"`
	VPCCRN                 string            `json:"-"`
	VPCRoutingTableID      string            `json:"-"`
	VPCSubnetName          string            `json:"vpcSubnetName"`
	VPCSubnetID            string            `json:"-"`
	Stats                  InfraCreationStat `json:"stats"`
	Secrets                Secrets           `json:"secrets"`
	CloudInstanceCRN       string            `json:"-"`
	TransitGatewayLocation string            `json:"-"`
	TransitGatewayID       string            `json:"-"`
}

Infra resource info in IBM Cloud for setting up hypershift nodepool

func (*Infra) SetupInfra

func (infra *Infra) SetupInfra(ctx context.Context, logger logr.Logger, options *CreateInfraOptions) error

SetupInfra infra creation orchestration

type InfraCreationStat

type InfraCreationStat struct {
	VPC                 CreateStat `json:"vpc"`
	VPCSubnet           CreateStat `json:"vpcSubnet"`
	CloudInstance       CreateStat `json:"cloudInstance"`
	DHCPService         CreateStat `json:"dhcpService"`
	CloudConnState      CreateStat `json:"cloudConnState"`
	TransitGatewayState CreateStat `json:"transitGatewayState"`
}

type PolicyParams added in v0.1.19

type PolicyParams struct {
	CloudInstanceID string
}

type Secrets

type Secrets struct {
	KubeCloudControllerManager *corev1.Secret
	NodePoolManagement         *corev1.Secret
	IngressOperator            *corev1.Secret
	StorageOperator            *corev1.Secret
	ImageRegistryOperator      *corev1.Secret
}

type TimeDuration

type TimeDuration struct {
	time.Duration
}

func (*TimeDuration) MarshalJSON

func (d *TimeDuration) MarshalJSON() ([]byte, error)

MarshalJSON custom marshaling func for time.Duration to parse Duration into user-friendly format

func (*TimeDuration) UnmarshalJSON

func (d *TimeDuration) UnmarshalJSON(b []byte) error

UnmarshalJSON custom unmarshalling func for time.Duration

Jump to

Keyboard shortcuts

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