Documentation
¶
Index ¶
- Constants
- func CheckAvailableNewVersion() (bool, string, *semver.Version)
- func DeleteClusterById(clusterId string, dryRunDisabled bool)
- func DeleteClusterUnDeployedInError()
- func DeleteOldClustersWithInvalidCredentials(ageInDay int, dryRunDisabled bool)
- func DeleteOrganizations(organizationIds []string, allowFailedClusters bool, dryRunDisabled bool)
- func DeleteProjectById(projectId string, dryRunDisabled bool)
- func DeployClustersByBatch(listService AdminClusterListService, ...) error
- func DeploymentLogJSON(l qovery.EnvironmentLogs) map[string]interface{}
- func DeploymentLogServices(logs []qovery.EnvironmentLogs) []string
- func DoRequestUserToAuthenticate(headless bool, skipVersionCheck bool)
- func DownloadS3Archive(executionId string, directory string)
- func ExecLog(req *LogRequest)
- func ExecPortForward(req *PortForwardRequest)
- func ExecShell(req TerminalSize, path string)
- func FilterDeploymentLogs(logs []qovery.EnvironmentLogs, f DeploymentLogFilter) []qovery.EnvironmentLogs
- func ForceFailedDeploymentsToInternalErrorStatus(safeguardDuration time.Duration)
- func FormatDeploymentLogLine(l qovery.EnvironmentLogs) string
- func GetCurrentVersion() (*semver.Version, error)
- func GetKubeconfigByClusterId(clusterId string, readOnly bool) string
- func GetLatestOnlineVersionNumber() (*semver.Version, error)
- func GetLatestOnlineVersionUrl() (string, error)
- func GetQoveryClientInstance() *qovery.APIClient
- func GetTokenByClusterId(clusterId string, readOnly bool) string
- func HasServiceSpecificLines(logs []qovery.EnvironmentLogs) bool
- func IsAgentResponseTimeout(err error) bool
- func IsInternalServerError(err error) bool
- func IsPermanentCloseError(err error) bool
- func ListAllClusters(listService AdminClusterListService) error
- func LoadAwsCredentials(roleArn string) error
- func LoadCredentials(clusterId string, doNotConnectToBastion bool) error
- func LockedClusters()
- func NotifyUsersClusterFailure(clusterId *string) error
- func PrintClustersTable(clusters []ClusterDetails) error
- func PublishEnvironmentDeploymentRules() error
- func RetryQoveryClientApiRequestOnUnauthorized[T any](request QoveryClientApiRequest[T]) (*T, *http.Response, error)
- func ServiceUnavailableMessage(feature string) string
- func SetBastionConnection() func()
- func StartChildShell() error
- func UpdateAll(dryRunDisabled bool, version string, providerKind string, parallelRun int)
- func UpdateById(clusterId string, dryRunDisabled bool, version string)
- func UpdateClusterDnsProvider(clusterId string, domain string, provider string, cloudflareEmail string, ...) error
- func UpdateClusterDomainName(clusterId string, domain string) error
- func UpdateClusterKubeconfig(organizationId string, clusterId string, kubeconfig string) error
- type AdminClusterBatchDeployService
- type AdminClusterBatchDeployServiceImpl
- type AdminClusterListService
- type AdminClusterListServiceImpl
- type ArchiveResponse
- type ArchiveTagsResponse
- type AwsStsCredentials
- type ClusterBatchDeployResult
- type ClusterDetails
- type DeleteOrganizationFailure
- type DeleteOrganizationsResponse
- type DeploymentLogFilter
- type DeviceFlowParameters
- type ListOfClustersEligibleToUpdate
- type ListPodResponse
- type LogMessage
- type LogRequest
- type PodResponse
- type PortForwardRequest
- type QoveryClientApiRequest
- type ShellRequest
- type TerminalSize
- type Timestamp
- type TokensResponse
- type WebsocketPortForward
Constants ¶
const PingInterval = 30 * time.Second
const PreCheckStep = "PreCheck"
PreCheckStep is the value of `details.stage.step` carried by the pre-check log lines. Pre-check runs before any stage, so those lines are excluded from a service-scoped view and are the exact complement of it.
const ReadTimeout = 75 * time.Second
ReadTimeout must be > 2 × PingInterval so that a healthy connection always receives a pong before the deadline fires. The pong handler resets the deadline on every pong received.
const ReconnectDelay = 5 * time.Second
const StdinBufferSize = 4096
Variables ¶
This section is empty.
Functions ¶
func DeleteClusterById ¶ added in v0.42.1
func DeleteClusterUnDeployedInError ¶ added in v0.44.4
func DeleteClusterUnDeployedInError()
func DeleteOldClustersWithInvalidCredentials ¶ added in v0.73.0
func DeleteOrganizations ¶ added in v1.54.2
func DeleteProjectById ¶ added in v0.46.4
func DeployClustersByBatch ¶ added in v0.83.0
func DeployClustersByBatch(listService AdminClusterListService, deployService AdminClusterBatchDeployService, noConfirm bool) error
func DeploymentLogJSON ¶ added in v1.171.0
func DeploymentLogJSON(l qovery.EnvironmentLogs) map[string]interface{}
DeploymentLogJSON projects one log line onto the field names shared with the MCP `get_environment_deployment_logs` tool, so both surfaces answer the same question the same way.
func DeploymentLogServices ¶ added in v1.171.0
func DeploymentLogServices(logs []qovery.EnvironmentLogs) []string
DeploymentLogServices lists the distinct service names that emitted at least one of the given lines, sorted. It backs the hint shown when a --service filter matched nothing, which is more useful than a bare "not found": it names what could be asked for.
These are bare names, not the `Type/Name` form used when rendering a log line, precisely because the hint exists to be copied back into --service -- which matches on the name alone. Printing `Terraform/S3` here would suggest a value that never matches.
func DoRequestUserToAuthenticate ¶ added in v0.84.2
func DownloadS3Archive ¶ added in v0.96.0
func ExecLog ¶ added in v0.64.0
func ExecLog(req *LogRequest)
func ExecPortForward ¶ added in v0.77.0
func ExecPortForward(req *PortForwardRequest)
func ExecShell ¶
func ExecShell(req TerminalSize, path string)
func FilterDeploymentLogs ¶ added in v1.171.0
func FilterDeploymentLogs(logs []qovery.EnvironmentLogs, f DeploymentLogFilter) []qovery.EnvironmentLogs
FilterDeploymentLogs applies f to logs, preserving order.
The service predicate mirrors the one the Qovery console applies client-side, with one documented difference: the console also requires the line's `details.stage.id` to match the deployment stage the service belongs to, which neither the CLI nor the MCP server has in hand without an extra lookup. As a result a few stage-level lines belonging to other stages may show up in a service-scoped view.
func ForceFailedDeploymentsToInternalErrorStatus ¶ added in v0.64.0
func FormatDeploymentLogLine ¶ added in v1.171.0
func FormatDeploymentLogLine(l qovery.EnvironmentLogs) string
FormatDeploymentLogLine renders one log line for a human reader, in the same pipe-delimited shape as the runtime logs printed by ExecLog:
| 2026-09-06 14:03:12.418 | Build | Application/my-app | building image
A line carrying an error gets indented follow-up lines with the user-facing message, the hint and the documentation link -- the part someone debugging a failed deployment is actually after.
func GetCurrentVersion ¶
func GetKubeconfigByClusterId ¶ added in v1.2.6
func GetQoveryClientInstance ¶ added in v1.2.6
func GetTokenByClusterId ¶ added in v1.2.6
func HasServiceSpecificLines ¶ added in v1.171.0
func HasServiceSpecificLines(logs []qovery.EnvironmentLogs) bool
HasServiceSpecificLines reports whether logs contain at least one line emitted by a service rather than by the environment itself.
Pre-check lines are excluded, matching DeploymentLogServices: pre-check runs before any service is deployed, so those lines describe the environment even when a service name appears in their text.
func IsAgentResponseTimeout ¶ added in v1.158.1
IsAgentResponseTimeout returns true if the websocket close error indicates that K8s operations on the shell-agent side timed out, or that the gateway timed out waiting for the agent to respond. All are transient and resolve once the pod's Kubernetes exec API is responsive again.
IsAgentResponseTimeout is a strict subset of IsInternalServerError (both match close code 1011). Always check IsAgentResponseTimeout before IsInternalServerError, otherwise the specific timeout message is swallowed by the generic 1011 branch.
Matched substrings and their sources:
- "exceeded for receiving agent response" — gateway wait (shell_gateway.rs DEFAULT_AGENT_RESPONSE_TIMEOUT)
- "while connecting to pod" — shell-agent K8s exec timeout (shell.rs KUBE_OPERATION_TIMEOUT)
- "while setting up port forward" — shell-agent K8s port-forward timeout (port_forward.rs KUBE_PORT_FORWARD_TIMEOUT)
- "Retry budget exhausted" — shell-agent retry budget guard (shell.rs / port_forward.rs)
func IsInternalServerError ¶ added in v1.158.1
IsInternalServerError returns true if the websocket close error is code 1011 (Internal Error).
func IsPermanentCloseError ¶ added in v1.158.1
IsPermanentCloseError returns true if the websocket close error should NOT be retried (permission denied, auth/policy violation). Transient errors (abnormal closure, going away, internal server error) return false.
func ListAllClusters ¶ added in v1.4.0
func ListAllClusters(listService AdminClusterListService) error
func LoadAwsCredentials ¶ added in v1.32.0
func LoadCredentials ¶ added in v1.32.0
func LockedClusters ¶
func LockedClusters()
func NotifyUsersClusterFailure ¶ added in v1.7.7
func PrintClustersTable ¶ added in v0.83.0
func PrintClustersTable(clusters []ClusterDetails) error
PrintClustersTable global method to output clusters table
func PublishEnvironmentDeploymentRules ¶ added in v0.98.0
func PublishEnvironmentDeploymentRules() error
func RetryQoveryClientApiRequestOnUnauthorized ¶ added in v0.84.2
func RetryQoveryClientApiRequestOnUnauthorized[T any](request QoveryClientApiRequest[T]) (*T, *http.Response, error)
RetryQoveryClientApiRequestOnUnauthorized retries the request once with a refreshed token when the first attempt is unauthorized (401), and falls back to an interactive login when the stored credentials cannot be refreshed
func ServiceUnavailableMessage ¶ added in v1.158.1
ServiceUnavailableMessage returns a user-friendly message when the cluster agent is unreachable.
func SetBastionConnection ¶ added in v1.33.0
func SetBastionConnection() func()
func StartChildShell ¶ added in v1.32.0
func StartChildShell() error
func UpdateById ¶
func UpdateClusterDnsProvider ¶ added in v1.56.0
func UpdateClusterDomainName ¶ added in v1.50.0
Types ¶
type AdminClusterBatchDeployService ¶ added in v0.83.0
type AdminClusterBatchDeployService interface {
Deploy(clusters []ClusterDetails) (*ClusterBatchDeployResult, error)
PrintParameters()
}
type AdminClusterBatchDeployServiceImpl ¶ added in v0.83.0
type AdminClusterBatchDeployServiceImpl struct {
// DryRunDisabled disable dry run
DryRunDisabled bool
// ParallelRun the number of parallel requests to be processed
ParallelRun int
// RefreshDelay the delay to fetch cluster status in process
RefreshDelay int
// CompleteBatchBeforeContinue to block on N parallel runs to be processed: true = 'batch' mode / false = 'on-the-fly' mode
CompleteBatchBeforeContinue bool
// UpgradeClusterNewK8sVersion indicates next version to trigger a cluster upgrade
UpgradeClusterNewK8sVersion *string
// UpgradeMode indicates if the cluster needs to be upgraded
UpgradeMode bool
// NoConfirm do not prompt for any confirmation
NoConfirm bool
// contains filtered or unexported fields
}
func NewAdminClusterBatchDeployServiceImpl ¶ added in v0.83.0
func NewAdminClusterBatchDeployServiceImpl( client *qovery.ClustersAPIService, dryRun bool, parallelRun int, refreshDelay int, executionMode string, newK8sversionStr string, noConfirm bool, ) (*AdminClusterBatchDeployServiceImpl, error)
func (AdminClusterBatchDeployServiceImpl) Deploy ¶ added in v0.83.0
func (service AdminClusterBatchDeployServiceImpl) Deploy(clusters []ClusterDetails) (*ClusterBatchDeployResult, error)
func (AdminClusterBatchDeployServiceImpl) PrintParameters ¶ added in v0.83.0
func (service AdminClusterBatchDeployServiceImpl) PrintParameters()
type AdminClusterListService ¶ added in v0.83.0
type AdminClusterListService interface {
SelectClusters() ([]ClusterDetails, error)
}
type AdminClusterListServiceImpl ¶ added in v0.83.0
type AdminClusterListServiceImpl struct {
// Filters based on ClusterDetails struct fields (reflection is used to filter fields)
Filters map[string]string
}
func NewAdminClusterListServiceImpl ¶ added in v0.83.0
func NewAdminClusterListServiceImpl(filters map[string]string) (*AdminClusterListServiceImpl, error)
func (AdminClusterListServiceImpl) SelectClusters ¶ added in v0.83.0
func (service AdminClusterListServiceImpl) SelectClusters() ([]ClusterDetails, error)
type ArchiveResponse ¶ added in v0.96.0
type ArchiveResponse struct {
Archive string
Tags []ArchiveTagsResponse
}
type ArchiveTagsResponse ¶ added in v0.96.0
type AwsStsCredentials ¶ added in v1.32.0
type ClusterBatchDeployResult ¶ added in v0.83.0
type ClusterBatchDeployResult struct {
// ProcessedClusters clusters that have been processed, non matter the final state created
ProcessedClusters []ClusterDetails
// PendingClusters clusters in the pending queue (their state were not in ready state)
PendingClusters []ClusterDetails
}
type ClusterDetails ¶ added in v0.83.0
type ClusterDetails struct {
OrganizationId string `json:"organization_id"`
OrganizationName string `json:"organization_name"`
OrganizationPlan string `json:"organization_plan"`
ClusterId string `json:"cluster_id"`
ClusterName string `json:"cluster_name"`
ClusterType string `json:"cluster_type"`
ClusterCreatedAt string `json:"cluster_created_at"`
ClusterLastDeployedAt string `json:"cluster_last_deployed_at"`
ClusterK8sVersion string `json:"cluster_k8s_version"`
Mode string `json:"mode"`
IsProduction bool `json:"is_production"`
CurrentStatus string `json:"current_status"`
HasKarpenter bool `json:"has_karpenter"`
HasPendingUpdate bool `json:"has_pending_update"`
HasMetricsFeature bool `json:"has_metrics_feature"`
}
type DeleteOrganizationFailure ¶ added in v1.54.2
type DeleteOrganizationsResponse ¶ added in v1.54.2
type DeleteOrganizationsResponse struct {
Deleted []string `json:"deleted"`
Failed []DeleteOrganizationFailure `json:"failed"`
}
type DeploymentLogFilter ¶ added in v1.171.0
type DeploymentLogFilter struct {
// ServiceID scopes the output to the service with that id.
ServiceID string
// ServiceName scopes the output to the service with that name, matched against the
// transmitter of each line. Service names are unique within an environment, and matching
// on the payload rather than resolving the name through the API keeps every service type
// working -- including Terraform services, which the shared CLI resolver cannot look up.
ServiceName string
// PreCheckOnly keeps only the pre-check lines. Mutually exclusive with the service scope.
PreCheckOnly bool
// ErrorsOnly keeps only the lines carrying an error.
ErrorsOnly bool
}
DeploymentLogFilter narrows a deployment log payload down to what the caller asked for. The zero value keeps every line.
func (DeploymentLogFilter) IsServiceScoped ¶ added in v1.171.0
func (f DeploymentLogFilter) IsServiceScoped() bool
IsServiceScoped reports whether f narrows the output to a single service.
type DeviceFlowParameters ¶ added in v0.84.2
type ListOfClustersEligibleToUpdate ¶ added in v0.83.0
type ListOfClustersEligibleToUpdate struct {
Results []ClusterDetails
}
type ListPodResponse ¶ added in v0.78.0
type ListPodResponse struct {
Pods []PodResponse
}
func ExecListPods ¶ added in v0.78.0
func ExecListPods(req *PortForwardRequest) (*ListPodResponse, error)
type LogMessage ¶ added in v0.64.0
type LogRequest ¶ added in v0.64.0
type PodResponse ¶ added in v0.78.0
type PortForwardRequest ¶ added in v0.77.0
type PortForwardRequest struct {
ServiceID utils.Id `url:"service"`
EnvironmentID utils.Id `url:"environment"`
ProjectID utils.Id `url:"project"`
OrganizationID utils.Id `url:"organization"`
ClusterID utils.Id `url:"cluster"`
PodName string `url:"pod_name,omitempty"`
BlueprintID string `url:"blueprint_id,omitempty"`
ServiceType string `url:"service_type"`
Port uint16 `url:"port"`
LocalPort uint16
}
type QoveryClientApiRequest ¶ added in v0.84.2
type ShellRequest ¶
type ShellRequest struct {
ServiceID utils.Id `url:"service"`
EnvironmentID utils.Id `url:"environment"`
ProjectID utils.Id `url:"project"`
OrganizationID utils.Id `url:"organization"`
ClusterID utils.Id `url:"cluster"`
PodName string `url:"pod_name,omitempty"`
ContainerName string `url:"container_name,omitempty"`
Command []string `url:"command"`
TtyWidth uint16 `url:"tty_width"`
TtyHeight uint16 `url:"tty_height"`
EphemeralMode string `url:"mode,omitempty"`
CpuOverride string `url:"cpu_override,omitempty"`
MemoryOverride string `url:"memory_override,omitempty"`
}
func (*ShellRequest) SetTtySize ¶ added in v1.7.11
func (s *ShellRequest) SetTtySize(width uint16, height uint16)
type TerminalSize ¶ added in v1.7.11
type Timestamp ¶ added in v0.64.0
func (*Timestamp) UnmarshalJSON ¶ added in v0.64.0
UnmarshalJSON decodes an int64 timestamp into a time.Time object
type TokensResponse ¶ added in v0.84.2
type WebsocketPortForward ¶ added in v0.77.0
type WebsocketPortForward struct {
// contains filtered or unexported fields
}
Source Files
¶
- admin_cluster_deploy_by_batch.go
- admin_cluster_list.go
- admin_cluster_services.go
- admin_environment_deployment_rules.go
- admin_load_credentials.go
- admin_notify_users_cluster_failure.go
- auth_service.go
- bastion.go
- cluster.go
- delete_cluster.go
- delete_orga.go
- delete_project.go
- deploy.go
- deployment_log.go
- download_s3_archive.go
- lock.go
- log.go
- port-forward.go
- service_list_pods.go
- shell.go
- update.go
- version.go
- wserror.go