exec

package
v1.5.0-prerelease.3 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// MaxExpiration in unit of hour
	MaxExpiration = 168

	// MaxNodeNumber means max node number per cluster/machinepool
	MaxNodeNumber = 180

	// MaxNameLength means cluster name will be trimed when request certificate
	MaxNameLength = 15

	MaxIngressNumber = 2
)

****************************************************** RHCS test cases used

View Source
const (
	FastChannel      = "fast"
	StableChannel    = "stable"
	NightlyChannel   = "nightly"
	CandidateChannel = "candidate"
)

version channel_groups

Variables

This section is empty.

Functions

func CleanTFTempFiles

func CleanTFTempFiles(providerDir string) error

Types

type AccountRoleService

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

func NewAccountRoleService

func NewAccountRoleService(manifestDir ...string) (*AccountRoleService, error)

func (*AccountRoleService) Apply added in v1.5.0

func (acc *AccountRoleService) Apply(createArgs *AccountRolesArgs, recordtfvars bool, extraArgs ...string) (*AccountRolesOutput, 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() (*AccountRolesOutput, error)

type AccountRolesArgs

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

type AccountRolesOutput added in v1.4.0

type AccountRolesOutput struct {
	AccountRolePrefix string        `json:"account_role_prefix,omitempty"`
	MajorVersion      string        `json:"major_version,omitempty"`
	ChannelGroup      string        `json:"channel_group,omitempty"`
	RHCSGatewayUrl    string        `json:"rhcs_gateway_url,omitempty"`
	RHCSVersions      []interface{} `json:"rhcs_versions,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                          bool              `json:"private_link,omitempty"`
	Private                              bool              `json:"private,omitempty"`
	Fips                                 bool              `json:"fips,omitempty"`
	Tagging                              map[string]string `json:"tags,omitempty"`
	AuditLogForward                      bool              `json:"audit_log_forward,omitempty"`
	Autoscale                            bool              `json:"autoscaling_enabled,omitempty"`
	Etcd                                 bool              `json:"etcd_encryption,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"`
	WorkerDiskSize                       int               `json:"worker_disk_size,omitempty"`
	AdditionalComputeSecurityGroups      []string          `json:"additional_compute_security_groups,omitempty"`
	AdditionalInfraSecurityGroups        []string          `json:"additional_infra_security_groups,omitempty"`
	AdditionalControlPlaneSecurityGroups []string          `json:"additional_control_plane_security_groups,omitempty"`
	MachineCIDR                          string            `json:"machine_cidr,omitempty"`
	OIDCConfigID                         string            `json:"oidc_config_id,omitempty"`
	AdminCredentials                     map[string]string `json:"admin_credentials,omitempty"`
	DisableUWM                           bool              `json:"disable_workload_monitoring,omitempty"`
	Proxy                                *Proxy            `json:"proxy,omitempty"`
	UnifiedAccRolesPath                  string            `json:"path,omitempty"`
}

type ClusterOutput added in v1.5.0

type ClusterOutput struct {
	ClusterID                            string   `json:"cluster_id,omitempty"`
	AdditionalComputeSecurityGroups      []string `json:"additional_compute_security_groups,omitempty"`
	AdditionalInfraSecurityGroups        []string `json:"additional_infra_security_groups,omitempty"`
	AdditionalControlPlaneSecurityGroups []string `json:"additional_control_plane_security_groups,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, error)

func (*ClusterService) Apply added in v1.5.0

func (creator *ClusterService) Apply(createArgs *ClusterCreationArgs, recordtfvars bool, extraArgs ...string) error

func (*ClusterService) Destroy

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

func (*ClusterService) Init

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

func (*ClusterService) Output

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

func (*ClusterService) Plan added in v1.5.0

func (creator *ClusterService) Plan(planargs *ClusterCreationArgs, extraArgs ...string) (string, error)

type DnsDomainArgs added in v1.5.0

type DnsDomainArgs struct {
	ID    string `json:"id,omitempty"`
	Token string `json:"token,omitempty"`
}

type DnsService added in v1.5.0

type DnsService struct {
	CreationArgs *DnsDomainArgs
	ManifestDir  string
	Context      context.Context
}

func NewDnsDomainService added in v1.5.0

func NewDnsDomainService(manifestDir ...string) *DnsService

func (*DnsService) Create added in v1.5.0

func (dns *DnsService) Create(createArgs *DnsDomainArgs, extraArgs ...string) error

func (*DnsService) Destroy added in v1.5.0

func (dns *DnsService) Destroy(createArgs ...*DnsDomainArgs) error

func (*DnsService) Init added in v1.5.0

func (dns *DnsService) Init(manifestDirs ...string) error

type IDPArgs added in v1.4.0

type IDPArgs struct {
	ClusterID     string        `json:"cluster_id,omitempty"`
	Name          string        `json:"name,omitempty"`
	ID            string        `json:"id,omitempty"`
	Token         string        `json:"token,omitempty"`
	OCMENV        string        `json:"ocm_environment,omitempty"`
	URL           string        `json:"url,omitempty"`
	CA            string        `json:"ca,omitempty"`
	Attributes    interface{}   `json:"attributes,omitempty"`
	ClientID      string        `json:"client_id,omitempty"`
	ClientSecret  string        `json:"client_secret,omitempty"`
	Organizations []string      `json:"organizations,omitempty"`
	HostedDomain  string        `json:"hosted_domain,omitempty"`
	Insecure      bool          `json:"insecure,omitempty"`
	MappingMethod string        `json:"mapping_method,omitempty"`
	HtpasswdUsers []interface{} `json:"htpasswd_users,omitempty"`
}

type IDPOutput added in v1.4.0

type IDPOutput struct {
	ID string `json:"idp_id,omitempty"`
}

for now holds only ID, additional vars might be needed in the future

type IDPService added in v1.4.0

type IDPService struct {
	CreationArgs *IDPArgs
	ManifestDir  string
	Context      context.Context
}

func NewIDPService added in v1.4.0

func NewIDPService(manifestDir ...string) *IDPService

func (*IDPService) Apply added in v1.5.0

func (idp *IDPService) Apply(createArgs *IDPArgs, recordtfvars bool, extraArgs ...string) error

func (*IDPService) Destroy added in v1.4.0

func (idp *IDPService) Destroy(createArgs ...*IDPArgs) error

func (*IDPService) Init added in v1.4.0

func (idp *IDPService) Init(manifestDirs ...string) error

func (*IDPService) Output added in v1.4.0

func (idp *IDPService) Output() (IDPOutput, error)

type ImportArgs added in v1.5.0

type ImportArgs struct {
	URL          string `json:"url,omitempty"`
	Token        string `json:"token,omitempty"`
	ResourceKind string `json:"resource_kind,omitempty"`
	ResourceName string `json:"resource_name,omitempty"`
	ClusterID    string `json:"cluster_id,omitempty"`
	ObjectName   string `json:"obj_name,omitempty"`
}

type ImportService added in v1.5.0

type ImportService struct {
	CreationArgs *ImportArgs
	ManifestDir  string
	Context      context.Context
}

func NewImportService added in v1.5.0

func NewImportService(manifestDir ...string) *ImportService

func (*ImportService) Import added in v1.5.0

func (importService *ImportService) Import(importArgs *ImportArgs, extraArgs ...string) error

func (*ImportService) InitImport added in v1.5.0

func (importTF *ImportService) InitImport(manifestDirs ...string) error

func (*ImportService) ShowState added in v1.5.0

func (importService *ImportService) ShowState(importArgs *ImportArgs) (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"`
	AvailabilityZone         string              `json:"availability_zone,omitempty"`
	SubnetID                 string              `json:"subnet_id,omitempty"`
	MultiAZ                  bool                `json:"multi_availability_zone,omitempty"`
	DiskSize                 int                 `json:"disk_size,omitempty"`
	AdditionalSecurityGroups []string            `json:"additional_security_groups,omitempty"`
}

func BuildDefaultMachinePoolArgsFromClusterState added in v1.5.0

func BuildDefaultMachinePoolArgsFromClusterState(clusterResource interface{}) (MachinePoolArgs, error)

func BuildDefaultMachinePoolArgsFromDefaultMachinePoolState added in v1.5.0

func BuildDefaultMachinePoolArgsFromDefaultMachinePoolState(defaultMachinePoolResource interface{}) (MachinePoolArgs, error)

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"`
	Labels             map[string]string `json:"labels,omitempty"`
}

type MachinePoolService

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

func NewMachinePoolService

func NewMachinePoolService(manifestDir ...string) *MachinePoolService

func (*MachinePoolService) Apply added in v1.5.0

func (mp *MachinePoolService) Apply(createArgs *MachinePoolArgs, recordtfargs bool, extraArgs ...string) (string, error)

func (*MachinePoolService) Destroy

func (mp *MachinePoolService) Destroy(createArgs ...*MachinePoolArgs) (output string, err error)

func (*MachinePoolService) Init

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

func (*MachinePoolService) MagicImport added in v1.5.0

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

func (*MachinePoolService) Output

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

func (*MachinePoolService) Plan added in v1.5.0

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

type OIDCProviderOperatorRolesArgs added in v1.4.0

type OIDCProviderOperatorRolesArgs struct {
	AccountRolePrefix   string `json:"account_role_prefix,omitempty"`
	OperatorRolePrefix  string `json:"operator_role_prefix,omitempty"`
	Token               string `json:"token,omitempty"`
	URL                 string `json:"url,omitempty"`
	OIDCConfig          string `json:"oidc_config,omitempty"`
	AWSRegion           string `json:"aws_region,omitempty"`
	OCMENV              string `json:"rhcs_environment,omitempty"`
	UnifiedAccRolesPath string `json:"path,omitempty"`
}

type OIDCProviderOperatorRolesOutput added in v1.4.0

type OIDCProviderOperatorRolesOutput struct {
	OIDCConfigID       string `json:"oidc_config_id,omitempty"`
	AccountRolePrefix  string `json:"account_role_prefix,omitempty"`
	OperatorRolePrefix string `json:"operator_role_prefix,omitempty"`
}

type OIDCProviderOperatorRolesService added in v1.4.0

type OIDCProviderOperatorRolesService struct {
	CreationArgs *OIDCProviderOperatorRolesArgs
	ManifestDir  string
	Context      context.Context
}

func NewOIDCProviderOperatorRolesService added in v1.4.0

func NewOIDCProviderOperatorRolesService(manifestDir ...string) (*OIDCProviderOperatorRolesService, error)

func (*OIDCProviderOperatorRolesService) Apply added in v1.5.0

func (oidcOP *OIDCProviderOperatorRolesService) Apply(createArgs *OIDCProviderOperatorRolesArgs, recordtfvars bool, extraArgs ...string) (
	*OIDCProviderOperatorRolesOutput, error)

func (*OIDCProviderOperatorRolesService) Destroy added in v1.4.0

func (*OIDCProviderOperatorRolesService) Init added in v1.4.0

func (oidcOP *OIDCProviderOperatorRolesService) Init(manifestDirs ...string) error

func (*OIDCProviderOperatorRolesService) Output added in v1.4.0

type Proxy added in v1.5.0

type Proxy struct {
	HTTPProxy             string `json:"http_proxy,omitempty"`
	HTTPSProxy            string `json:"https_proxy,omitempty"`
	AdditionalTrustBundle string `json:"additional_trust_bundle,omitempty"`
	NoProxy               string `json:"no_proxy,omitempty"`
}

type RhcsInfoArgs added in v1.5.0

type RhcsInfoArgs struct {
	ID           string `json:"id,omitempty"`
	Token        string `json:"token,omitempty"`
	ResourceName string `json:"resource_name,omitempty"`
	ResourceKind string `json:"resource_kind,omitempty"`
}

type RhcsInfoService added in v1.5.0

type RhcsInfoService struct {
	CreationArgs *RhcsInfoArgs
	ManifestDir  string
	Context      context.Context
}

func NewRhcsInfoService added in v1.5.0

func NewRhcsInfoService(manifestDir ...string) *RhcsInfoService

func (*RhcsInfoService) Create added in v1.5.0

func (rhcsInfo *RhcsInfoService) Create(createArgs *RhcsInfoArgs, extraArgs ...string) error

func (*RhcsInfoService) Destroy added in v1.5.0

func (rhcsInfo *RhcsInfoService) Destroy(createArgs ...*RhcsInfoArgs) error

func (*RhcsInfoService) Init added in v1.5.0

func (rhcsInfo *RhcsInfoService) Init(manifestDirs ...string) error

func (*RhcsInfoService) ShowState added in v1.5.0

func (rhcsInfoService *RhcsInfoService) ShowState(rhcsInfoArgs *RhcsInfoArgs) (string, error)

type SecurityGroupArgs added in v1.5.0

type SecurityGroupArgs struct {
	NamePrefix  string `json:"name_prefix,omitempty"`
	SGNumber    int    `json:"sg_number,omitempty"`
	VPCID       string `json:"vpc_id,omitempty"`
	Description string `json:"description,omitempty"`
	AWSRegion   string `json:"aws_region,omitempty"`
}

type SecurityGroupService added in v1.5.0

type SecurityGroupService struct {
	CreationArgs *SecurityGroupArgs
	ManifestDir  string
	Context      context.Context
}

func NewSecurityGroupService added in v1.5.0

func NewSecurityGroupService(manifestDir ...string) *SecurityGroupService

func (*SecurityGroupService) Apply added in v1.5.0

func (sgs *SecurityGroupService) Apply(createArgs *SecurityGroupArgs, recordtfvars bool, extraArgs ...string) error

func (*SecurityGroupService) Destroy added in v1.5.0

func (sgs *SecurityGroupService) Destroy(createArgs ...*SecurityGroupArgs) error

func (*SecurityGroupService) Init added in v1.5.0

func (sgs *SecurityGroupService) Init(manifestDirs ...string) error

func (*SecurityGroupService) Output added in v1.5.0

type SecurityGroupsOutput added in v1.5.0

type SecurityGroupsOutput struct {
	SGIDs []string `json:"sg_ids,omitempty"`
}

type VPCArgs

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

type VPCOutput added in v1.4.0

type VPCOutput struct {
	ClusterPublicSubnets  []string `json:"cluster-public-subnet,omitempty"`
	VPCCIDR               string   `json:"vpc-cidr,omitempty"`
	ClusterPrivateSubnets []string `json:"cluster-private-subnet,omitempty"`
	AZs                   []string `json:"azs,omitempty"`
	NodePrivateSubnets    []string `json:"node-private-subnet,omitempty"`
	VPCID                 string   `json:"vpc_id,omitempty"`
}

type VPCService

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

func NewVPCService

func NewVPCService(manifestDir ...string) *VPCService

func (*VPCService) Apply added in v1.5.0

func (vpc *VPCService) Apply(createArgs *VPCArgs, recordtfvars bool, 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() (*VPCOutput, error)

type VPCTagArgs added in v1.5.0

type VPCTagArgs struct {
	AWSRegion string   `json:"aws_region,omitempty"`
	IDs       []string `json:"ids,omitempty"`
	TagKey    string   `json:"key,omitempty"`
	TagValue  string   `json:"value,omitempty"`
}

type VPCTagService added in v1.5.0

type VPCTagService struct {
	CreationArgs *VPCTagArgs
	ManifestDir  string
	Context      context.Context
}

func NewVPCTagService added in v1.5.0

func NewVPCTagService(manifestDir ...string) *VPCTagService

func (*VPCTagService) Apply added in v1.5.0

func (vpctag *VPCTagService) Apply(createArgs *VPCTagArgs, recordtfvars bool, extraArgs ...string) error

func (*VPCTagService) Destroy added in v1.5.0

func (vpctag *VPCTagService) Destroy(createArgs ...*VPCTagArgs) error

func (*VPCTagService) Init added in v1.5.0

func (vpctag *VPCTagService) Init(manifestDirs ...string) error

Jump to

Keyboard shortcuts

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