Help us shape the future of Go! Take the 2026 Go Developer Survey

gitops

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchInfo

type BranchInfo struct {
	// Name of the branch.
	//
	// Required: true
	Name string `json:"name"`

	// IsDefault indicates if this is the default branch.
	//
	// Required: true
	IsDefault bool `json:"isDefault"`
}

BranchInfo represents information about a git branch.

type BranchesResponse

type BranchesResponse struct {
	// Branches available in the repository.
	//
	// Required: true
	Branches []BranchInfo `json:"branches"`
}

BranchesResponse represents the response for listing repository branches.

type BrowseRequest

type BrowseRequest struct {
	// Path to browse in the repository.
	//
	// Required: false
	Path string `json:"path,omitempty"`
}

BrowseRequest represents a request to browse repository files.

type BrowseResponse

type BrowseResponse struct {
	// Path that was browsed.
	//
	// Required: true
	Path string `json:"path"`

	// Files and directories at the path.
	//
	// Required: true
	Files []FileTreeNode `json:"files"`
}

BrowseResponse represents the response for browsing repository files.

type CreateRepositoryRequest

type CreateRepositoryRequest struct {
	// Name of the git repository.
	//
	// Required: true
	Name string `json:"name" binding:"required"`

	// URL of the git repository.
	//
	// Required: true
	URL string `json:"url" binding:"required"`

	// AuthType specifies the authentication method (none, http, ssh).
	//
	// Required: true
	AuthType string `json:"authType" binding:"required"`

	// Username for HTTP authentication.
	//
	// Required: false
	Username string `json:"username,omitempty"`

	// Token for HTTP authentication.
	//
	// Required: false
	Token string `json:"token,omitempty"`

	// SSHKey for SSH authentication.
	//
	// Required: false
	SSHKey string `json:"sshKey,omitempty"`

	// SSHHostKeyVerification specifies how SSH host keys are verified.
	// Options: strict (require known_hosts), accept_new (auto-add new hosts), skip (disable verification).
	// Default: accept_new
	//
	// Required: false
	SSHHostKeyVerification string `json:"sshHostKeyVerification,omitempty"`

	// Description of the git repository.
	//
	// Required: false
	Description *string `json:"description,omitempty"`

	// Enabled indicates if the repository is enabled.
	//
	// Required: false
	Enabled *bool `json:"enabled,omitempty"`
}

CreateRepositoryRequest represents the request to create a git repository.

type CreateSyncRequest

type CreateSyncRequest struct {
	// Name of the sync configuration.
	//
	// Required: true
	Name string `json:"name" binding:"required"`

	// RepositoryID is the ID of the git repository to sync from.
	//
	// Required: true
	RepositoryID string `json:"repositoryId" binding:"required"`

	// Branch to sync from.
	//
	// Required: true
	Branch string `json:"branch" binding:"required"`

	// ComposePath is the path to the docker-compose file in the repository.
	//
	// Required: true
	ComposePath string `json:"composePath" binding:"required"`

	// TargetType specifies if this sync targets a "project" or "swarm_stack".
	//
	// Required: false
	TargetType string `json:"targetType,omitempty"`

	// ProjectName is the name of the project or stack to create/update.
	// The actual project will be created on first sync, and ProjectID will be set then.
	// If not provided, defaults to the sync name.
	//
	// Required: false
	ProjectName string `json:"projectName,omitempty"`

	// AutoSync indicates if the sync should run automatically.
	//
	// Required: false
	AutoSync *bool `json:"autoSync,omitempty"`

	// SyncInterval is the interval in minutes between automatic syncs.
	//
	// Required: false
	SyncInterval *int `json:"syncInterval,omitempty"`

	// SyncDirectory indicates if the entire directory containing the compose file should be synced.
	// When true (default), all files in the compose file's directory are synced.
	// When false, only the compose file itself is synced.
	//
	// Required: false
	SyncDirectory *bool `json:"syncDirectory,omitempty"`

	// MaxSyncFiles is the maximum number of files to sync.
	// 0 means unlimited; env var overrides take precedence.
	// Default: 0
	//
	// Required: false
	MaxSyncFiles *int `json:"maxSyncFiles,omitempty"`

	// MaxSyncTotalSize is the maximum total size in bytes for all synced files.
	// 0 means unlimited; env var overrides take precedence.
	// Default: 0
	//
	// Required: false
	MaxSyncTotalSize *int64 `json:"maxSyncTotalSize,omitempty"`

	// MaxSyncBinarySize is the maximum size in bytes for individual binary files.
	// 0 means unlimited; env var overrides take precedence.
	// Default: 0
	//
	// Required: false
	MaxSyncBinarySize *int64 `json:"maxSyncBinarySize,omitempty"`

	// PreDeployScriptPath is the optional path inside the synced repo to a
	// script executed in a throwaway container before each deploy.
	//
	// Required: false
	PreDeployScriptPath *string `json:"preDeployScriptPath,omitempty"`

	// PreDeployRunnerImage is the image used to run the pre-deploy script.
	// When omitted, the lifecycleDefaultRunnerImage setting is used.
	//
	// Required: false
	PreDeployRunnerImage *string `json:"preDeployRunnerImage,omitempty"`

	// PreDeployEnv is the env config exposed to the script, one KEY=VALUE
	// entry per line; same format as a .env file. Keys must match POSIX
	// identifier syntax.
	//
	// Required: false
	PreDeployEnv *string `json:"preDeployEnv,omitempty"`

	// PreDeployExtraMounts is the bind-mount config added to the runner
	// container, one entry per line in docker -v "src:tgt[:ro|:rw]" form.
	// Source and target must be absolute paths.
	//
	// Required: false
	PreDeployExtraMounts *string `json:"preDeployExtraMounts,omitempty"`

	// PreDeployTimeoutSec bounds the script execution. Capped by the
	// lifecycleMaxTimeoutSec global setting at validation time. Defaults to 60.
	//
	// Required: false
	PreDeployTimeoutSec *int `json:"preDeployTimeoutSec,omitempty"`

	// PreDeployNetworkMode is the Docker network mode for the runner
	// container. Defaults to "none" (no network access). Set to "bridge",
	// "host", or a named Docker network to grant outbound or compose-network
	// access.
	//
	// Required: false
	PreDeployNetworkMode *string `json:"preDeployNetworkMode,omitempty"`
}

CreateSyncRequest represents the request to create a gitops sync.

func (CreateSyncRequest) HasPreDeployConfig added in v2.2.0

func (r CreateSyncRequest) HasPreDeployConfig() bool

HasPreDeployConfig reports whether the request carries any pre-deploy lifecycle hook field. Configuring the hook is gated behind the dedicated gitops:lifecycle permission (see the GitOps sync handlers), so callers use this to decide whether that authorization check applies. A nil pointer means the field is absent from the request body.

type FileTreeNode

type FileTreeNode struct {
	// Name of the file or directory.
	//
	// Required: true
	Name string `json:"name"`

	// Path is the full path of the file or directory.
	//
	// Required: true
	Path string `json:"path"`

	// Type indicates if this is a file or directory (use FileTreeNodeTypeFile or FileTreeNodeTypeDirectory).
	//
	// Required: true
	Type FileTreeNodeType `json:"type"`

	// Size of the file in bytes (0 for directories).
	//
	// Required: false
	Size int64 `json:"size,omitempty"`

	// Children contains child nodes for directories.
	//
	// Required: false
	Children []FileTreeNode `json:"children,omitempty"`
}

FileTreeNode represents a file or directory in the repository.

type FileTreeNodeType

type FileTreeNodeType string

FileTreeNodeType represents the type of a file tree node.

const (
	// FileTreeNodeTypeFile represents a file node.
	FileTreeNodeTypeFile FileTreeNodeType = "file"
	// FileTreeNodeTypeDirectory represents a directory node.
	FileTreeNodeTypeDirectory FileTreeNodeType = "directory"
)

type GitOpsSync

type GitOpsSync struct {
	// ID of the gitops sync.
	//
	// Required: true
	ID string `json:"id"`

	// Name of the sync configuration.
	//
	// Required: true
	Name string `json:"name"`

	// EnvironmentID is the ID of the environment this sync belongs to.
	//
	// Required: true
	EnvironmentID string `json:"environmentId"`

	// RepositoryID is the ID of the git repository to sync from.
	//
	// Required: true
	RepositoryID string `json:"repositoryId"`

	// Repository is the associated git repository.
	//
	// Required: false
	Repository *GitRepository `json:"repository,omitempty"`

	// Branch to sync from.
	//
	// Required: true
	Branch string `json:"branch"`

	// ComposePath is the path to the docker-compose file in the repository.
	//
	// Required: true
	ComposePath string `json:"composePath"`

	// TargetType indicates what entity is being deployed (e.g. "project" or "swarm_stack").
	//
	// Required: true
	TargetType string `json:"targetType"`

	// ProjectName is the name used to create/identify the project or stack.
	//
	// Required: true
	ProjectName string `json:"projectName"`

	// ProjectID is the ID of the linked project (set after first sync).
	//
	// Required: false
	ProjectID *string `json:"projectId,omitempty"`

	// AutoSync indicates if the sync should run automatically.
	//
	// Required: true
	AutoSync bool `json:"autoSync"`

	// SyncInterval is the interval in minutes between automatic syncs.
	//
	// Required: true
	SyncInterval int `json:"syncInterval"`

	// SyncDirectory indicates if the entire directory containing the compose file should be synced.
	// When true, all files in the compose file's directory (and subdirectories) are synced.
	// When false, only the compose file itself is synced.
	//
	// Required: true
	SyncDirectory bool `json:"syncDirectory"`

	// SyncedFiles is a JSON-encoded list of file paths that were synced in the last successful sync.
	// Only populated when SyncDirectory is true. Parse as JSON array of strings.
	//
	// Required: false
	SyncedFiles *string `json:"syncedFiles,omitempty"`

	// MaxSyncFiles is the maximum number of files to sync.
	// 0 means unlimited; env var overrides take precedence.
	//
	// Required: true
	MaxSyncFiles int `json:"maxSyncFiles"`

	// MaxSyncTotalSize is the maximum total size in bytes for all synced files.
	// 0 means unlimited; env var overrides take precedence.
	//
	// Required: true
	MaxSyncTotalSize int64 `json:"maxSyncTotalSize"`

	// MaxSyncBinarySize is the maximum size in bytes for individual binary files.
	// 0 means unlimited; env var overrides take precedence.
	//
	// Required: true
	MaxSyncBinarySize int64 `json:"maxSyncBinarySize"`

	// LastSyncAt is the date and time of the last successful sync.
	//
	// Required: false
	LastSyncAt *time.Time `json:"lastSyncAt,omitempty"`

	// LastSyncStatus is the status of the last sync attempt.
	//
	// Required: false
	LastSyncStatus *string `json:"lastSyncStatus,omitempty"`

	// LastSyncError is the error message from the last sync attempt if it failed.
	//
	// Required: false
	LastSyncError *string `json:"lastSyncError,omitempty"`

	// LastSyncCommit is the commit hash from the last successful sync.
	//
	// Required: false
	LastSyncCommit *string `json:"lastSyncCommit,omitempty"`

	// PreDeployScriptPath is the optional path inside the synced repo to a
	// script executed in a throwaway container before each deploy. Scripts
	// are repo-trusted code; the configured runner image, env, and mounts
	// shape the runtime context (admin-managed, never from repo data).
	//
	// Required: false
	PreDeployScriptPath *string `json:"preDeployScriptPath,omitempty"`

	// PreDeployRunnerImage is the image used to run the pre-deploy script.
	// Required whenever PreDeployScriptPath is set.
	//
	// Required: false
	PreDeployRunnerImage *string `json:"preDeployRunnerImage,omitempty"`

	// PreDeployEnv is the KEY=VALUE env config exposed to the script, one
	// entry per line; same format as a .env file.
	//
	// Required: false
	PreDeployEnv *string `json:"preDeployEnv,omitempty"`

	// PreDeployExtraMounts is the bind-mount config added to the runner
	// container, one entry per line in docker -v "src:tgt[:ro|:rw]" form.
	//
	// Required: false
	PreDeployExtraMounts *string `json:"preDeployExtraMounts,omitempty"`

	// PreDeployTimeoutSec bounds the script execution. Capped by the
	// lifecycleMaxTimeoutSec global setting at run time.
	//
	// Required: true
	PreDeployTimeoutSec int `json:"preDeployTimeoutSec"`

	// PreDeployNetworkMode is the Docker network mode passed to the runner
	// container. Defaults to "none" so scripts run with no network access
	// unless explicitly opted in. Set to "bridge", "host", or a named
	// network when the script needs outbound or compose-network access.
	//
	// Required: true
	PreDeployNetworkMode string `json:"preDeployNetworkMode"`

	// PreDeployLastRunAt is the timestamp of the most recent pre-deploy
	// lifecycle hook run on this sync.
	//
	// Required: false
	PreDeployLastRunAt *time.Time `json:"preDeployLastRunAt,omitempty"`

	// PreDeployLastRunStatus is the status of the most recent pre-deploy
	// lifecycle hook run: "success", "failed", or "timeout".
	//
	// Required: false
	PreDeployLastRunStatus *string `json:"preDeployLastRunStatus,omitempty"`

	// PreDeployLastRunOutput is the truncated combined stdout+stderr from
	// the most recent pre-deploy lifecycle hook run.
	//
	// Required: false
	PreDeployLastRunOutput *string `json:"preDeployLastRunOutput,omitempty"`

	// CreatedAt is the date and time at which the sync was created.
	//
	// Required: true
	CreatedAt time.Time `json:"createdAt"`

	// UpdatedAt is the date and time at which the sync was last updated.
	//
	// Required: true
	UpdatedAt time.Time `json:"updatedAt"`
}

GitOpsSync represents a GitOps sync configuration.

type GitRepository

type GitRepository struct {
	// ID of the git repository.
	//
	// Required: true
	ID string `json:"id"`

	// Name of the git repository.
	//
	// Required: true
	Name string `json:"name"`

	// URL of the git repository.
	//
	// Required: true
	URL string `json:"url"`

	// AuthType specifies the authentication method (none, http, ssh).
	//
	// Required: true
	AuthType string `json:"authType"`

	// Username for HTTP authentication.
	//
	// Required: false
	Username string `json:"username,omitempty"`

	// SSHHostKeyVerification specifies how SSH host keys are verified (strict, accept_new, skip).
	//
	// Required: false
	SSHHostKeyVerification string `json:"sshHostKeyVerification,omitempty"`

	// Description of the git repository.
	//
	// Required: false
	Description *string `json:"description,omitempty"`

	// Enabled indicates if the repository is enabled.
	//
	// Required: true
	Enabled bool `json:"enabled"`

	// CreatedAt is the date and time at which the repository was created.
	//
	// Required: true
	CreatedAt time.Time `json:"createdAt"`

	// UpdatedAt is the date and time at which the repository was last updated.
	//
	// Required: true
	UpdatedAt time.Time `json:"updatedAt"`
}

GitRepository represents a reusable Git repository with credentials.

type ImportGitOpsSyncRequest

type ImportGitOpsSyncRequest struct {
	// SyncName is the name of the sync configuration.
	//
	// Required: true
	SyncName string `json:"syncName"`

	// GitRepo is the repository identifier or URL.
	//
	// Required: true
	GitRepo string `json:"gitRepo"`

	// Branch to sync from.
	//
	// Required: true
	Branch string `json:"branch"`

	// DockerComposePath is the path to the docker-compose file.
	//
	// Required: true
	DockerComposePath string `json:"dockerComposePath"`

	// AutoSync indicates if the sync should run automatically.
	//
	// Required: true
	AutoSync bool `json:"autoSync"`

	// SyncInterval is the interval in minutes between automatic syncs.
	//
	// Required: true
	SyncInterval int `json:"syncInterval"`

	// SyncDirectory indicates if the entire directory containing the compose file should be synced.
	// When true (default), all files in the compose file's directory are synced.
	//
	// Required: false
	SyncDirectory *bool `json:"syncDirectory,omitempty"`

	// MaxSyncFiles is the maximum number of files to sync.
	// 0 means unlimited; env var overrides take precedence.
	//
	// Required: false
	MaxSyncFiles *int `json:"maxSyncFiles,omitempty"`

	// MaxSyncTotalSize is the maximum total size in bytes for all synced files.
	// 0 means unlimited; env var overrides take precedence.
	//
	// Required: false
	MaxSyncTotalSize *int64 `json:"maxSyncTotalSize,omitempty"`

	// MaxSyncBinarySize is the maximum size in bytes for individual binary files.
	// 0 means unlimited; env var overrides take precedence.
	//
	// Required: false
	MaxSyncBinarySize *int64 `json:"maxSyncBinarySize,omitempty"`
}

ImportGitOpsSyncRequest represents the request to import gitops syncs.

type ImportGitOpsSyncResponse

type ImportGitOpsSyncResponse struct {
	// SuccessCount is the number of successfully imported syncs.
	//
	// Required: true
	SuccessCount int `json:"successCount"`

	// FailedCount is the number of failed imports.
	//
	// Required: true
	FailedCount int `json:"failedCount"`

	// Errors contains error messages for failed imports.
	//
	// Required: true
	Errors []string `json:"errors"`
}

ImportGitOpsSyncResponse represents the response for importing gitops syncs.

type RepositorySync

type RepositorySync struct {
	// ID of the git repository.
	//
	// Required: true
	ID string `json:"id" binding:"required"`

	// Name of the git repository.
	//
	// Required: true
	Name string `json:"name" binding:"required"`

	// URL of the git repository.
	//
	// Required: true
	URL string `json:"url" binding:"required"`

	// AuthType specifies the authentication method (none, http, ssh).
	//
	// Required: true
	AuthType string `json:"authType" binding:"required"`

	// Username for HTTP authentication.
	//
	// Required: false
	Username string `json:"username,omitempty"`

	// Token for HTTP authentication (decrypted).
	//
	// Required: false
	Token string `json:"token,omitempty"`

	// SSHKey for SSH authentication (decrypted).
	//
	// Required: false
	SSHKey string `json:"sshKey,omitempty"`

	// SSHHostKeyVerification specifies how SSH host keys are verified.
	//
	// Required: false
	SSHHostKeyVerification string `json:"sshHostKeyVerification,omitempty"`

	// Description of the git repository.
	//
	// Required: false
	Description *string `json:"description,omitempty"`

	// Enabled indicates if the repository is enabled.
	//
	// Required: true
	Enabled bool `json:"enabled"`

	// CreatedAt is the date and time at which the repository was created.
	//
	// Required: true
	CreatedAt time.Time `json:"createdAt"`

	// UpdatedAt is the date and time at which the repository was last updated.
	//
	// Required: true
	UpdatedAt time.Time `json:"updatedAt"`
}

RepositorySync represents a git repository for syncing to remote environments.

type RepositorySyncRequest

type RepositorySyncRequest struct {
	// Repositories is a list of git repositories to sync.
	//
	// Required: true
	Repositories []RepositorySync `json:"repositories" binding:"required"`
}

RepositorySyncRequest represents a request to sync git repositories to an agent.

type SyncCounts

type SyncCounts struct {
	// TotalSyncs is the total number of syncs in the current filtered set.
	//
	// Required: true
	TotalSyncs int `json:"totalSyncs"`

	// ActiveSyncs is the number of auto-sync enabled syncs in the current filtered set.
	//
	// Required: true
	ActiveSyncs int `json:"activeSyncs"`

	// SuccessfulSyncs is the number of syncs with last status "success" in the current filtered set.
	//
	// Required: true
	SuccessfulSyncs int `json:"successfulSyncs"`
}

SyncCounts contains counts of syncs by status within the current filtered set.

type SyncResult

type SyncResult struct {
	// Success indicates if the sync was successful.
	//
	// Required: true
	Success bool `json:"success"`

	// Message contains a human-readable message about the sync result.
	//
	// Required: true
	Message string `json:"message"`

	// Error contains error details if the sync failed.
	//
	// Required: false
	Error *string `json:"error,omitempty"`

	// SyncedAt is the timestamp of the sync.
	//
	// Required: true
	SyncedAt time.Time `json:"syncedAt"`
}

SyncResult represents the result of a sync operation.

type SyncStatus

type SyncStatus struct {
	// ID of the sync configuration.
	//
	// Required: true
	ID string `json:"id"`

	// AutoSync indicates if automatic sync is enabled.
	//
	// Required: true
	AutoSync bool `json:"autoSync"`

	// NextSyncAt is the estimated time of the next automatic sync.
	//
	// Required: false
	NextSyncAt *time.Time `json:"nextSyncAt,omitempty"`

	// LastSyncAt is the time of the last sync.
	//
	// Required: false
	LastSyncAt *time.Time `json:"lastSyncAt,omitempty"`

	// LastSyncStatus is the status of the last sync.
	//
	// Required: false
	LastSyncStatus *string `json:"lastSyncStatus,omitempty"`

	// LastSyncError is the error from the last sync if it failed.
	//
	// Required: false
	LastSyncError *string `json:"lastSyncError,omitempty"`

	// LastSyncCommit is the commit hash from the last successful sync.
	//
	// Required: false
	LastSyncCommit *string `json:"lastSyncCommit,omitempty"`
}

SyncStatus represents the current status of a sync configuration.

type UpdateRepositoryRequest

type UpdateRepositoryRequest struct {
	// Name of the git repository.
	//
	// Required: false
	Name *string `json:"name,omitempty"`

	// URL of the git repository.
	//
	// Required: false
	URL *string `json:"url,omitempty"`

	// AuthType specifies the authentication method (none, http, ssh).
	//
	// Required: false
	AuthType *string `json:"authType,omitempty"`

	// Username for HTTP authentication.
	//
	// Required: false
	Username *string `json:"username,omitempty"`

	// Token for HTTP authentication.
	//
	// Required: false
	Token *string `json:"token,omitempty"`

	// SSHKey for SSH authentication.
	//
	// Required: false
	SSHKey *string `json:"sshKey,omitempty"`

	// SSHHostKeyVerification specifies how SSH host keys are verified.
	// Options: strict (require known_hosts), accept_new (auto-add new hosts), skip (disable verification).
	//
	// Required: false
	SSHHostKeyVerification *string `json:"sshHostKeyVerification,omitempty"`

	// Description of the git repository.
	//
	// Required: false
	Description *string `json:"description,omitempty"`

	// Enabled indicates if the repository is enabled.
	//
	// Required: false
	Enabled *bool `json:"enabled,omitempty"`
}

UpdateRepositoryRequest represents the request to update a git repository.

type UpdateSyncRequest

type UpdateSyncRequest struct {
	// Name of the sync configuration.
	//
	// Required: false
	Name *string `json:"name,omitempty"`

	// RepositoryID is the ID of the git repository to sync from.
	//
	// Required: false
	RepositoryID *string `json:"repositoryId,omitempty"`

	// Branch to sync from.
	//
	// Required: false
	Branch *string `json:"branch,omitempty"`

	// ComposePath is the path to the docker-compose file in the repository.
	//
	// Required: false
	ComposePath *string `json:"composePath,omitempty"`

	// TargetType specifies if this sync targets a "project" or "swarm_stack".
	//
	// Required: false
	TargetType *string `json:"targetType,omitempty"`

	// ProjectName is the name of the project or stack to create/update.
	//
	// Required: false
	ProjectName *string `json:"projectName,omitempty"`

	// AutoSync indicates if the sync should run automatically.
	//
	// Required: false
	AutoSync *bool `json:"autoSync,omitempty"`

	// SyncInterval is the interval in minutes between automatic syncs.
	//
	// Required: false
	SyncInterval *int `json:"syncInterval,omitempty"`

	// SyncDirectory indicates if the entire directory containing the compose file should be synced.
	// When true, all files in the compose file's directory are synced.
	// When false, only the compose file itself is synced.
	//
	// Required: false
	SyncDirectory *bool `json:"syncDirectory,omitempty"`

	// MaxSyncFiles is the maximum number of files to sync.
	// 0 means unlimited; env var overrides take precedence.
	//
	// Required: false
	MaxSyncFiles *int `json:"maxSyncFiles,omitempty"`

	// MaxSyncTotalSize is the maximum total size in bytes for all synced files.
	// 0 means unlimited; env var overrides take precedence.
	//
	// Required: false
	MaxSyncTotalSize *int64 `json:"maxSyncTotalSize,omitempty"`

	// MaxSyncBinarySize is the maximum size in bytes for individual binary files.
	// 0 means unlimited; env var overrides take precedence.
	//
	// Required: false
	MaxSyncBinarySize *int64 `json:"maxSyncBinarySize,omitempty"`

	// PreDeployScriptPath is the optional path inside the synced repo to a
	// script executed in a throwaway container before each deploy. Set to
	// an empty string to clear an existing configuration.
	//
	// Required: false
	PreDeployScriptPath *string `json:"preDeployScriptPath,omitempty"`

	// PreDeployRunnerImage is the image used to run the pre-deploy script.
	// When omitted, the lifecycleDefaultRunnerImage setting is used.
	//
	// Required: false
	PreDeployRunnerImage *string `json:"preDeployRunnerImage,omitempty"`

	// PreDeployEnv is the env config exposed to the script, one KEY=VALUE
	// entry per line; same format as a .env file. Keys must match POSIX
	// identifier syntax.
	//
	// Required: false
	PreDeployEnv *string `json:"preDeployEnv,omitempty"`

	// PreDeployExtraMounts is the bind-mount config added to the runner
	// container, one entry per line in docker -v "src:tgt[:ro|:rw]" form.
	// Source and target must be absolute paths.
	//
	// Required: false
	PreDeployExtraMounts *string `json:"preDeployExtraMounts,omitempty"`

	// PreDeployTimeoutSec bounds the script execution. Capped by the
	// lifecycleMaxTimeoutSec global setting at validation time.
	//
	// Required: false
	PreDeployTimeoutSec *int `json:"preDeployTimeoutSec,omitempty"`

	// PreDeployNetworkMode is the Docker network mode for the runner
	// container. Set to "none", "bridge", "host", or a named Docker
	// network. Empty string resets to the default ("none").
	//
	// Required: false
	PreDeployNetworkMode *string `json:"preDeployNetworkMode,omitempty"`
}

UpdateSyncRequest represents the request to update a gitops sync.

func (UpdateSyncRequest) HasPreDeployConfig added in v2.2.0

func (r UpdateSyncRequest) HasPreDeployConfig() bool

HasPreDeployConfig reports whether the request carries any pre-deploy lifecycle hook field. See CreateSyncRequest.HasPreDeployConfig.

Jump to

Keyboard shortcuts

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