exec

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanTFTempFiles

func CleanTFTempFiles(providerDir string) error

func CreateAWSVPC

func CreateAWSVPC(vpcArgs *VPCArgs, arg ...string) (
	privateSubnets []string,
	publicSubnets []string,
	zones []string,
	err error)

************ AWS resources ***************************

func CreateAccountRoles

func CreateAccountRoles(varArgs map[string]interface{}, abArgs ...string) (string, error)

********************** AccountRoles CMD ******************************

func CreateMachinePool

func CreateMachinePool(ctx context.Context, args ...string) (string, error)

func CreateMyTFAccountRoles

func CreateMyTFAccountRoles(accRoleArgs *AccountRolesArgs, arg ...string) (string, error)

func CreateMyTFCluster

func CreateMyTFCluster(clusterArgs *ClusterCreationArgs, manifestsDir string, arg ...string) (string, error)

func CreateMyTFMachinePool

func CreateMyTFMachinePool(clusterArgs *MachinePoolArgs, arg ...string) (string, error)

func CreateTFCluster

func CreateTFCluster(ctx context.Context, manifestsDir string,
	varArgs map[string]interface{}, abArgs ...string) (string, error)

func CreateTFMachinePool

func CreateTFMachinePool(ctx context.Context,
	varArgs map[string]interface{}, abArgs ...string) (string, error)

func DestroyAWSVPC

func DestroyAWSVPC(vpcArgs *VPCArgs, arg ...string) error

func DestroyAccountRoles

func DestroyAccountRoles(varArgs map[string]interface{}, abArgs ...string) error

func DestroyMyTFAccountRoles

func DestroyMyTFAccountRoles(accRoleArgs *AccountRolesArgs, arg ...string) error

func DestroyMyTFCluster

func DestroyMyTFCluster(clusterArgs *ClusterCreationArgs, manifestsDir string, arg ...string) error

func DestroyMyTFMachinePool

func DestroyMyTFMachinePool(mpArgs *MachinePoolArgs, arg ...string) error

func DestroyTFCluster

func DestroyTFCluster(ctx context.Context, manifestDir string,
	varArgs map[string]interface{}, abArgs ...string) error

func DestroyTFMachinePool

func DestroyTFMachinePool(ctx context.Context,
	varArgs map[string]interface{}, abArgs ...string) error

func GetLogger

func GetLogger() *logging.Logger

************************ TF CMD***********************************

func GetVPCOutputs

func GetVPCOutputs() (privateSubnets []string, publicSubnets []string, zones []string, err error)

Types

type AccountRoleService

type AccountRoleService struct {
	CreationArgs *AccountRolesArgs
	ManifestDir  string
	Context      context.Context
}

func NewAccountRoleService

func NewAccountRoleService(manifestDir ...string) *AccountRoleService

func (*AccountRoleService) Create

func (acc *AccountRoleService) Create(createArgs *AccountRolesArgs, extraArgs ...string) error

func (*AccountRoleService) Destroy

func (acc *AccountRoleService) Destroy(createArgs ...*AccountRolesArgs) error

func (*AccountRoleService) Init

func (acc *AccountRoleService) Init(manifestDirs ...string) error

func (*AccountRoleService) Output

func (acc *AccountRoleService) Output() (string, error)

type AccountRolesArgs

type AccountRolesArgs struct {
	AccountRolePrefix string `json:"account_role_prefix,omitempty"`
	OCMENV            string `json:"ocm_environment,omitempty"`
	OpenshiftVersion  string `json:"openshift_version,omitempty"`
	Token             string `json:"token,omitempty"`
	URL               string `json:"url,omitempty"`
	ChannelGroup      string `json:"channel_group,omitempty"`
}

type ClusterCreationArgs

type ClusterCreationArgs struct {
	AccountRolePrefix    string            `json:"account_role_prefix,omitempty"`
	OCMENV               string            `json:"rhcs_environment,omitempty"`
	ClusterName          string            `json:"cluster_name,omitempty"`
	OperatorRolePrefix   string            `json:"operator_role_prefix,omitempty"`
	OpenshiftVersion     string            `json:"openshift_version,omitempty"`
	Token                string            `json:"token,omitempty"`
	URL                  string            `json:"url,omitempty"`
	AWSRegion            string            `json:"aws_region,omitempty"`
	AWSAvailabilityZones []string          `json:"aws_availability_zones,omitempty"`
	Replicas             int               `json:"replicas,omitempty"`
	ChannelGroup         string            `json:"channel_group,omitempty"`
	AWSHttpTokensState   string            `json:"aws_http_tokens_state,omitempty"`
	PrivateLink          string            `json:"private_link,omitempty"`
	Private              string            `json:"private,omitempty"`
	AWSSubnetIDs         []string          `json:"aws_subnet_ids,omitempty"`
	ComputeMachineType   string            `json:"compute_machine_type,omitempty"`
	DefaultMPLabels      map[string]string `json:"default_mp_labels,omitempty"`
	DisableSCPChecks     bool              `json:"disable_scp_checks,omitempty"`
	MultiAZ              bool              `json:"multi_az,omitempty"`
	MachineCIDR          string            `json:"machine_cidr,omitempty"`
	OIDCConfig           string            `json:"oidc_config,omitempty"`
}

type ClusterOutout

type ClusterOutout struct {
	ClusterID string `json:"cluster_id,omitempty"`
}

Just a placeholder, not research what to output yet.

type ClusterService

type ClusterService struct {
	CreationArgs *ClusterCreationArgs
	ManifestDir  string
	Context      context.Context
}

func NewClusterService

func NewClusterService(manifestDir string) *ClusterService

func (*ClusterService) Create

func (creator *ClusterService) Create(createArgs *ClusterCreationArgs, extraArgs ...string) error

func (*ClusterService) Destroy

func (creator *ClusterService) Destroy(createArgs *ClusterCreationArgs, extraArgs ...string) error

func (*ClusterService) Init

func (creator *ClusterService) Init(manifestDir string) error

func (*ClusterService) Output

func (creator *ClusterService) Output() (string, error)

type MachinePoolArgs

type MachinePoolArgs struct {
	Cluster            string              `json:"cluster,omitempty"`
	OCMENV             string              `json:"ocm_environment,omitempty"`
	Name               string              `json:"name,omitempty"`
	Token              string              `json:"token,omitempty"`
	URL                string              `json:"url,omitempty"`
	MachineType        string              `json:"machine_type,omitempty"`
	Replicas           int                 `json:"replicas,omitempty"`
	AutoscalingEnabled bool                `json:"autoscaling_enabled,omitempty"`
	UseSpotInstances   bool                `json:"use_spot_instances,omitempty"`
	MaxReplicas        int                 `json:"max_replicas,omitempty"`
	MinReplicas        int                 `json:"min_replicas,omitempty"`
	MaxSpotPrice       float64             `json:"max_spot_price,omitempty"`
	Labels             map[string]string   `json:"labels,omitempty"`
	Taints             []map[string]string `json:"taints,omitempty"`
	ID                 string              `json:"id,omitempty"`
}

type MachinePoolOutput

type MachinePoolOutput struct {
	ID                 string `json:"machine_pool_id,omitempty"`
	Name               string `json:"name,omitempty"`
	ClusterID          string `json:"cluster_id,omitempty"`
	Replicas           int    `json:"replicas,omitempty"`
	MachineType        string `json:"machine_type,omitempty"`
	AutoscalingEnabled bool   `json:"autoscaling_enabled,omitempty"`
}

type MachinePoolService

type MachinePoolService struct {
	CreationArgs *MachinePoolArgs
	ManifestDir  string
	Context      context.Context
}

func NewMachinePoolService

func NewMachinePoolService(manifestDir ...string) *MachinePoolService

func (*MachinePoolService) Create

func (mp *MachinePoolService) Create(createArgs *MachinePoolArgs, extraArgs ...string) error

func (*MachinePoolService) Destroy

func (mp *MachinePoolService) Destroy(createArgs ...*MachinePoolArgs) error

func (*MachinePoolService) Init

func (mp *MachinePoolService) Init(manifestDirs ...string) error

func (*MachinePoolService) Output

func (mp *MachinePoolService) Output() (MachinePoolOutput, error)

type VPCArgs

type VPCArgs struct {
	Name      string   `json:"name,omitempty"`
	AZIDs     []string `json:"az_ids,omitempty"`
	AWSRegion string   `json:"aws_region,omitempty"`
	MultiAZ   bool     `json:"multi_az,omitempty"`
	VPCCIDR   string   `json:"vpc_cidr,omitempty"`
}

type VPCService

type VPCService struct {
	CreationArgs *VPCArgs
	ManifestDir  string
	Context      context.Context
}

func NewVPCService

func NewVPCService(manifestDir ...string) *VPCService

func (*VPCService) Create

func (vpc *VPCService) Create(createArgs *VPCArgs, extraArgs ...string) error

func (*VPCService) Destroy

func (vpc *VPCService) Destroy(createArgs ...*VPCArgs) error

func (*VPCService) Init

func (vpc *VPCService) Init(manifestDirs ...string) error

func (*VPCService) Output

func (vpc *VPCService) Output() (privateSubnets []string, publicSubnets []string, zones []string, err error)

Jump to

Keyboard shortcuts

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