v0

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ThreeportConfigName = "config"
	ThreeportConfigType = "yaml"
)

Variables

This section is empty.

Functions

func DefaultProviderConfigDir

func DefaultProviderConfigDir() (string, error)

DefaultProviderConfigDir returns the default path to the directory for storing infra provider inventory and config if not set which is ~/.config/threeport.

func DefaultThreeportConfigPath

func DefaultThreeportConfigPath(homedir string) string

DefaultThreeportConfigPath returns the default path to the threeport config file on the user's filesystem.

func DeleteThreeportConfigControlPlane

func DeleteThreeportConfigControlPlane(threeportConfig *ThreeportConfig, deleteThreeportControlPlaneName string)

DeleteThreeportConfigControlPlane updates a threeport config to remove a deleted threeport control plane and the current control plane.

func GetValuesDocumentFromPath added in v0.5.0

func GetValuesDocumentFromPath(valuesDocument, helmWorkloadConfigPath string) (*string, error)

GetValuesDocumentFromPath returns the values document content from the path provided.

func GetValuesFromDocumentOrInline added in v0.5.0

func GetValuesFromDocumentOrInline(inline, valuesDocument, helmWorkloadConfigPath string) (*string, error)

GetValuesFromDocumentOrInline returns the values document content from the inline value provided first, then from the document provided

func UpdateThreeportConfig

func UpdateThreeportConfig(
	threeportConfig *ThreeportConfig,
	threeportControlPlaneConfig *ControlPlane,
)

UpdateThreeportConfig updates a threeport config to add or update a config for a threeport control plane and set it as the current control plane.

Types

type AwsAccountConfig

type AwsAccountConfig struct {
	AwsAccount AwsAccountValues `yaml:"AwsAccount"`
}

AwsAccountConfig contains the config for an AWS account.

type AwsAccountValues

type AwsAccountValues struct {
	Name             string `yaml:"Name"`
	AccountID        string `yaml:"AccountID"`
	DefaultAccount   bool   `yaml:"DefaultAccount"`
	DefaultRegion    string `yaml:"DefaultRegion"`
	AccessKeyID      string `yaml:"AccessKeyID"`
	SecretAccessKey  string `yaml:"SecretAccessKey"`
	RoleArn          string `yaml:"RoleArn"`
	LocalConfig      string `yaml:"LocalConfig"`
	LocalCredentials string `yaml:"LocalCredentials"`
	LocalProfile     string `yaml:"LocalProfile"`
}

AwsAccountValues contains the attributes needed to manage an AWS account.

func (*AwsAccountValues) Create

func (a *AwsAccountValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.AwsAccount, error)

Create creates an AWS account in the Threeport API.

func (*AwsAccountValues) Delete

func (a *AwsAccountValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.AwsAccount, error)

Delete deletes a AWS account from the Threeport API.

func (*AwsAccountValues) Describe added in v0.5.0

func (a *AwsAccountValues) Describe(apiClient *http.Client, apiEndpoint string) (*status.AwsAccountStatusDetail, error)

Describe returns details related to an AWS account.

type AwsEksKubernetesRuntimeConfig added in v0.5.0

type AwsEksKubernetesRuntimeConfig struct {
	AwsEksKubernetesRuntime AwsEksKubernetesRuntimeValues `yaml:"AwsEksKubernetesRuntime"`
}

AwsEksKubernetesRuntimeConfig contains the config for an AWS EKS kubernetes runtime which is an abstraction of an AWS EKS kubernetes runtime definition and instance.

type AwsEksKubernetesRuntimeDefinitionConfig

type AwsEksKubernetesRuntimeDefinitionConfig struct {
	AwsEksKubernetesRuntimeDefinition AwsEksKubernetesRuntimeDefinitionValues `yaml:"AwsEksKubernetesRuntimeDefinition"`
}

AwsEksKubernetesRuntimeDefinitionConfig contains the config for an AWS EKS kubernetes runtime definition.

type AwsEksKubernetesRuntimeDefinitionValues

type AwsEksKubernetesRuntimeDefinitionValues struct {
	Name                         string `yaml:"Name"`
	AwsAccountName               string `yaml:"AwsAccountName"`
	ZoneCount                    int    `yaml:"ZoneCount"`
	DefaultNodeGroupInstanceType string `yaml:"DefaultNodeGroupInstanceType"`
	DefaultNodeGroupInitialSize  int    `yaml:"DefaultNodeGroupInitialSize"`
	DefaultNodeGroupMinimumSize  int    `yaml:"DefaultNodeGroupMinimumSize"`
	DefaultNodeGroupMaximumSize  int    `yaml:"DefaultNodeGroupMaximumSize"`
}

AwsEksKubernetesRuntimeDefinitionValues contains the attributes needed to manage an AWS EKS kubernetes runtime definition.

func (*AwsEksKubernetesRuntimeDefinitionValues) Create

Create creates an AWS EKS kubernetes runtime definition in the threeport API.

func (*AwsEksKubernetesRuntimeDefinitionValues) Delete

Delete deletes an AWS EKS kubernetes definition from the Threeport API.

func (*AwsEksKubernetesRuntimeDefinitionValues) Describe added in v0.5.0

Describe returns details related to a AWS EKS kubernetes runtime definition.

type AwsEksKubernetesRuntimeInstanceConfig

type AwsEksKubernetesRuntimeInstanceConfig struct {
	AwsEksKubernetesRuntimeInstance AwsEksKubernetesRuntimeInstanceValues `yaml:"AwsEksKubernetesRuntimeInstance"`
}

AwsEksKubernetesRuntimeInstanceConfig contains the config for an AWS EKS kubernetes runtime instance.

type AwsEksKubernetesRuntimeInstanceValues

type AwsEksKubernetesRuntimeInstanceValues struct {
	Name                              string                                  `yaml:"Name"`
	Region                            string                                  `yaml:"Region"`
	AwsEksKubernetesRuntimeDefinition AwsEksKubernetesRuntimeDefinitionValues `yaml:"AwsEksKubernetesRuntimeDefinition"`
}

AwsEksKubernetesRuntimeInstanceValues contains the attributes needed to manage an AWS EKS kubernetes runtime instance.

func (*AwsEksKubernetesRuntimeInstanceValues) Create

Create creates an AWS EKS kubernetes runtime instance in the threeport API.

func (*AwsEksKubernetesRuntimeInstanceValues) Delete

Delete deletes an AWS EKS kubernetes runtime instance from the Threeport API.

func (*AwsEksKubernetesRuntimeInstanceValues) Describe added in v0.5.0

Describe returns details related to a AWS EKS kubernetes runtime instance.

type AwsEksKubernetesRuntimeValues added in v0.5.0

type AwsEksKubernetesRuntimeValues struct {
	Name                         string `yaml:"Name"`
	AwsAccountName               string `yaml:"AwsAccountName"`
	ZoneCount                    int    `yaml:"ZoneCount"`
	DefaultNodeGroupInstanceType string `yaml:"DefaultNodeGroupInstanceType"`
	DefaultNodeGroupInitialSize  int    `yaml:"DefaultNodeGroupInitialSize"`
	DefaultNodeGroupMinimumSize  int    `yaml:"DefaultNodeGroupMinimumSize"`
	DefaultNodeGroupMaximumSize  int    `yaml:"DefaultNodeGroupMaximumSize"`
	Region                       string `yaml:"Region"`
}

AwsEksKubernetesRuntimeValues contains the attributes needed to manage an AWS EKS kubernetes runtime definition and instance.

func (*AwsEksKubernetesRuntimeValues) Create added in v0.5.0

Create creates a AWS EKS kubernetes runtime definition and instance in the Threeport API.

func (*AwsEksKubernetesRuntimeValues) Delete added in v0.5.0

Delete deletes a AWS EKS kubernetes runtime definition and AWS EKS kubernetes runtime instance.

func (*AwsEksKubernetesRuntimeValues) GetOperations added in v0.5.0

GetOperations returns a slice of operations used to create or delete an AWS EKS kubernetes runtime.

type AwsObjectStorageBucketConfig

type AwsObjectStorageBucketConfig struct {
	AwsObjectStorageBucket AwsObjectStorageBucketValues `yaml:"AwsObjectStorageBucket"`
}

AwsObjectStorageBucketConfig contains the config for an AWS object storage bucket.

type AwsObjectStorageBucketDefinitionConfig

type AwsObjectStorageBucketDefinitionConfig struct {
	AwsObjectStorageBucketDefinition AwsObjectStorageBucketDefinitionValues `yaml:"AwsObjectStorageBucketDefinition"`
}

AwsObjectStorageBucketDefinitionConfig contains the config for an AWS S3 bucket definition.

type AwsObjectStorageBucketDefinitionValues

type AwsObjectStorageBucketDefinitionValues struct {
	Name                       string `yaml:"Name"`
	AwsAccountName             string `yaml:"AwsAccountName"`
	PublicReadAccess           bool   `yaml:"PublicReadAccess"`
	WorkloadServiceAccountName string `yaml:"WorkloadServiceAccountName"`
	WorkloadBucketEnvVar       string `yaml:"WorkloadBucketEnvVar"`
}

AwsObjectStorageBucketDefinitionValues contains the attributes needed to configure an AWS S3 bucket.

func (*AwsObjectStorageBucketDefinitionValues) Create

Create creates an AWS object storage bucket definition in the threeport API.

func (*AwsObjectStorageBucketDefinitionValues) Delete

Delete deletes an AWS object storage bucket definition from the threeport API.

func (*AwsObjectStorageBucketDefinitionValues) Describe added in v0.5.0

Describe returns details related to an AWS object storage bucket definition.

type AwsObjectStorageBucketInstanceConfig

type AwsObjectStorageBucketInstanceConfig struct {
	AwsObjectStorageBucketInstance AwsObjectStorageBucketInstanceValues `yaml:"AwsObjectStorageBucketInstance"`
}

AwsObjectStorageBucketInstanceConfig contains the config for an AWS S3 bucket instance.

type AwsObjectStorageBucketInstanceValues

type AwsObjectStorageBucketInstanceValues struct {
	Name                             string                                 `yaml:"Name"`
	AwsObjectStorageBucketDefinition AwsObjectStorageBucketDefinitionValues `yaml:"AwsObjectStorageBucketDefinition"`
	WorkloadInstance                 WorkloadInstanceValues                 `yaml:"WorkloadInstance"`
}

AwsObjectStorageBucketInstanceValues contains the attributes needed to create an AWS S3 instance.

func (*AwsObjectStorageBucketInstanceValues) Create

Create creates and AWS object storage bucket instance in the threeport API.

func (*AwsObjectStorageBucketInstanceValues) Delete

Delete deletes an AWS object storage bucket instance from the threeport API.

type AwsObjectStorageBucketValues

type AwsObjectStorageBucketValues struct {
	Name                       string                  `yaml:"Name"`
	AwsAccountName             string                  `yaml:"AwsAccountName"`
	PublicReadAccess           bool                    `yaml:"PublicReadAccess"`
	WorkloadServiceAccountName string                  `yaml:"WorkloadServiceAccountName"`
	WorkloadBucketEnvVar       string                  `yaml:"WorkloadBucketEnvVar"`
	WorkloadInstance           *WorkloadInstanceValues `yaml:"WorkloadInstance"`
}

AwsObjectStorageBucketConfig contains the config for an abstraction of an S3 bucket instance and definition.

func (*AwsObjectStorageBucketValues) Create

Create creates an AWS object storage bucket definition and instance in the threeport API.

func (*AwsObjectStorageBucketValues) Delete

Delete deletes an AWS object storage bucket defintiion and instance from the threeport API.

type AwsRelationalDatabaseConfig

type AwsRelationalDatabaseConfig struct {
	AwsRelationalDatabase AwsRelationalDatabaseValues `yaml:"AwsRelationalDatabase"`
}

AwsRelationalDatabaseConfig contains the config for an AWS relational database.

type AwsRelationalDatabaseDefinitionConfig

type AwsRelationalDatabaseDefinitionConfig struct {
	AwsRelationalDatabaseDefinition AwsRelationalDatabaseDefinitionValues `yaml:"AwsRelationalDatabaseDefinition"`
}

AwsRelationalDatabaseDefinitionConfig contains the config for an AWS relational database definition.

type AwsRelationalDatabaseDefinitionValues

type AwsRelationalDatabaseDefinitionValues struct {
	Name               string `yaml:"Name"`
	AwsAccountName     string `yaml:"AwsAccountName"`
	Engine             string `yaml:"Engine"`
	EngineVersion      string `yaml:"EngineVersion"`
	DatabaseName       string `yaml:"DatabaseName"`
	DatabasePort       int    `yaml:"DatabasePort"`
	BackupDays         int    `yaml:"BackupDays"`
	MachineSize        string `yaml:"MachineSize"`
	StorageGb          int    `yaml:"StorageGb"`
	WorkloadSecretName string `yaml:"WorkloadSecretName"`
}

AwsRelationalDatabaseDefinitionValues contains the attributes needed to configure an AWS RDS instance.

func (*AwsRelationalDatabaseDefinitionValues) Create

Create creates an AWS relational database definition in the threeport API.

func (*AwsRelationalDatabaseDefinitionValues) Delete

Delete deletes an AWS relational database definition from the threeport API.

type AwsRelationalDatabaseInstanceConfig

type AwsRelationalDatabaseInstanceConfig struct {
	AwsRelationalDatabaseInstance AwsRelationalDatabaseInstanceValues `yaml:"AwsRelationalDatabaseInstance"`
}

AwsRelationalDatabaseInstanceConfig contains the config for an AWS relational database instance.

type AwsRelationalDatabaseInstanceValues

type AwsRelationalDatabaseInstanceValues struct {
	Name                            string                                `yaml:"Name"`
	AwsRelationalDatabaseDefinition AwsRelationalDatabaseDefinitionValues `yaml:"AwsRelationalDatabaseDefinition"`
	WorkloadInstance                WorkloadInstanceValues                `yaml:"WorkloadInstance"`
}

AwsRelationalDatabaseInstanceValues contains the attributes needed to create an AWS RDS instance.

func (*AwsRelationalDatabaseInstanceValues) Create

Create creates an AWS relational database instance in the threeport API.

func (*AwsRelationalDatabaseInstanceValues) Delete

Delete deletes an AWS relational database instance from the threeport API.

type AwsRelationalDatabaseValues

type AwsRelationalDatabaseValues struct {
	Name               string                  `yaml:"Name"`
	AwsAccountName     string                  `yaml:"AwsAccountName"`
	Engine             string                  `yaml:"Engine"`
	EngineVersion      string                  `yaml:"EngineVersion"`
	DatabaseName       string                  `yaml:"DatabaseName"`
	DatabasePort       int                     `yaml:"DatabasePort"`
	BackupDays         int                     `yaml:"BackupDays"`
	MachineSize        string                  `yaml:"MachineSize"`
	StorageGb          int                     `yaml:"StorageGb"`
	WorkloadSecretName string                  `yaml:"WorkloadSecretName"`
	WorkloadInstance   *WorkloadInstanceValues `yaml:"WorkloadInstance"`
}

AwsRelationalDatabaseConfig contains the config for an abstraction of an RDS instance and definition.

func (*AwsRelationalDatabaseValues) Create

Create creates an AWS relational database definition and instance in the threeport API.

func (*AwsRelationalDatabaseValues) Delete

Delete deletes an AWS EKS relational database definition and instance from the threeport API.

type ControlPlane

type ControlPlane struct {
	// The unique name of the threeport control plane.
	Name string `yaml:"Name"`

	// If true client certificate authentication is used.
	AuthEnabled bool `yaml:"AuthEnabled"`

	// True used to indicate that the control plane was the first in the control plane group
	Genesis bool `yaml:"Genesis"`

	// The address for the threeport API.
	APIServer string `yaml:"APIServer"`

	// The threeport API's CA certificate.
	CACert string `yaml:"CACert"`

	// Kubernetes API and connection info.
	KubeAPI KubeAPI `yaml:"KubeAPI"`

	// The infra provider hosting the threeport control plane.
	Provider string `yaml:"Provider"`

	// Provider configuration for EKS-hosted threeport control planes.
	EKSProviderConfig EKSProviderConfig `yaml:"EKSProviderConfig"`

	// Client authentication credentials to threeport API.
	Credentials []Credential `yaml:"Credentials"`

	// The encryption key used to encrypt secrets.
	EncryptionKey string `yaml:"EncryptionKey"`
}

Control plane is an instance of Threeport control plane the client can use.

func (*ControlPlane) UpdateThreeportConfigInstance

func (c *ControlPlane) UpdateThreeportConfigInstance(f func(*ControlPlane)) (*ThreeportConfig, error)

UpdateThreeportConfigInstance updates a threeport instance config and returns the updated threeport config.

type ControlPlaneConfig

type ControlPlaneConfig struct {
	ControlPlane ControlPlaneValues `yaml:"ControlPlane"`
}

ControlPlaneConfig contains the config for a control plane which is an abstraction of a control plane definition and control plane instance.

type ControlPlaneDefinitionConfig

type ControlPlaneDefinitionConfig struct {
	ControlPlaneDefinition ControlPlaneDefinitionValues `yaml:"ControlPlaneDefinition"`
}

ControlPlaneDefinitionConfig contains the config for a control plane definition.

type ControlPlaneDefinitionValues

type ControlPlaneDefinitionValues struct {
	Name          string `yaml:"Name"`
	AuthEnabled   bool   `yaml:"AuthEnabled"`
	OnboardParent bool   `yaml:"OnboardParent"`
}

ControlPlaneDefinitionValues contains the attributes needed to manage a control plane definition.

func (*ControlPlaneDefinitionValues) Create

func (cd *ControlPlaneDefinitionValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.ControlPlaneDefinition, error)

Create creates a control plane definition in the Threeport API.

func (*ControlPlaneDefinitionValues) Delete

func (cd *ControlPlaneDefinitionValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.ControlPlaneDefinition, error)

Delete deletes a control plane definition from the Threeport API.

type ControlPlaneInstanceConfig

type ControlPlaneInstanceConfig struct {
	ControlPlaneInstance ControlPlaneInstanceValues `yaml:"ControlPlaneInstance"`
}

ControlPlaneInstanceConfig contains the config for a control plane instance.

type ControlPlaneInstanceValues

type ControlPlaneInstanceValues struct {
	Name                      string                           `yaml:"Name"`
	Namespace                 string                           `yaml:"Namespace"`
	KubernetesRuntimeInstance *KubernetesRuntimeInstanceValues `yaml:"KubernetesRuntimeInstance"`
	ControlPlaneDefinition    ControlPlaneDefinitionValues     `yaml:"ControlPlaneDefinition"`
	CustomComponentInfo       []*v0.ControlPlaneComponent      `yaml:"CustomComponentInfo"`
}

ControlPlaneInstanceValues contains the attributes needed to manage a control plane instance.

func (*ControlPlaneInstanceValues) Create

func (ci *ControlPlaneInstanceValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.ControlPlaneInstance, error)

Create creates a control plane instance in the Threeport API.

func (*ControlPlaneInstanceValues) Delete

func (ci *ControlPlaneInstanceValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.ControlPlaneInstance, error)

Delete deletes a control plane instance from the Threeport API.

type ControlPlaneValues

type ControlPlaneValues struct {
	Name                      string                           `yaml:"Name"`
	Namespace                 string                           `yaml:"Namespace"`
	AuthEnabled               bool                             `yaml:"AuthEnabled"`
	OnboardParent             bool                             `yaml:"OnboardParent"`
	KubernetesRuntimeInstance *KubernetesRuntimeInstanceValues `yaml:"KubernetesRuntimeInstance"`
	CustomComponentInfo       []*v0.ControlPlaneComponent      `yaml:"CustomComponentInfo"`
}

ControlPlaneValues contains the attributes needed to manage a control plane definition and control plane instance.

func (*ControlPlaneValues) Create

func (c *ControlPlaneValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.ControlPlaneDefinition, *v0.ControlPlaneInstance, error)

Create creates a control plane definition and instance in the Threeport API.

func (*ControlPlaneValues) Delete

func (c *ControlPlaneValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.ControlPlaneDefinition, *v0.ControlPlaneInstance, error)

Delete deletes a control plane definition and a control plane instance from the Threeport API.

type Credential

type Credential struct {
	Name       string `yaml:"Name"`
	ClientCert string `yaml:"ClientCert"`
	ClientKey  string `yaml:"ClientKey"`
	Token      string ``
}

Credential is a client certificate and key pair for authenticating to a Threeport instance.

type DomainNameConfig added in v0.5.0

type DomainNameConfig struct {
	DomainName DomainNameValues `yaml:"DomainName"`
}

DomainNameConfig contains the config for a domain name.

type DomainNameDefinitionConfig

type DomainNameDefinitionConfig struct {
	DomainNameDefinition DomainNameDefinitionValues `yaml:"DomainNameDefinition"`
}

DomainNameDefinitionConfig contains the config for a domain name definition.

type DomainNameDefinitionValues

type DomainNameDefinitionValues struct {
	Name       string `yaml:"Name"`
	Domain     string `yaml:"Domain"`
	Zone       string `yaml:"Zone"`
	AdminEmail string `yaml:"AdminEmail"`
}

DomainNameDefinitionValues contains the attributes needed to manage a domain name definition.

func (*DomainNameDefinitionValues) Create added in v0.5.0

func (d *DomainNameDefinitionValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.DomainNameDefinition, error)

Create creates a domain name definition if it does not exist in the Threeport API.

func (*DomainNameDefinitionValues) Delete

func (d *DomainNameDefinitionValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.DomainNameDefinition, error)

Delete deletes a domain name definition from the Threeport API.

func (*DomainNameDefinitionValues) Describe added in v0.5.0

func (wd *DomainNameDefinitionValues) Describe(
	apiClient *http.Client,
	apiEndpoint string,
) (*status.DomainNameDefinitionStatusDetail, error)

Describe returns details related to a domain name definition.

func (*DomainNameDefinitionValues) Validate added in v0.3.2

func (d *DomainNameDefinitionValues) Validate() error

Validate validates the domain name definition values.

type DomainNameInstanceConfig

type DomainNameInstanceConfig struct {
	DomainNameInstance DomainNameInstanceValues `yaml:"DomainNameInstance"`
}

DomainNameInstanceConfig contains the config for a domain name instance.

type DomainNameInstanceValues

type DomainNameInstanceValues struct {
	Name                      string                           `yaml:"Name"`
	DomainNameDefinition      DomainNameDefinitionValues       `yaml:"DomainNameDefinition"`
	KubernetesRuntimeInstance *KubernetesRuntimeInstanceValues `yaml:"KubernetesRuntimeInstance"`
	WorkloadInstance          WorkloadInstanceValues           `yaml:"WorkloadInstance"`
}

DomainNameInstanceValues contains the attributes needed to manage a domain name instance.

func (*DomainNameInstanceValues) Create

func (d *DomainNameInstanceValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.DomainNameInstance, error)

Create creates a domain name instance in the Threeport API.

func (*DomainNameInstanceValues) Delete

func (d *DomainNameInstanceValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.DomainNameInstance, error)

Delete deletes a domain name instance from the Threeport API.

func (*DomainNameInstanceValues) Describe added in v0.5.0

func (k *DomainNameInstanceValues) Describe(
	apiClient *http.Client,
	apiEndpoint string,
) (*status.DomainNameInstanceStatusDetail, error)

Describe returns details related to a domain name instance.

func (*DomainNameInstanceValues) Validate added in v0.3.2

func (d *DomainNameInstanceValues) Validate() error

Validate validates the domain name instance values.

type DomainNameValues added in v0.5.0

type DomainNameValues struct {
	Name                      string                           `yaml:"Name"`
	Domain                    string                           `yaml:"Domain"`
	Zone                      string                           `yaml:"Zone"`
	AdminEmail                string                           `yaml:"AdminEmail"`
	KubernetesRuntimeInstance *KubernetesRuntimeInstanceValues `yaml:"KubernetesRuntimeInstance"`
	WorkloadInstance          WorkloadInstanceValues           `yaml:"WorkloadInstance"`
}

DomainNameValues contains the attributes needed to manage a domain name definition and domain name instance.

func (*DomainNameValues) Create added in v0.5.0

func (n *DomainNameValues) Create(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.DomainNameDefinition, *v0.DomainNameInstance, error)

Create creates a domain name definition and instance in the Threeport API.

func (*DomainNameValues) Delete added in v0.5.0

func (n *DomainNameValues) Delete(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.DomainNameDefinition, *v0.DomainNameInstance, error)

Delete deletes a domain name definition and instance from the Threeport API.

func (*DomainNameValues) GetOperations added in v0.5.0

func (n *DomainNameValues) GetOperations(
	apiClient *http.Client,
	apiEndpoint string,
) (*util.Operations, *v0.DomainNameDefinition, *v0.DomainNameInstance)

GetOperations returns a slice of operations used to create or delete a domain name.

type EKSProviderConfig

type EKSProviderConfig struct {
	AwsConfigProfile string `yaml:"AWSConfigProfile"`
	AwsRegion        string `yaml:"AWSRegion"`
	AwsAccountID     string `yaml:"AWSAccountID"`
}

EKSProviderConfig is the set of provider config information needed to manage EKS clusters on AWs.

type GatewayConfig added in v0.5.0

type GatewayConfig struct {
	Gateway GatewayValues `yaml:"Gateway"`
}

GatewayConfig contains the config for a gateway.

type GatewayDefinitionConfig

type GatewayDefinitionConfig struct {
	GatewayDefinition GatewayDefinitionValues `yaml:"GatewayDefinition"`
}

GatewayDefinitionConfig contains the config for a gateway definition.

type GatewayDefinitionValues

type GatewayDefinitionValues struct {
	Name                 string                     `yaml:"Name"`
	HttpPorts            []GatewayHttpPortValues    `yaml:"HttpPorts"`
	TcpPorts             []GatewayTcpPortValues     `yaml:"TcpPorts"`
	ServiceName          string                     `yaml:"ServiceName"`
	SubDomain            string                     `yaml:"SubDomain"`
	DomainNameDefinition DomainNameDefinitionValues `yaml:"DomainNameDefinition"`
}

GatewayDefinitionValues contains the attributes needed to manage a gateway.

func (*GatewayDefinitionValues) Create

func (g *GatewayDefinitionValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.GatewayDefinition, error)

Create creates a gateway definition.

func (*GatewayDefinitionValues) Delete

func (g *GatewayDefinitionValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.GatewayDefinition, error)

Delete deletes a gateway definition.

func (*GatewayDefinitionValues) Describe added in v0.5.0

func (wd *GatewayDefinitionValues) Describe(
	apiClient *http.Client,
	apiEndpoint string,
) (*status.GatewayDefinitionStatusDetail, error)

Describe returns details related to a gateway definition.

func (*GatewayDefinitionValues) Validate

func (g *GatewayDefinitionValues) Validate() error

Validate validates gateway definition values.

type GatewayHttpPortValues added in v0.4.0

type GatewayHttpPortValues struct {
	Port          int    `yaml:"Port"`
	Path          string `yaml:"Path"`
	TLSEnabled    bool   `yaml:"TLSEnabled"`
	HTTPSRedirect bool   `yaml:"HTTPSRedirect"`
}

GatewayHttpPortValues contains the attributes needed to manage a gateway http port.

func (*GatewayHttpPortValues) Validate added in v0.4.0

func (g *GatewayHttpPortValues) Validate() error

Validate validates gateway http port values.

type GatewayInstanceConfig

type GatewayInstanceConfig struct {
	GatewayInstance GatewayInstanceValues `yaml:"GatewayInstance"`
}

GatewayInstanceConfig contains the config for a gateway instance.

type GatewayInstanceValues

type GatewayInstanceValues struct {
	Name                      string                           `yaml:"Name"`
	GatewayDefinition         GatewayDefinitionValues          `yaml:"GatewayDefinition"`
	KubernetesRuntimeInstance *KubernetesRuntimeInstanceValues `yaml:"KubernetesRuntimeInstance"`
	WorkloadInstance          WorkloadInstanceValues           `yaml:"WorkloadInstance"`
}

GatewayInstanceValues contains the attributes needed to manage a gateway instance.

func (*GatewayInstanceValues) Create

func (g *GatewayInstanceValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.GatewayInstance, error)

Create creates a gateway instance.

func (*GatewayInstanceValues) Delete

func (g *GatewayInstanceValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.GatewayInstance, error)

Delete deletes a gateway instance.

func (*GatewayInstanceValues) Describe added in v0.5.0

func (k *GatewayInstanceValues) Describe(
	apiClient *http.Client,
	apiEndpoint string,
) (*status.GatewayInstanceStatusDetail, error)

Describe returns details related to a gateway instance.

func (*GatewayInstanceValues) Validate

func (g *GatewayInstanceValues) Validate() error

Validate validates the gateway definition values.

type GatewayTcpPortValues added in v0.4.0

type GatewayTcpPortValues struct {
	Port       int  `yaml:"Port"`
	TLSEnabled bool `yaml:"TLSEnabled"`
}

GatewayTcpPortValues contains the attributes needed to manage a gateway tcp port.

type GatewayValues added in v0.5.0

type GatewayValues struct {
	Name                      string                           `yaml:"Name"`
	HttpPorts                 []GatewayHttpPortValues          `yaml:"HttpPorts"`
	TcpPorts                  []GatewayTcpPortValues           `yaml:"TcpPorts"`
	ServiceName               string                           `yaml:"ServiceName"`
	SubDomain                 string                           `yaml:"SubDomain"`
	DomainNameDefinition      DomainNameDefinitionValues       `yaml:"DomainNameDefinition"`
	KubernetesRuntimeInstance *KubernetesRuntimeInstanceValues `yaml:"KubernetesRuntimeInstance"`
	WorkloadInstance          WorkloadInstanceValues           `yaml:"WorkloadInstance"`
}

GatewayValues contains the attributes needed to manage a gateway definition and gateway instance.

func (*GatewayValues) Create added in v0.5.0

func (g *GatewayValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.GatewayDefinition, *v0.GatewayInstance, error)

Create creates a gateway definition and instance in the Threeport API.

func (*GatewayValues) Delete added in v0.5.0

func (g *GatewayValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.GatewayDefinition, *v0.GatewayInstance, error)

Delete deletes a gateway definition and instance from the Threeport API.

func (*GatewayValues) GetOperations added in v0.5.0

func (g *GatewayValues) GetOperations(
	apiClient *http.Client,
	apiEndpoint string,
) (*util.Operations, *v0.GatewayDefinition, *v0.GatewayInstance)

GetOperations returns a slice of operations used to create or delete a gateway.

type HelmWorkloadConfig added in v0.4.0

type HelmWorkloadConfig struct {
	HelmWorkload HelmWorkloadValues `yaml:"HelmWorkload"`
}

HelmWorkloadConfig contains the config for a helm workload which is an abstraction of a helm workload definition and helm workload instance.

type HelmWorkloadDefinitionConfig added in v0.4.0

type HelmWorkloadDefinitionConfig struct {
	HelmWorkloadDefinition HelmWorkloadDefinitionValues `yaml:"HelmWorkloadDefinition"`
}

HelmWorkloadDefinitionConfig contains the config for a helm workload definition.

type HelmWorkloadDefinitionValues added in v0.4.0

type HelmWorkloadDefinitionValues struct {
	Name                   string `yaml:"Name"`
	Repo                   string `yaml:"Repo"`
	Chart                  string `yaml:"Chart"`
	ChartVersion           string `yaml:"ChartVersion"`
	Values                 string `yaml:"Values"`
	ValuesDocument         string `yaml:"ValuesDocument"`
	HelmWorkloadConfigPath string `yaml:"HelmWorkloadConfigPath"`
}

HelmWorkloadDefinitionValues contains the attributes needed to manage a helm workload definition.

func (*HelmWorkloadDefinitionValues) Create added in v0.4.0

func (h *HelmWorkloadDefinitionValues) Create(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.HelmWorkloadDefinition, error)

Create creates a helm workload definition in the Threeport API.

func (*HelmWorkloadDefinitionValues) Delete added in v0.4.0

func (h *HelmWorkloadDefinitionValues) Delete(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.HelmWorkloadDefinition, error)

Delete deletes a helm workload definition from the Threeport API.

func (*HelmWorkloadDefinitionValues) Describe added in v0.5.0

func (wd *HelmWorkloadDefinitionValues) Describe(
	apiClient *http.Client,
	apiEndpoint string,
) (*status.HelmWorkloadDefinitionStatusDetail, error)

Describe returns details related to a helm workload definition.

func (*HelmWorkloadDefinitionValues) ValidateCreate added in v0.5.0

func (h *HelmWorkloadDefinitionValues) ValidateCreate() error

ValidateCreate validates the helm workload definition values before creating a helm workload definition

type HelmWorkloadInstanceConfig added in v0.4.0

type HelmWorkloadInstanceConfig struct {
	HelmWorkloadInstance HelmWorkloadInstanceValues `yaml:"HelmWorkloadInstance"`
}

HelmWorkloadInstanceConfig contains the config for a helm workload instance.

type HelmWorkloadInstanceValues added in v0.4.0

type HelmWorkloadInstanceValues struct {
	Name                      string                           `yaml:"Name"`
	Values                    string                           `yaml:"Values"`
	ValuesDocument            string                           `yaml:"ValuesDocument"`
	KubernetesRuntimeInstance *KubernetesRuntimeInstanceValues `yaml:"KubernetesRuntimeInstance"`
	HelmWorkloadDefinition    HelmWorkloadDefinitionValues     `yaml:"HelmWorkloadDefinition"`
	HelmWorkloadConfigPath    string                           `yaml:"HelmWorkloadConfigPath"`
}

HelmWorkloadInstanceValues contains the attributes needed to manage a helm workload instance.

func (*HelmWorkloadInstanceValues) Create added in v0.4.0

func (h *HelmWorkloadInstanceValues) Create(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.HelmWorkloadInstance, error)

Create creates a helm workload instance in the Threeport API.

func (*HelmWorkloadInstanceValues) Delete added in v0.4.0

func (h *HelmWorkloadInstanceValues) Delete(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.HelmWorkloadInstance, error)

Delete deletes a helm workload instance from the Threeport API.

func (*HelmWorkloadInstanceValues) Describe added in v0.4.0

Describe returns important failure events related to a helm workload instance.

func (*HelmWorkloadInstanceValues) ValidateCreate added in v0.5.0

func (h *HelmWorkloadInstanceValues) ValidateCreate() error

ValidateCreate validates the helm workload instance values before creating a helm workload instance

type HelmWorkloadValues added in v0.4.0

type HelmWorkloadValues struct {
	Name                      string                           `yaml:"Name"`
	Repo                      string                           `yaml:"Repo"`
	Chart                     string                           `yaml:"Chart"`
	ChartVersion              string                           `yaml:"ChartVersion"`
	DefinitionValues          string                           `yaml:"DefinitionValues"`
	DefinitionValuesDocument  string                           `yaml:"DefinitionValuesDocument"`
	InstanceValues            string                           `yaml:"InstanceValues"`
	InstanceValuesDocument    string                           `yaml:"InstanceValuesDocument"`
	HelmWorkloadConfigPath    string                           `yaml:"HelmWorkloadConfigPath"`
	KubernetesRuntimeInstance *KubernetesRuntimeInstanceValues `yaml:"KubernetesRuntimeInstance"`
	DomainName                *DomainNameDefinitionValues      `yaml:"DomainName"`
	Gateway                   *GatewayDefinitionValues         `yaml:"Gateway"`
	AwsRelationalDatabase     *AwsRelationalDatabaseValues     `yaml:"AwsRelationalDatabase"`
	AwsObjectStorageBucket    *AwsObjectStorageBucketValues    `yaml:"AwsObjectStorageBucket"`
}

HelmWorkloadValues contains the attributes needed to manage a helm workload definition and helm workload instance.

func (*HelmWorkloadValues) Create added in v0.4.0

func (h *HelmWorkloadValues) Create(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.HelmWorkloadDefinition, *v0.HelmWorkloadInstance, error)

Create creates a helm workload definition and instance in the Threeport API.

func (*HelmWorkloadValues) Delete added in v0.4.0

func (h *HelmWorkloadValues) Delete(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.HelmWorkloadDefinition, *v0.HelmWorkloadInstance, error)

Delete deletes a helm workload definition, helm workload instance, domain name definition, domain name instance, gateway definition, and gateway instance from the Threeport API.

func (*HelmWorkloadValues) GetOperations added in v0.4.0

func (h *HelmWorkloadValues) GetOperations(
	apiClient *http.Client,
	apiEndpoint string,
) (*util.Operations, *v0.HelmWorkloadDefinition, *v0.HelmWorkloadInstance, error)

GetOperations returns a slice of operations used to create, update, or delete a helm workload.

func (*HelmWorkloadValues) ValidateCreate added in v0.5.0

func (h *HelmWorkloadValues) ValidateCreate() error

ValidateCreate validates the helm workload values before creating a helm workload

type KubeAPI

type KubeAPI struct {
	APIEndpoint   string `yaml:"APIEndpoint"`
	CACertificate string `yaml:"CACertificate"`
	Certificate   string `yaml:"Certificate"`
	Key           string `yaml:"Key"`
	EKSToken      string `yaml:"EKSToken"`
}

KubeAPI is the information and credentials needed to connect to the Kubernetes API hosting the threeport control plane.

type KubernetesRuntimeConfig

type KubernetesRuntimeConfig struct {
	KubernetesRuntime KubernetesRuntimeValues `yaml:"KubernetesRuntime"`
}

KubernetesRuntimeConfig contains the config for a kubernetes runtime which is an abstraction of a kubernetes runtime definition and kubernetes runtime instance.

type KubernetesRuntimeDefinitionConfig

type KubernetesRuntimeDefinitionConfig struct {
	KubernetesRuntimeDefinition KubernetesRuntimeDefinitionValues `yaml:"KubernetesRuntimeDefinition"`
}

KubernetesRuntimeDefinitionConfig contains the config for a kubernetes runtime definition.

type KubernetesRuntimeDefinitionValues

type KubernetesRuntimeDefinitionValues struct {
	Name                     string `yaml:"Name"`
	InfraProvider            string `yaml:"InfraProvider"`
	InfraProviderAccountName string `yaml:"InfraProviderAccountName"`
	HighAvailability         bool   `yaml:"HighAvailability"`
}

KubernetesRuntimeDefinitionValues contains the attributes needed to manage a kubernetes runtime definition.

func (*KubernetesRuntimeDefinitionValues) Create

func (krd *KubernetesRuntimeDefinitionValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.KubernetesRuntimeDefinition, error)

func (*KubernetesRuntimeDefinitionValues) Delete

func (krd *KubernetesRuntimeDefinitionValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.KubernetesRuntimeDefinition, error)

Delete deletes a kubernetes runtime definition from the Threeport API.

func (*KubernetesRuntimeDefinitionValues) Describe added in v0.5.0

Describe returns details related to a kubernetes runtime definition.

type KubernetesRuntimeInstanceConfig

type KubernetesRuntimeInstanceConfig struct {
	KubernetesRuntimeInstance KubernetesRuntimeInstanceValues `yaml:"KubernetesRuntimeInstance"`
}

KubernetesRuntimeInstanceConfig contains the config for a kubernetes runtime instance.

type KubernetesRuntimeInstanceValues

type KubernetesRuntimeInstanceValues struct {
	Name                        string                            `yaml:"Name"`
	ThreeportControlPlaneHost   bool                              `yaml:"ThreeportControlPlaneHost"`
	DefaultRuntime              bool                              `yaml:"DefaultRuntime"`
	Location                    string                            `yaml:"Location"`
	ThreeportAgentImage         string                            `yaml:"ThreeportAgentImage"`
	KubernetesRuntimeDefinition KubernetesRuntimeDefinitionValues `yaml:"KubernetesRuntimeDefinition"`
}

KubernetesRuntimeInstanceValues contains the attributes needed to manage a kubernetes runtime instance.

func (*KubernetesRuntimeInstanceValues) Create

func (kri *KubernetesRuntimeInstanceValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.KubernetesRuntimeInstance, error)

func (*KubernetesRuntimeInstanceValues) Delete

func (kri *KubernetesRuntimeInstanceValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.KubernetesRuntimeInstance, error)

Delete deletes a kubernetes instance from the Threeport API.

func (*KubernetesRuntimeInstanceValues) Describe added in v0.5.0

Describe returns details related to a kubernetes runtime instance.

type KubernetesRuntimeValues

type KubernetesRuntimeValues struct {
	Name                     string `yaml:"Name"`
	InfraProvider            string `yaml:"InfraProvider"`
	InfraProviderAccountName string `yaml:"InfraProviderAccountName"`
	HighAvailability         bool   `yaml:"HighAvailability"`
	Location                 string `yaml:"Location"`
	DefaultRuntime           bool   `yaml:"DefaultRuntime"`
	ThreeportAgentImage      string `yaml:"ThreeportAgentImage"`
}

KubernetesRuntimeValues contains the attributes needed to manage a kubernetes runtime definition and kubernetes runtime instance.

func (*KubernetesRuntimeValues) Create

Create creates a kubernetes runtime definition and instance in the Threeport API.

func (*KubernetesRuntimeValues) Delete

Delete deletes a kubernetes runtime definition and instance from the Threeport API.

type ObservabilityStackConfig added in v0.5.0

type ObservabilityStackConfig struct {
	ObservabilityStack ObservabilityStackValues `yaml:"ObservabilityStack"`
}

ObservabilityStackConfig contains the config for an observability stack which is an abstraction of an observability stack definition and instance.

type ObservabilityStackDefinitionConfig added in v0.5.0

type ObservabilityStackDefinitionConfig struct {
	ObservabilityStackDefinition ObservabilityStackDefinitionValues `yaml:"ObservabilityStackDefinition"`
}

ObservabilityStackDefinitionConfig contains the config for an observability stack definition.

type ObservabilityStackDefinitionValues added in v0.5.0

type ObservabilityStackDefinitionValues struct {
	Name                                  string `yaml:"Name"`
	GrafanaHelmValues                     string `yaml:"GrafanaHelmValues"`
	GrafanaHelmValuesDocument             string `yaml:"GrafanaHelmValuesDocument"`
	LokiHelmValues                        string `yaml:"LokiHelmValues"`
	LokiHelmValuesDocument                string `yaml:"LokiHelmValuesDocument"`
	PromtailHelmValues                    string `yaml:"PromtailHelmValues"`
	PromtailHelmValuesDocument            string `yaml:"PromtailHelmValuesDocument"`
	KubePrometheusStackHelmValues         string `yaml:"KubePrometheusStackHelmValues"`
	KubePrometheusStackHelmValuesDocument string `yaml:"KubePrometheusStackHelmValuesDocument"`
	ObservabilityConfigPath               string `yaml:"ObservabilityConfigPath"`
}

ObservabilityStackDefinitionValues contains the attributes needed to manage an observability stack definition.

func (*ObservabilityStackDefinitionValues) Create added in v0.5.0

func (o *ObservabilityStackDefinitionValues) Create(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.ObservabilityStackDefinition, error)

Create creates an observability stack definition.

func (*ObservabilityStackDefinitionValues) Delete added in v0.5.0

func (o *ObservabilityStackDefinitionValues) Delete(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.ObservabilityStackDefinition, error)

Delete deletes an observability stack definition.

func (*ObservabilityStackDefinitionValues) ValidateCreate added in v0.5.0

func (o *ObservabilityStackDefinitionValues) ValidateCreate() error

ValidateCreate validates the observability stack definition values for creation

func (*ObservabilityStackDefinitionValues) ValidateDelete added in v0.5.0

func (o *ObservabilityStackDefinitionValues) ValidateDelete() error

ValidateDelete validates the observability stack definition values for deletion

type ObservabilityStackInstanceConfig added in v0.5.0

type ObservabilityStackInstanceConfig struct {
	ObservabilityStackInstance ObservabilityStackInstanceValues `yaml:"ObservabilityStackInstance"`
}

ObservabilityStackInstanceConfig contains the config for an observability stack definition.

type ObservabilityStackInstanceValues added in v0.5.0

type ObservabilityStackInstanceValues struct {
	Name                                  string                             `yaml:"Name"`
	KubernetesRuntimeInstance             *KubernetesRuntimeInstanceValues   `yaml:"KubernetesRuntimeInstance"`
	MetricsEnabled                        bool                               `yaml:"MetricsEnabled"`
	LoggingEnabled                        bool                               `yaml:"LoggingEnabled"`
	GrafanaHelmValues                     string                             `yaml:"GrafanaHelmValues"`
	GrafanaHelmValuesDocument             string                             `yaml:"GrafanaHelmValuesDocument"`
	LokiHelmValues                        string                             `yaml:"LokiHelmValues"`
	LokiHelmValuesDocument                string                             `yaml:"LokiHelmValuesDocument"`
	PromtailHelmValues                    string                             `yaml:"PromtailHelmValues"`
	PromtailHelmValuesDocument            string                             `yaml:"PromtailHelmValuesDocument"`
	KubePrometheusStackHelmValues         string                             `yaml:"KubePrometheusStackHelmValues"`
	KubePrometheusStackHelmValuesDocument string                             `yaml:"KubePrometheusStackHelmValuesDocument"`
	ObservabilityConfigPath               string                             `yaml:"ObservabilityConfigPath"`
	ObservabilityStackDefinition          ObservabilityStackDefinitionValues `yaml:"ObservabilityStackDefinition"`
}

ObservabilityStackInstanceValues contains the attributes needed to manage an observability stack definition.

func (*ObservabilityStackInstanceValues) Create added in v0.5.0

func (o *ObservabilityStackInstanceValues) Create(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.ObservabilityStackInstance, error)

Create creates an observability stack instance.

func (*ObservabilityStackInstanceValues) Delete added in v0.5.0

func (o *ObservabilityStackInstanceValues) Delete(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.ObservabilityStackInstance, error)

Delete deletes an observability stack instance.

func (*ObservabilityStackInstanceValues) ValidateCreate added in v0.5.0

func (o *ObservabilityStackInstanceValues) ValidateCreate() error

ValidateCreate validates the observability stack instance values for creation

func (*ObservabilityStackInstanceValues) ValidateDelete added in v0.5.0

func (o *ObservabilityStackInstanceValues) ValidateDelete() error

ValidateDelete validates the observability stack instance values for deletion

type ObservabilityStackValues added in v0.5.0

type ObservabilityStackValues struct {
	Name                                  string                           `yaml:"Name"`
	KubernetesRuntimeInstance             *KubernetesRuntimeInstanceValues `yaml:"KubernetesRuntimeInstance"`
	MetricsEnabled                        bool                             `yaml:"MetricsEnabled"`
	LoggingEnabled                        bool                             `yaml:"LoggingEnabled"`
	GrafanaHelmValues                     string                           `yaml:"GrafanaHelmValues"`
	GrafanaHelmValuesDocument             string                           `yaml:"GrafanaHelmValuesDocument"`
	LokiHelmValues                        string                           `yaml:"LokiHelmValues"`
	LokiHelmValuesDocument                string                           `yaml:"LokiHelmValuesDocument"`
	PromtailHelmValues                    string                           `yaml:"PromtailHelmValues"`
	PromtailHelmValuesDocument            string                           `yaml:"PromtailHelmValuesDocument"`
	KubePrometheusStackHelmValues         string                           `yaml:"KubePrometheusStackHelmValues"`
	KubePrometheusStackHelmValuesDocument string                           `yaml:"KubePrometheusStackHelmValuesDocument"`
	ObservabilityConfigPath               string                           `yaml:"ObservabilityConfigPath"`
}

ObservabilityStackValues provides the configuration for an observability stack definition and instance.

func (*ObservabilityStackValues) Create added in v0.5.0

Create creates an observability stack definition and instance

func (*ObservabilityStackValues) Delete added in v0.5.0

Delete deletes an observability stack definition and instance

func (*ObservabilityStackValues) GetOperations added in v0.5.0

func (*ObservabilityStackValues) ValidateCreate added in v0.5.0

func (o *ObservabilityStackValues) ValidateCreate() error

ValidateCreate validates the observability stack values for creation

func (*ObservabilityStackValues) ValidateDelete added in v0.5.0

func (o *ObservabilityStackValues) ValidateDelete() error

ValidateDelete validates the observability stack values for deletion

type SecretConfig added in v0.5.0

type SecretConfig struct {
	Secret SecretValues `yaml:"Secret"`
}

SecretConfig contains the configuration for a Secret object

type SecretDefinitionConfig added in v0.5.0

type SecretDefinitionConfig struct {
	SecretDefinition SecretDefinitionValues `yaml:"SecretDefinition"`
}

SecretDefinitionConfig contains the configuration for a SecretDefinition object

type SecretDefinitionValues added in v0.5.0

type SecretDefinitionValues struct {
	Name             string            `yaml:"Name"`
	AwsAccountName   string            `yaml:"AwsAccountName"`
	Data             map[string]string `yaml:"Data"`
	SecretConfigPath string            `yaml:"SecretConfigPath"`
}

SecretDefinitionValues contains the values for a SecretDefinition object

func (*SecretDefinitionValues) Create added in v0.5.0

func (s *SecretDefinitionValues) Create(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.SecretDefinition, error)

Create creates a SecretDefinition object

func (*SecretDefinitionValues) Delete added in v0.5.0

func (s *SecretDefinitionValues) Delete(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.SecretDefinition, error)

Delete deletes a SecretDefinition object

func (*SecretDefinitionValues) ValidateCreate added in v0.5.0

func (s *SecretDefinitionValues) ValidateCreate() error

ValidateCreate validates the secret values before creating a secret

type SecretInstanceConfig added in v0.5.0

type SecretInstanceConfig struct {
	SecretInstance SecretInstanceValues `yaml:"SecretInstance"`
}

SecretInstanceConfig contains the configuration for a SecretInstance object

type SecretInstanceValues added in v0.5.0

type SecretInstanceValues struct {
	Name                      string                           `yaml:"Name"`
	SecretDefinition          *SecretDefinitionValues          `yaml:"SecretDefinition"`
	WorkloadInstance          *WorkloadInstanceValues          `yaml:"WorkloadInstance"`
	HelmWorkloadInstance      *HelmWorkloadInstanceValues      `yaml:"HelmWorkloadInstance"`
	KubernetesRuntimeInstance *KubernetesRuntimeInstanceValues `yaml:"KubernetesRuntimeInstance"`
	SecretConfigPath          string                           `yaml:"SecretConfigPath"`
}

SecretInstanceValues contains the values for a SecretInstance object

func (*SecretInstanceValues) Create added in v0.5.0

func (s *SecretInstanceValues) Create(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.SecretInstance, error)

Create creates a SecretInstance object

func (*SecretInstanceValues) Delete added in v0.5.0

func (s *SecretInstanceValues) Delete(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.SecretInstance, error)

Delete deletes a SecretInstance object

func (*SecretInstanceValues) ValidateCreate added in v0.5.0

func (s *SecretInstanceValues) ValidateCreate() error

ValidateCreate validates the secret values before creating a secret

type SecretValues added in v0.5.0

type SecretValues struct {
	Name                      string                           `yaml:"Name"`
	Data                      map[string]string                `yaml:"Data"`
	AwsAccountName            string                           `yaml:"AwsAccountName"`
	SecretConfigPath          string                           `yaml:"SecretConfigPath"`
	WorkloadInstance          *WorkloadInstanceValues          `yaml:"WorkloadInstance"`
	HelmWorkloadInstance      *HelmWorkloadInstanceValues      `yaml:"HelmWorkloadInstance"`
	KubernetesRuntimeInstance *KubernetesRuntimeInstanceValues `yaml:"KubernetesRuntimeInstance"`
}

SecretValues contains the values for a Secret object configuration

func (*SecretValues) Create added in v0.5.0

func (s *SecretValues) Create(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.SecretDefinition, *v0.SecretInstance, error)

Create creates a Secret object

func (*SecretValues) Delete added in v0.5.0

func (s *SecretValues) Delete(
	apiClient *http.Client,
	apiEndpoint string,
) (*v0.SecretDefinition, *v0.SecretInstance, error)

Delete deletes a Secret object

func (*SecretValues) GetOperations added in v0.5.0

func (s *SecretValues) GetOperations(
	apiClient *http.Client,
	apiEndpoint string,
) (*util.Operations, *v0.SecretDefinition, *v0.SecretInstance)

GetOperations returns the operations to create and delete a Secret object

func (*SecretValues) ValidateCreate added in v0.5.0

func (s *SecretValues) ValidateCreate() error

ValidateCreate validates the secret values before creating a secret

type TerraformConfig added in v0.5.0

type TerraformConfig struct {
	Terraform TerraformValues `yaml:"Terraform"`
}

TerraformConfig contains the config for a terraform which is an abstraction of a terraform definition and terraform instance.

type TerraformDefinitionConfig added in v0.5.0

type TerraformDefinitionConfig struct {
	TerraformDefinition TerraformDefinitionValues `yaml:"TerraformDefinition"`
}

TerraformDefinitionConfig contains the config for a terraform definition.

type TerraformDefinitionValues added in v0.5.0

type TerraformDefinitionValues struct {
	Name                string `yaml:"Name"`
	ConfigDir           string `yaml:"ConfigDir"`
	TerraformConfigPath string `yaml:"TerraformConfigPath"`
}

TerraformDefinitionValues contains the attributes needed to manage a terraform definition.

func (*TerraformDefinitionValues) Create added in v0.5.0

func (t *TerraformDefinitionValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.TerraformDefinition, error)

Create creates a terraform definition in the Threeport API.

func (*TerraformDefinitionValues) Delete added in v0.5.0

func (t *TerraformDefinitionValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.TerraformDefinition, error)

Delete deletes a terraform definition from the Threeport API.

func (*TerraformDefinitionValues) Describe added in v0.5.0

func (wd *TerraformDefinitionValues) Describe(
	apiClient *http.Client,
	apiEndpoint string,
) (*status.TerraformDefinitionStatusDetail, error)

Describe returns details related to a terraform definition.

func (*TerraformDefinitionValues) Validate added in v0.5.0

func (t *TerraformDefinitionValues) Validate() error

Validate validates inputs to create terraform definitions.

type TerraformInstanceConfig added in v0.5.0

type TerraformInstanceConfig struct {
	TerraformInstance TerraformInstanceValues `yaml:"TerraformInstance"`
}

TerraformInstanceConfig contains the config for a terraform instance.

type TerraformInstanceValues added in v0.5.0

type TerraformInstanceValues struct {
	Name                string                    `yaml:"Name"`
	AwsAccount          AwsAccountValues          `yaml:"AwsAccount"`
	VarsDocument        string                    `yaml:"VarsDocument"`
	TerraformDefinition TerraformDefinitionValues `yaml:"TerraformDefinition"`
	TerraformConfigPath string                    `yaml:"TerraformConfigPath"`
}

TerraformInstanceValues contains the attributes needed to manage a terraform instance.

func (*TerraformInstanceValues) Create added in v0.5.0

func (t *TerraformInstanceValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.TerraformInstance, error)

Create creates a terraform instance in the Threeport API.

func (*TerraformInstanceValues) Delete added in v0.5.0

func (t *TerraformInstanceValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.TerraformInstance, error)

Delete deletes a terraform instance from the Threeport API.

func (*TerraformInstanceValues) Describe added in v0.5.0

func (k *TerraformInstanceValues) Describe(
	apiClient *http.Client,
	apiEndpoint string,
) (*status.TerraformInstanceStatusDetail, error)

Describe returns details related to a terraform instance.

func (*TerraformInstanceValues) Validate added in v0.5.0

func (t *TerraformInstanceValues) Validate() error

Validate validates inputs to create terraform instances.

type TerraformValues added in v0.5.0

type TerraformValues struct {
	Name                string           `yaml:"Name"`
	ConfigDir           string           `yaml:"ConfigDir"`
	AwsAccount          AwsAccountValues `yaml:"AwsAccount"`
	VarsDocument        string           `yaml:"VarsDocument"`
	TerraformConfigPath string           `yaml:"TerraformConfigPath"`
}

TerraformValues contains the attributes needed to manage a terraform definition and terraform instance.

func (*TerraformValues) Create added in v0.5.0

func (t *TerraformValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.TerraformDefinition, *v0.TerraformInstance, error)

Create creates a terraform definition and instance in the Threeport API.

func (*TerraformValues) Delete added in v0.5.0

func (t *TerraformValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.TerraformDefinition, *v0.TerraformInstance, error)

Delete deletes a terraform definition, terraform instance, domain name definition, domain name instance, gateway definition, and gateway instance from the Threeport API.

func (*TerraformValues) GetOperations added in v0.5.0

func (t *TerraformValues) GetOperations(apiClient *http.Client, apiEndpoint string) (*util.Operations, *v0.TerraformDefinition, *v0.TerraformInstance)

GetOperations returns a slice of operations used to create, update, or delete a terraform.

type ThreeportConfig

type ThreeportConfig struct {
	// All the threeport instances a user has available to use.
	ControlPlanes []ControlPlane `yaml:"ControlPlanes"`

	// The name of the control plane currently in use.
	CurrentControlPlane string `yaml:"CurrentControlPlane"`
}

ThreeportConfig is the client's configuration for connecting to Threeport instances

func GetThreeportConfig

func GetThreeportConfig(requestedControlPlane string) (*ThreeportConfig, string, error)

GetThreeportConfig retrieves the threeport config and name of the requested control plane.

func (*ThreeportConfig) CheckThreeportConfigEmpty

func (cfg *ThreeportConfig) CheckThreeportConfigEmpty() bool

CheckThreeportControlPlaneExists checks if a Threeport control plane within a config already contains control plane information

func (*ThreeportConfig) CheckThreeportControlPlaneExists

func (cfg *ThreeportConfig) CheckThreeportControlPlaneExists(createThreeportControlPlaneName string) bool

CheckThreeportControlPlaneExists checks if a Threeport control plane within a config exists.

func (*ThreeportConfig) CheckThreeportGenesisControlPlane

func (cfg *ThreeportConfig) CheckThreeportGenesisControlPlane(requestedControlPlane string) (bool, error)

CheckThreeportGenesisControlPlane returns a boolean that indicates whether current control plane is the genesis control plane.

func (*ThreeportConfig) GetAllControlPlaneNames

func (cfg *ThreeportConfig) GetAllControlPlaneNames() []string

GetAllControlPlaneNames returns all control plane names in a threeport config.

func (*ThreeportConfig) GetAwsConfigs

func (cfg *ThreeportConfig) GetAwsConfigs(requestedControlPlane string) (*aws.Config, *aws.Config, string, error)

GetAwsConfigs returns AWS configs for the user and resource manager.

func (*ThreeportConfig) GetControlPlaneConfig

func (cfg *ThreeportConfig) GetControlPlaneConfig(name string) (*ControlPlane, error)

GetControlPlaneConfig returns the requested control plane config.

func (*ThreeportConfig) GetControlPlaneInstance

func (cfg *ThreeportConfig) GetControlPlaneInstance(requestedControlPlane string) (*v0.ControlPlaneInstance, error)

GetControlPlaneInstance returns the current control plane instance.

func (*ThreeportConfig) GetEncryptionKey

func (cfg *ThreeportConfig) GetEncryptionKey(requestedControlPlane string) (string, error)

GetEncryptionKey returns the encryption key from the threeport config.

func (*ThreeportConfig) GetHTTPClient

func (cfg *ThreeportConfig) GetHTTPClient(requestedControlPlane string) (*http.Client, error)

GetThreeportHTTPClient returns an HTTP client for a named threeport instance.

func (*ThreeportConfig) GetThreeportAPIEndpoint

func (cfg *ThreeportConfig) GetThreeportAPIEndpoint(requestedControlPlane string) (string, error)

GetThreeportAPIEndpoint returns the threeport API endpoint from threeport config.

func (*ThreeportConfig) GetThreeportAuthEnabled

func (cfg *ThreeportConfig) GetThreeportAuthEnabled(requestedControlPlane string) (bool, error)

GetThreeportAuthEnabled returns a boolean that indicates whether current control plane has auth enabled.

func (*ThreeportConfig) GetThreeportCertificatesForControlPlane

func (cfg *ThreeportConfig) GetThreeportCertificatesForControlPlane(requestedControlPlane string) (string, string, string, error)

GetThreeportCertificatesForControlPlane returns the CA certificate, client certificate, and client private key for a named threeport control plane.

func (*ThreeportConfig) GetThreeportEncryptionKey added in v0.5.0

func (cfg *ThreeportConfig) GetThreeportEncryptionKey(requestedControlPlane string) (string, error)

GetThreeportEncryptionKey returns the encryption key that is used encrypt sensitive values in the Threeport database.

func (*ThreeportConfig) GetThreeportInfraProvider

func (cfg *ThreeportConfig) GetThreeportInfraProvider(requestedControlPlane string) (string, error)

GetThreeportInfraProvider returns the infra provider from the threeport config.

func (*ThreeportConfig) SetCurrentControlPlane

func (cfg *ThreeportConfig) SetCurrentControlPlane(controlPlaneName string)

SetCurrentControlPlane updates the threeport config to set CurrentControlPlane as the provided control plane name.

func (*ThreeportConfig) SetCurrentInstance

func (cfg *ThreeportConfig) SetCurrentInstance(instanceName string)

SetCurrentInstance updates the threeport config to set CurrentInstance as the provided instance name.

type WorkloadConfig

type WorkloadConfig struct {
	Workload WorkloadValues `yaml:"Workload"`
}

WorkloadConfig contains the config for a workload which is an abstraction of a workload definition and workload instance.

type WorkloadDefinitionConfig

type WorkloadDefinitionConfig struct {
	WorkloadDefinition WorkloadDefinitionValues `yaml:"WorkloadDefinition"`
}

WorkloadDefinitionConfig contains the config for a workload definition.

type WorkloadDefinitionValues

type WorkloadDefinitionValues struct {
	Name               string `yaml:"Name"`
	YAMLDocument       string `yaml:"YAMLDocument"`
	WorkloadConfigPath string `yaml:"WorkloadConfigPath"`
}

WorkloadDefinitionValues contains the attributes needed to manage a workload definition.

func (*WorkloadDefinitionValues) Create

func (wd *WorkloadDefinitionValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.WorkloadDefinition, error)

Create creates a workload definition in the Threeport API.

func (*WorkloadDefinitionValues) Delete

func (wd *WorkloadDefinitionValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.WorkloadDefinition, error)

Delete deletes a workload definition from the Threeport API.

func (*WorkloadDefinitionValues) Describe added in v0.5.0

func (wd *WorkloadDefinitionValues) Describe(apiClient *http.Client, apiEndpoint string) (*status.WorkloadDefinitionStatusDetail, error)

Describe returns details related to a workload definition.

type WorkloadInstanceConfig

type WorkloadInstanceConfig struct {
	WorkloadInstance WorkloadInstanceValues `yaml:"WorkloadInstance"`
}

WorkloadInstanceConfig contains the config for a workload instance.

type WorkloadInstanceValues

type WorkloadInstanceValues struct {
	Name                      string                           `yaml:"Name"`
	KubernetesRuntimeInstance *KubernetesRuntimeInstanceValues `yaml:"KubernetesRuntimeInstance"`
	WorkloadDefinition        WorkloadDefinitionValues         `yaml:"WorkloadDefinition"`
}

WorkloadInstanceValues contains the attributes needed to manage a workload instance.

func (*WorkloadInstanceValues) Create

func (wi *WorkloadInstanceValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.WorkloadInstance, error)

Create creates a workload instance in the Threeport API.

func (*WorkloadInstanceValues) Delete

func (wi *WorkloadInstanceValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.WorkloadInstance, error)

Delete deletes a workload instance from the Threeport API.

func (*WorkloadInstanceValues) Describe

func (wi *WorkloadInstanceValues) Describe(apiClient *http.Client, apiEndpoint string) (*status.WorkloadInstanceStatusDetail, error)

Describe returns important failure events related to a workload instance.

type WorkloadValues

type WorkloadValues struct {
	Name                      string                           `yaml:"Name"`
	YAMLDocument              string                           `yaml:"YAMLDocument"`
	WorkloadConfigPath        string                           `yaml:"WorkloadConfigPath"`
	KubernetesRuntimeInstance *KubernetesRuntimeInstanceValues `yaml:"KubernetesRuntimeInstance"`
	DomainName                *DomainNameDefinitionValues      `yaml:"DomainName"`
	Gateway                   *GatewayDefinitionValues         `yaml:"Gateway"`
	AwsRelationalDatabase     *AwsRelationalDatabaseValues     `yaml:"AwsRelationalDatabase"`
	AwsObjectStorageBucket    *AwsObjectStorageBucketValues    `yaml:"AwsObjectStorageBucket"`
	Secret                    *SecretValues                    `yaml:"Secret"`
}

WorkloadValues contains the attributes needed to manage a workload definition and workload instance.

func (*WorkloadValues) Create

func (w *WorkloadValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.WorkloadDefinition, *v0.WorkloadInstance, error)

Create creates a workload definition and instance in the Threeport API.

func (*WorkloadValues) Delete

func (w *WorkloadValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.WorkloadDefinition, *v0.WorkloadInstance, error)

Delete deletes a workload definition, workload instance, domain name definition, domain name instance, gateway definition, and gateway instance from the Threeport API.

func (*WorkloadValues) GetOperations

func (w *WorkloadValues) GetOperations(apiClient *http.Client, apiEndpoint string) (*util.Operations, *v0.WorkloadDefinition, *v0.WorkloadInstance)

GetOperations returns a slice of operations used to create or delete a workload.

Jump to

Keyboard shortcuts

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