Documentation
¶
Index ¶
- Variables
- func DisplayWorkflowResourceDataWithSpinners(ctx context.Context, token, instanceID, actionType string, ...) error
- func FetchEndpointsForInstance(ctx context.Context, token, serviceID, environmentID, instanceID string) (map[string]ResourceEndpoints, error)
- func PrintEndpointsForInstance(ctx context.Context, token, serviceID, environmentID, instanceID string) error
- func PrintResourceEndpoints(resourceEndpoints map[string]ResourceEndpoints)
- type AdoptionConfig
- type BreakpointListItem
- type DebugData
- type DeploymentParametersOutput
- type DeploymentType
- type EndpointTableRow
- type FileInfo
- type HelmAdoptionConfig
- type HelmData
- type HelmLogsOutput
- type HelmLogsResource
- type HelmRuntimeConfig
- type HelmValuesOutput
- type HelmValuesResource
- type InstanceDeploymentStatus
- type InstanceStatusType
- type ParameterInfo
- type PlanDAG
- type PlanDAGEdge
- type PlanDAGNode
- type ProgressReader
- type ResourceAdoptionConfig
- type ResourceDebugInfo
- type ResourceDeploymentStatus
- type ResourceEndpoints
- type ResourceProgress
- type ResourceWorkflowSteps
- type SnapshotDetail
- type TerraformData
- type TerraformFileEntry
- type TerraformFileTree
- type TerraformFilesOutput
- type TerraformFilesResource
- type TerraformHistoryEntry
- type TerraformOutputsOutput
- type TerraformOutputsResource
- type TerraformProgressData
- type TerraformResourceDetail
- type TerraformResponse
- type TerraformStateData
- type WorkflowStepInfo
Constants ¶
This section is empty.
Variables ¶
var ( InstanceStatus InstanceStatusType InstanceTierVersion string )
var Cmd = &cobra.Command{ Use: "instance [operation] [flags]", Short: "Manage Instance Deployments for your service", Long: `This command helps you manage the deployment of your service instances.`, Run: run, SilenceUsage: true, }
var InstanceID string
var SubscriptionID string
Functions ¶
func DisplayWorkflowResourceDataWithSpinners ¶ added in v1.0.31
func DisplayWorkflowResourceDataWithSpinners(ctx context.Context, token, instanceID, actionType string, targetRegion ...string) error
DisplayWorkflowResourceDataWithSpinners renders deployment workflow progress for each resource.
func FetchEndpointsForInstance ¶ added in v1.6.8
func FetchEndpointsForInstance(ctx context.Context, token, serviceID, environmentID, instanceID string) (map[string]ResourceEndpoints, error)
FetchEndpointsForInstance fetches endpoint information for a known instance.
func PrintEndpointsForInstance ¶ added in v1.6.8
func PrintEndpointsForInstance(ctx context.Context, token, serviceID, environmentID, instanceID string) error
PrintEndpointsForInstance prints endpoint information grouped by resource.
func PrintResourceEndpoints ¶ added in v1.6.8
func PrintResourceEndpoints(resourceEndpoints map[string]ResourceEndpoints)
PrintResourceEndpoints renders endpoint information grouped by resource.
Types ¶
type AdoptionConfig ¶ added in v0.13.37
type AdoptionConfig struct {
ResourceAdoptionConfiguration map[string]ResourceAdoptionConfig `yaml:"resourceAdoptionConfiguration"`
}
AdoptionConfig represents the YAML configuration structure for resource adoption
type BreakpointListItem ¶ added in v1.2.12
type DebugData ¶ added in v0.14.3
type DebugData struct {
InstanceID string `json:"instanceId"`
PlanDAG *PlanDAG `json:"planDag,omitempty"`
ServiceID string `json:"serviceId,omitempty"`
EnvironmentID string `json:"environmentId,omitempty"`
Token string `json:"-"`
ResourceDebugInfo map[string]*ResourceDebugInfo `json:"resourceDebugInfo,omitempty"`
}
type DeploymentParametersOutput ¶ added in v0.14.57
type DeploymentParametersOutput struct {
ServiceName string `json:"serviceName"`
PlanName string `json:"planName"`
Version string `json:"version"`
ResourceName string `json:"resourceName"`
Parameters []ParameterInfo `json:"parameters"`
}
type DeploymentType ¶
type DeploymentType string
const (
TerraformDeploymentType DeploymentType = "terraform"
)
type EndpointTableRow ¶ added in v0.14.12
type EndpointTableRow struct {
ResourceName string `json:"resource_name"`
EndpointType string `json:"endpoint_type"`
EndpointName string `json:"endpoint_name"`
URL string `json:"url"`
Status string `json:"status,omitempty"`
NetworkType string `json:"network_type,omitempty"`
Ports string `json:"ports,omitempty"`
}
EndpointTableRow represents a single row in the table output
type HelmAdoptionConfig ¶ added in v0.13.37
type HelmAdoptionConfig struct {
ChartRepoURL string `yaml:"chartRepoURL"`
BasicAuthCredential *string `yaml:"password,omitempty"`
ReleaseName string `yaml:"releaseName"`
ReleaseNamespace string `yaml:"releaseNamespace"`
RuntimeConfiguration *HelmRuntimeConfig `yaml:"runtimeConfiguration,omitempty"`
Username *string `yaml:"username,omitempty"`
}
HelmAdoptionConfig represents the Helm adoption configuration
type HelmData ¶ added in v0.14.3
type HelmData struct {
ChartRepoName string `json:"chartRepoName"`
ChartRepoURL string `json:"chartRepoURL"`
ChartVersion string `json:"chartVersion"`
ChartValues map[string]interface{} `json:"chartValues"`
InstallLog string `json:"installLog"`
Namespace string `json:"namespace"`
ReleaseName string `json:"releaseName"`
}
type HelmLogsOutput ¶ added in v1.0.28
type HelmLogsOutput struct {
InstanceID string `json:"instanceId"`
Resources []HelmLogsResource `json:"resources"`
}
type HelmLogsResource ¶ added in v1.0.28
type HelmRuntimeConfig ¶ added in v0.13.37
type HelmRuntimeConfig struct {
DisableHooks bool `yaml:"disableHooks"`
Recreate bool `yaml:"recreate"`
ResetThenReuseValues bool `yaml:"resetThenReuseValues"`
ResetValues bool `yaml:"resetValues"`
ReuseValues bool `yaml:"reuseValues"`
SkipCRDs bool `yaml:"skipCRDs"`
TimeoutNanos int64 `yaml:"timeoutNanos"`
UpgradeCRDs bool `yaml:"upgradeCRDs"`
Wait bool `yaml:"wait"`
WaitForJobs bool `yaml:"waitForJobs"`
}
HelmRuntimeConfig represents the Helm runtime configuration
type HelmValuesOutput ¶ added in v1.0.28
type HelmValuesOutput struct {
InstanceID string `json:"instanceId"`
Resources []HelmValuesResource `json:"resources"`
}
type HelmValuesResource ¶ added in v1.0.28
type HelmValuesResource struct {
ResourceID string `json:"resourceId"`
ResourceKey string `json:"resourceKey"`
ChartRepoName string `json:"chartRepoName,omitempty"`
ChartRepoURL string `json:"chartRepoURL,omitempty"`
ChartVersion string `json:"chartVersion,omitempty"`
ChartValues map[string]interface{} `json:"chartValues"`
Namespace string `json:"namespace,omitempty"`
ReleaseName string `json:"releaseName,omitempty"`
}
type InstanceDeploymentStatus ¶ added in v0.14.61
type InstanceDeploymentStatus struct {
InstanceID string `json:"instanceId"`
ServiceID string `json:"serviceId"`
EnvironmentID string `json:"environmentId"`
Status string `json:"status"`
ProductTierID string `json:"productTierId"`
TierVersion string `json:"tierVersion"`
CreationTime string `json:"creationTime,omitempty"`
LastModifiedTime string `json:"lastModifiedTime,omitempty"`
ResourceDeploymentStatus []ResourceDeploymentStatus `json:"resourceDeploymentStatus"`
AppliedFilters map[string]interface{} `json:"appliedFilters,omitempty"`
FilteringStats map[string]interface{} `json:"filteringStats,omitempty"`
}
InstanceDeploymentStatus represents a compact view of instance deployment status
type InstanceStatusType ¶
type InstanceStatusType string
const ( InstanceStatusRunning InstanceStatusType = "RUNNING" InstanceStatusStopped InstanceStatusType = "STOPPED" InstanceStatusFailed InstanceStatusType = "FAILED" InstanceStatusCancelled InstanceStatusType = "CANCELLED" InstanceStatusUnknown InstanceStatusType = "UNKNOWN" )
type ParameterInfo ¶ added in v0.14.57
type ParameterInfo struct {
Key string `json:"key"`
DisplayName string `json:"displayName"`
Description string `json:"description"`
Type string `json:"type"`
Required bool `json:"required"`
Modifiable bool `json:"modifiable"`
IsList bool `json:"isList"`
DefaultValue *string `json:"defaultValue,omitempty"`
Options []string `json:"options,omitempty"`
Regex *string `json:"regex,omitempty"`
Custom bool `json:"custom"`
API string `json:"api"`
}
type PlanDAG ¶ added in v1.1.1
type PlanDAG struct {
Nodes map[string]PlanDAGNode `json:"nodes"`
Edges []PlanDAGEdge `json:"edges"`
Levels [][]string `json:"levels"`
Errors []string `json:"errors,omitempty"`
HasCycle bool `json:"hasCycle"`
WorkflowID string `json:"workflowId,omitempty"`
ProgressByID map[string]ResourceProgress `json:"progressById,omitempty"`
ProgressByKey map[string]ResourceProgress `json:"progressByKey,omitempty"`
ProgressByName map[string]ResourceProgress `json:"progressByName,omitempty"`
BreakpointByID map[string]string `json:"breakpointById,omitempty"`
BreakpointByKey map[string]string `json:"breakpointByKey,omitempty"`
BreakpointByName map[string]string `json:"breakpointByName,omitempty"`
ProgressLoading bool `json:"-"`
SpinnerTick int `json:"-"`
// Per-resource workflow step summaries keyed by resource key
WorkflowStepsByKey map[string]*ResourceWorkflowSteps `json:"workflowStepsByKey,omitempty"`
}
type PlanDAGEdge ¶ added in v1.1.1
type PlanDAGNode ¶ added in v1.1.1
type ProgressReader ¶ added in v1.0.15
type ProgressReader struct {
io.Reader
Total int64
Downloaded int64
Spinner *utils.Spinner
LastUpdate time.Time
}
Progress reader wrapper to track download progress
type ResourceAdoptionConfig ¶ added in v0.13.37
type ResourceAdoptionConfig struct {
HelmAdoptionConfiguration *HelmAdoptionConfig `yaml:"helmAdoptionConfiguration,omitempty"`
}
ResourceAdoptionConfig represents the configuration for adopting a single resource
type ResourceDebugInfo ¶ added in v1.2.19
type ResourceDebugInfo struct {
ResourceID string `json:"resourceId"`
ResourceKey string `json:"resourceKey"`
ResourceType string `json:"resourceType"`
// Helm-specific data (populated for helm resources)
Helm *HelmData `json:"helm,omitempty"`
// Terraform-specific data (populated for terraform resources)
TerraformProgress *TerraformProgressData `json:"terraformProgress,omitempty"`
TerraformHistory []TerraformHistoryEntry `json:"terraformHistory,omitempty"`
TerraformFiles map[string]string `json:"terraformFiles,omitempty"`
TerraformLogs map[string]string `json:"terraformLogs,omitempty"`
TerraformPlanPreview map[string]string `json:"terraformPlanPreview,omitempty"`
TerraformPlanPreviewError map[string]string `json:"terraformPlanPreviewError,omitempty"`
}
ResourceDebugInfo holds all debug information for a specific resource in the plan DAG.
type ResourceDeploymentStatus ¶ added in v0.14.61
type ResourceDeploymentStatus struct {
ResourceID string `json:"resourceId,omitempty"`
ResourceName string `json:"resourceName,omitempty"`
Version string `json:"version,omitempty"`
LatestVersion string `json:"latestVersion,omitempty"`
PodStatus map[string]string `json:"podStatus,omitempty"`
DeploymentErrors string `json:"deploymentErrors,omitempty"`
DeploymentType string `json:"deploymentType,omitempty"`
AdditionalInfo map[string]interface{} `json:"additionalInfo,omitempty"`
}
ResourceDeploymentStatus represents compact deployment status for a single resource
type ResourceEndpoints ¶ added in v0.14.12
type ResourceEndpoints struct {
ClusterEndpoint string `json:"cluster_endpoint"`
ClusterPorts []int64 `json:"cluster_ports,omitempty"`
AdditionalEndpoints map[string]openapiclientfleet.ClusterEndpoint `json:"additional_endpoints"`
}
ResourceEndpoints represents the endpoints for a resource
type ResourceProgress ¶ added in v1.1.1
type ResourceWorkflowSteps ¶ added in v1.2.4
type ResourceWorkflowSteps struct {
Steps []WorkflowStepInfo `json:"steps"`
}
ResourceWorkflowSteps holds the ordered list of workflow steps for a resource.
type SnapshotDetail ¶ added in v1.0.30
type SnapshotDetail struct {
SnapshotID string `json:"snapshotId"`
Status string `json:"status"`
Region string `json:"region"`
SnapshotType string `json:"snapshotType"`
Progress string `json:"progress"`
CreatedAt string `json:"createdAt"`
CompletedAt string `json:"completedAt"`
SourceInstanceID string `json:"sourceInstanceId"`
ProductTierID string `json:"productTierId"`
ProductTierVer string `json:"productTierVersion"`
Encrypted bool `json:"encrypted"`
}
type TerraformData ¶ added in v0.14.3
type TerraformFileEntry ¶ added in v1.1.1
type TerraformFileEntry struct {
Path string
RelPath string
Name string
IsDir bool
Depth int
Expanded bool
Children []*TerraformFileEntry
}
TerraformFileEntry represents a file or directory in the terraform executor pod
type TerraformFileTree ¶ added in v1.1.1
type TerraformFileTree struct {
PodName string
Namespace string
BasePath string
Root *TerraformFileEntry
Flat []*TerraformFileEntry // flattened visible entries for rendering
// contains filtered or unexported fields
}
TerraformFileTree holds the fetched file tree and metadata for the executor pod
type TerraformFilesOutput ¶ added in v1.0.28
type TerraformFilesOutput struct {
InstanceID string `json:"instanceId"`
Resources []TerraformFilesResource `json:"resources"`
}
type TerraformFilesResource ¶ added in v1.0.28
type TerraformHistoryEntry ¶ added in v1.1.1
type TerraformHistoryEntry struct {
Operation string `json:"operation"`
Status string `json:"status"`
StartedAt string `json:"startedAt"`
CompletedAt string `json:"completedAt"`
OperationID string `json:"operationId"`
Error string `json:"error,omitempty"`
}
TerraformHistoryEntry is a single entry from the tf-state configmap history
type TerraformOutputsOutput ¶ added in v1.0.28
type TerraformOutputsOutput struct {
InstanceID string `json:"instanceId"`
Resources []TerraformOutputsResource `json:"resources"`
}
type TerraformOutputsResource ¶ added in v1.0.28
type TerraformProgressData ¶ added in v1.1.1
type TerraformProgressData struct {
TerraformName string `json:"terraformName"`
InstanceID string `json:"instanceID"`
ResourceID string `json:"resourceID"`
ResourceVersion string `json:"resourceVersion"`
OperationID string `json:"operationID"`
Status string `json:"status"`
StartedAt string `json:"startedAt"`
CompletedAt string `json:"completedAt"`
TotalResources int `json:"totalResources"`
InProgressResources int `json:"inProgressResources"`
FailedResources int `json:"failedResources"`
Resources []TerraformResourceDetail `json:"resources"`
PlannedResources []string `json:"plannedResources"`
}
TerraformProgressData holds the parsed progress from a terraform-progress configmap
type TerraformResourceDetail ¶ added in v1.1.1
type TerraformResourceDetail struct {
Address string `json:"address"`
Type string `json:"type"`
Name string `json:"name"`
Mode string `json:"mode"`
Provider string `json:"provider"`
State string `json:"state"`
}
TerraformResourceDetail is a single resource in the terraform progress
type TerraformResponse ¶
type TerraformResponse struct {
SyncState string `json:"syncState,omitempty"`
Files FileInfo `json:"files,omitempty"`
SyncError string `json:"syncError,omitempty"`
}
Define structs to match the JSON structure
type TerraformStateData ¶ added in v1.3.1
type TerraformStateData struct {
Progress *TerraformProgressData
History []TerraformHistoryEntry
PlanPreviews map[string]string // plan preview JSON keyed by operation ID
PreviewErrors map[string]string // plan preview errors keyed by operation ID
}
TerraformStateData holds all data extracted from a tf-state configmap: progress, history, and plan previews. This avoids needing a second configmap lookup via terraformDataForResource which can fail in some environments.
type WorkflowStepInfo ¶ added in v1.2.4
type WorkflowStepInfo struct {
Name string `json:"name"`
DisplayName string `json:"displayName,omitempty"` // overridden display name (e.g. "Waiting for dependencies" for Bootstrap)
Status string `json:"status"` // "success", "in-progress", "failed", "pending"
StartTime string `json:"startTime,omitempty"`
EndTime string `json:"endTime,omitempty"`
Events []dataaccess.DebugEvent `json:"events,omitempty"`
DepTimelines []depTimeline `json:"depTimelines,omitempty"` // populated for bootstrap steps only
}
WorkflowStepInfo holds step-level summary with timing and events.
Source Files
¶
- adopt.go
- breakpoint.go
- breakpoint_list.go
- breakpoint_resume.go
- common.go
- continue_deployment.go
- copy_snapshot.go
- create.go
- dashboard.go
- dashboard_tui.go
- debug.go
- debug_clipboard.go
- debug_dag_tui.go
- debug_helm_detail_tui.go
- debug_helm_logs.go
- debug_helm_values.go
- debug_plan_dag.go
- debug_plan_dag_render.go
- debug_resources.go
- debug_shared.go
- debug_syntax_highlight.go
- debug_terraform_detail_tui.go
- debug_terraform_exec.go
- debug_terraform_files.go
- debug_terraform_logs.go
- debug_terraform_output_tree.go
- debug_terraform_outputs.go
- debug_terraform_plan_format.go
- debug_terraform_progress.go
- debug_workflow_errors_tab.go
- debug_workflow_progress.go
- delete.go
- deployment_parameters.go
- describe.go
- describe_snapshot.go
- disable_debug_mode.go
- enable_debug_mode.go
- evaluate.go
- get_deployment.go
- get_installer.go
- instance.go
- list.go
- list_endpoints.go
- list_snapshots.go
- modify.go
- patch_deployment.go
- restart.go
- restore.go
- start.go
- stop.go
- terraform_configmap.go
- trigger_backup.go
- update.go
- version_upgrade.go
- workflow.go
- workflow_progress_tui.go