Documentation ¶
Index ¶
- Constants
- func DefaultProviderConfigDir() (string, error)
- func DefaultThreeportConfigPath(homedir string) string
- func DeleteThreeportConfigControlPlane(threeportConfig *ThreeportConfig, deleteThreeportControlPlaneName string)
- func UpdateThreeportConfig(threeportConfig *ThreeportConfig, threeportControlPlaneConfig *ControlPlane)
- type AwsAccountConfig
- type AwsAccountValues
- type AwsEksKubernetesRuntimeDefinitionConfig
- type AwsEksKubernetesRuntimeDefinitionValues
- func (aekrd *AwsEksKubernetesRuntimeDefinitionValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.AwsEksKubernetesRuntimeDefinition, error)
- func (aekrd *AwsEksKubernetesRuntimeDefinitionValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.AwsEksKubernetesRuntimeDefinition, error)
- type AwsEksKubernetesRuntimeInstanceConfig
- type AwsEksKubernetesRuntimeInstanceValues
- type AwsObjectStorageBucketConfig
- type AwsObjectStorageBucketDefinitionConfig
- type AwsObjectStorageBucketDefinitionValues
- type AwsObjectStorageBucketInstanceConfig
- type AwsObjectStorageBucketInstanceValues
- type AwsObjectStorageBucketValues
- func (o *AwsObjectStorageBucketValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.AwsObjectStorageBucketDefinition, *v0.AwsObjectStorageBucketInstance, ...)
- func (o *AwsObjectStorageBucketValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.AwsObjectStorageBucketDefinition, *v0.AwsObjectStorageBucketInstance, ...)
- type AwsRelationalDatabaseConfig
- type AwsRelationalDatabaseDefinitionConfig
- type AwsRelationalDatabaseDefinitionValues
- type AwsRelationalDatabaseInstanceConfig
- type AwsRelationalDatabaseInstanceValues
- type AwsRelationalDatabaseValues
- func (r *AwsRelationalDatabaseValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.AwsRelationalDatabaseDefinition, *v0.AwsRelationalDatabaseInstance, error)
- func (r *AwsRelationalDatabaseValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.AwsRelationalDatabaseDefinition, *v0.AwsRelationalDatabaseInstance, error)
- type ControlPlane
- type ControlPlaneConfig
- type ControlPlaneDefinitionConfig
- type ControlPlaneDefinitionValues
- type ControlPlaneInstanceConfig
- type ControlPlaneInstanceValues
- type ControlPlaneValues
- type Credential
- type DomainNameDefinitionConfig
- type DomainNameDefinitionValues
- func (d *DomainNameDefinitionValues) CreateIfNotExist(apiClient *http.Client, apiEndpoint string) (*v0.DomainNameDefinition, error)
- func (d *DomainNameDefinitionValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.DomainNameDefinition, error)
- func (d *DomainNameDefinitionValues) Validate() error
- type DomainNameInstanceConfig
- type DomainNameInstanceValues
- type EKSProviderConfig
- type GatewayDefinitionConfig
- type GatewayDefinitionValues
- type GatewayInstanceConfig
- type GatewayInstanceValues
- type KubeAPI
- type KubernetesRuntimeConfig
- type KubernetesRuntimeDefinitionConfig
- type KubernetesRuntimeDefinitionValues
- type KubernetesRuntimeInstanceConfig
- type KubernetesRuntimeInstanceValues
- type KubernetesRuntimeValues
- func (kr *KubernetesRuntimeValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.KubernetesRuntimeDefinition, *v0.KubernetesRuntimeInstance, error)
- func (kr *KubernetesRuntimeValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.KubernetesRuntimeDefinition, *v0.KubernetesRuntimeInstance, error)
- type ThreeportConfig
- func (cfg *ThreeportConfig) CheckThreeportConfigEmpty() bool
- func (cfg *ThreeportConfig) CheckThreeportControlPlaneExists(createThreeportControlPlaneName string) bool
- func (cfg *ThreeportConfig) CheckThreeportGenesisControlPlane(requestedControlPlane string) (bool, error)
- func (cfg *ThreeportConfig) GetAllControlPlaneNames() []string
- func (cfg *ThreeportConfig) GetAwsConfigs(requestedControlPlane string) (*aws.Config, *aws.Config, string, error)
- func (cfg *ThreeportConfig) GetControlPlaneConfig(name string) (*ControlPlane, error)
- func (cfg *ThreeportConfig) GetControlPlaneInstance(requestedControlPlane string) (*v0.ControlPlaneInstance, error)
- func (cfg *ThreeportConfig) GetEncryptionKey(requestedControlPlane string) (string, error)
- func (cfg *ThreeportConfig) GetHTTPClient(requestedControlPlane string) (*http.Client, error)
- func (cfg *ThreeportConfig) GetThreeportAPIEndpoint(requestedControlPlane string) (string, error)
- func (cfg *ThreeportConfig) GetThreeportAuthEnabled(requestedControlPlane string) (bool, error)
- func (cfg *ThreeportConfig) GetThreeportCertificatesForControlPlane(requestedControlPlane string) (string, string, string, error)
- func (cfg *ThreeportConfig) GetThreeportInfraProvider(requestedControlPlane string) (string, error)
- func (cfg *ThreeportConfig) SetCurrentControlPlane(controlPlaneName string)
- func (cfg *ThreeportConfig) SetCurrentInstance(instanceName string)
- type WorkloadConfig
- type WorkloadDefinitionConfig
- type WorkloadDefinitionValues
- type WorkloadInstanceConfig
- type WorkloadInstanceValues
- func (wi *WorkloadInstanceValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.WorkloadInstance, error)
- func (wi *WorkloadInstanceValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.WorkloadInstance, error)
- func (wi *WorkloadInstanceValues) Describe(apiClient *http.Client, apiEndpoint string) (*status.WorkloadInstanceStatusDetail, error)
- type WorkloadValues
- func (w *WorkloadValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.WorkloadDefinition, *v0.WorkloadInstance, error)
- func (w *WorkloadValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.WorkloadDefinition, *v0.WorkloadInstance, error)
- func (w *WorkloadValues) GetOperations(apiClient *http.Client, apiEndpoint string) (*util.Operations, *v0.WorkloadDefinition, *v0.WorkloadInstance)
Constants ¶
const ( ThreeportConfigName = "config" ThreeportConfigType = "yaml" )
Variables ¶
This section is empty.
Functions ¶
func DefaultProviderConfigDir ¶
DefaultProviderConfigDir returns the default path to the directory for storing infra provider inventory and config if not set which is ~/.config/threeport.
func DefaultThreeportConfigPath ¶
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 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 (aa *AwsAccountValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.AwsAccount, error)
Create creates an AWS account in the Threeport API.
func (*AwsAccountValues) Delete ¶
func (aa *AwsAccountValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.AwsAccount, error)
Delete deletes a AWS account from the Threeport API.
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 ¶
func (aekrd *AwsEksKubernetesRuntimeDefinitionValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.AwsEksKubernetesRuntimeDefinition, error)
Create creates an AWS EKS kubernetes runtime definition in the threeport API.
func (*AwsEksKubernetesRuntimeDefinitionValues) Delete ¶
func (aekrd *AwsEksKubernetesRuntimeDefinitionValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.AwsEksKubernetesRuntimeDefinition, error)
Delete deletes an AWS EKS kubernetes definition from the Threeport API.
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"` Location string `yaml:"Location"` AwsEksKubernetesRuntimeDefinitionName string `yaml:"AwsEksKubernetesRuntimeDefinitionName"` }
AwsEksKubernetesRuntimeInstanceValues contains the attributes needed to manage an AWS EKS kubernetes runtime instance.
func (*AwsEksKubernetesRuntimeInstanceValues) Create ¶
func (aekri *AwsEksKubernetesRuntimeInstanceValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.AwsEksKubernetesRuntimeInstance, error)
Create creates an AWS EKS kubernetes runtime instance in the threeport API.
func (*AwsEksKubernetesRuntimeInstanceValues) Delete ¶
func (aekri *AwsEksKubernetesRuntimeInstanceValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.AwsEksKubernetesRuntimeInstance, error)
Delete deletes an AWS EKS kubernetes runtime instance from the Threeport API.
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 ¶
func (o *AwsObjectStorageBucketDefinitionValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.AwsObjectStorageBucketDefinition, error)
Create creates an AWS object storage bucket definition in the threeport API.
func (*AwsObjectStorageBucketDefinitionValues) Delete ¶
func (o *AwsObjectStorageBucketDefinitionValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.AwsObjectStorageBucketDefinition, error)
Delete deletes an AWS object storage bucket definition from the threeport API.
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 ¶
func (o *AwsObjectStorageBucketInstanceValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.AwsObjectStorageBucketInstance, error)
Create creates and AWS object storage bucket instance in the threeport API.
func (*AwsObjectStorageBucketInstanceValues) Delete ¶
func (o *AwsObjectStorageBucketInstanceValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.AwsObjectStorageBucketInstance, error)
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 ¶
func (o *AwsObjectStorageBucketValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.AwsObjectStorageBucketDefinition, *v0.AwsObjectStorageBucketInstance, error)
Create creates an AWS object storage bucket definition and instance in the threeport API.
func (*AwsObjectStorageBucketValues) Delete ¶
func (o *AwsObjectStorageBucketValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.AwsObjectStorageBucketDefinition, *v0.AwsObjectStorageBucketInstance, error)
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 ¶
func (r *AwsRelationalDatabaseDefinitionValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.AwsRelationalDatabaseDefinition, error)
Create creates an AWS relational database definition in the threeport API.
func (*AwsRelationalDatabaseDefinitionValues) Delete ¶
func (r *AwsRelationalDatabaseDefinitionValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.AwsRelationalDatabaseDefinition, error)
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 ¶
func (r *AwsRelationalDatabaseInstanceValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.AwsRelationalDatabaseInstance, error)
Create creates an AWS relational database instance in the threeport API.
func (*AwsRelationalDatabaseInstanceValues) Delete ¶
func (r *AwsRelationalDatabaseInstanceValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.AwsRelationalDatabaseInstance, error)
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 ¶
func (r *AwsRelationalDatabaseValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.AwsRelationalDatabaseDefinition, *v0.AwsRelationalDatabaseInstance, error)
Create creates an AWS relational database definition and instance in the threeport API.
func (*AwsRelationalDatabaseValues) Delete ¶
func (r *AwsRelationalDatabaseValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.AwsRelationalDatabaseDefinition, *v0.AwsRelationalDatabaseInstance, error)
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 DomainNameDefinitionConfig ¶
type DomainNameDefinitionConfig struct {
DomainNameDefinition DomainNameDefinitionValues `yaml:"DomainNameDefinition"`
}
DomainNameDefinitionConfig contains the config for a domain name definition.
type DomainNameDefinitionValues ¶
type DomainNameDefinitionValues struct { 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) CreateIfNotExist ¶
func (d *DomainNameDefinitionValues) CreateIfNotExist(apiClient *http.Client, apiEndpoint string) (*v0.DomainNameDefinition, error)
CreateIfNotExist 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) 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 { 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) Validate ¶ added in v0.3.2
func (d *DomainNameInstanceValues) Validate() error
Validate validates the domain name instance values.
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 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"` TCPPort int `yaml:"TCPPort"` TLSEnabled bool `yaml:"TLSEnabled"` Path string `yaml:"Path"` 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) Validate ¶
func (g *GatewayDefinitionValues) Validate() error
Validate validates the gateway definition values.
type GatewayInstanceConfig ¶
type GatewayInstanceConfig struct {
GatewayInstance GatewayInstanceValues `yaml:"GatewayInstance"`
}
GatewayInstanceConfig contains the config for a gateway instance.
type GatewayInstanceValues ¶
type GatewayInstanceValues struct { 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) Validate ¶
func (g *GatewayInstanceValues) Validate() error
Validate validates the gateway definition values.
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.
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.
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 ¶
func (kr *KubernetesRuntimeValues) Create(apiClient *http.Client, apiEndpoint string) (*v0.KubernetesRuntimeDefinition, *v0.KubernetesRuntimeInstance, error)
Create creates a kubernetes runtime definition and instance in the Threeport API.
func (*KubernetesRuntimeValues) Delete ¶
func (kr *KubernetesRuntimeValues) Delete(apiClient *http.Client, apiEndpoint string) (*v0.KubernetesRuntimeDefinition, *v0.KubernetesRuntimeInstance, error)
Delete deletes a kubernetes runtime definition and instance from the Threeport API.
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) 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.
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"` }
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, update, or delete a workload.