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

bean

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultStopTemplate = `` /* 261-byte string literal not displayed */

DefaultStopTemplate default Stop template for system charts

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationMetadata added in v1.4.0

type ApplicationMetadata struct {
	ClusterId int    `json:"clusterId"`
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

type ApplicationSource added in v1.4.0

type ApplicationSource struct {
	// RepoURL is the URL to the repository (Git or Helm) that contains the application manifests
	RepoURL string `json:"repoURL"`
	// Path is a directory path within the Git repository, and is only valid for applications sourced from Git.
	Path string `json:"path,omitempty"`
	// TargetRevision defines the revision of the source to sync the application to.
	// In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD.
	// In case of Helm, this is a semver tag for the Chart's version.
	TargetRevision string `json:"targetRevision,omitempty"`
	// Helm holds helm specific options
	Helm *ApplicationSourceHelm `json:"helm,omitempty"`
	// Chart is a Helm chart name, and must be specified for applications sourced from a Helm repo.
	Chart string `json:"chart,omitempty"`
	// Ref is reference to another source within sources field. This field will not be used if used with a `source` tag.
	Ref string `json:"ref,omitempty"`
}

type ApplicationSourceHelm added in v1.4.0

type ApplicationSourceHelm struct {
	// ValuesFiles is a list of Helm value files to use when generating a template
	ValueFiles []string `json:"valueFiles,omitempty"`
	// Parameters is a list of Helm parameters which are passed to the helm template command upon manifest generation
	Parameters []HelmParameter `json:"parameters,omitempty"`
	// ReleaseName is the Helm release name to use. If omitted it will use the application name
	ReleaseName string `json:"releaseName,omitempty"`
	// Values specifies Helm values to be passed to helm template, typically defined as a block
	Values string `json:"values,omitempty"`
	// FileParameters are file parameters to the helm template
	FileParameters []HelmFileParameter `json:"fileParameters,omitempty"`
	// Version is the Helm version to use for templating ("3")
	Version string `json:"version,omitempty"`
	// PassCredentials pass credentials to all domains (Helm's --pass-credentials)
	PassCredentials bool `json:"passCredentials,omitempty"`
	// IgnoreMissingValueFiles prevents helm template from failing when valueFiles do not exist locally by not appending them to helm template --values
	IgnoreMissingValueFiles bool `json:"ignoreMissingValueFiles,omitempty"`
	// SkipCrds skips custom resource definition installation step (Helm's --skip-crds)
	SkipCrds bool `json:"skipCrds,omitempty"`
}

ApplicationSourceHelm holds helm specific options

type ApplicationSpec added in v1.4.0

type ApplicationSpec struct {
	Destination *Destination         `json:"destination,omitempty"`
	Source      *ApplicationSource   `json:"source,omitempty"`
	SyncPolicy  *SyncPolicyAutomated `json:"syncPolicy,omitempty"`
}

type ArgoCDSpec added in v1.4.0

type ArgoCDSpec struct {
	Metadata ApplicationMetadata `json:"metadata"`
	Spec     ApplicationSpec     `json:"spec"`
}

func (*ArgoCDSpec) SetApplicationObjectClusterId added in v1.4.0

func (a *ArgoCDSpec) SetApplicationObjectClusterId(clusterId int)

type Automated added in v1.4.0

type Automated struct {
	Prune bool `json:"prune"`
}

type Backoff added in v1.4.0

type Backoff struct {
	// Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h")
	Duration string `json:"duration,omitempty"`
	// Factor is a factor to multiply the base duration after each failed retry
	Factor *int64 `json:"factor,omitempty"`
	// MaxDuration is the maximum amount of time allowed for the backoff strategy
	MaxDuration string `json:"maxDuration,omitempty"`
}

Backoff is the backoff strategy to use on subsequent retries for failing syncs

type DeploymentConfig

type DeploymentConfig struct {
	Id                   int
	AppId                int
	EnvironmentId        int
	ConfigType           string
	DeploymentAppType    string
	ReleaseMode          string
	RepoURL              string // DEPRECATED;
	RepoName             string
	Active               bool
	ReleaseConfiguration *ReleaseConfiguration
}

func (*DeploymentConfig) GetAcdAppName added in v1.4.0

func (d *DeploymentConfig) GetAcdAppName() string

func (*DeploymentConfig) GetApplicationObjectClusterId added in v1.4.0

func (d *DeploymentConfig) GetApplicationObjectClusterId() int

func (*DeploymentConfig) GetApplicationObjectNamespace added in v1.4.0

func (d *DeploymentConfig) GetApplicationObjectNamespace() string

func (*DeploymentConfig) GetChartLocation added in v1.4.0

func (d *DeploymentConfig) GetChartLocation() string

func (*DeploymentConfig) GetDestinationClusterURL added in v1.4.0

func (d *DeploymentConfig) GetDestinationClusterURL() string

func (*DeploymentConfig) GetDestinationNamespace added in v1.4.0

func (d *DeploymentConfig) GetDestinationNamespace() string

func (*DeploymentConfig) GetMigratedFrom added in v1.4.0

func (d *DeploymentConfig) GetMigratedFrom() (migratedFrom ExternalReleaseType, isLinked bool)

func (*DeploymentConfig) GetRepoURL added in v1.4.0

func (d *DeploymentConfig) GetRepoURL() string

func (*DeploymentConfig) GetRevision added in v1.4.0

func (d *DeploymentConfig) GetRevision() string

func (*DeploymentConfig) GetTargetRevision added in v1.4.0

func (d *DeploymentConfig) GetTargetRevision() string

func (*DeploymentConfig) GetValuesFileName added in v1.4.0

func (d *DeploymentConfig) GetValuesFileName() string

func (*DeploymentConfig) GetValuesFilePathForCommit added in v1.8.0

func (d *DeploymentConfig) GetValuesFilePathForCommit() string

func (*DeploymentConfig) IsAcdRelease added in v1.4.0

func (d *DeploymentConfig) IsAcdRelease() bool

func (*DeploymentConfig) IsArgoAppCreationRequired added in v1.4.0

func (d *DeploymentConfig) IsArgoAppCreationRequired(deploymentAppCreated bool) bool

func (*DeploymentConfig) IsArgoAppPatchSupported added in v1.4.0

func (d *DeploymentConfig) IsArgoAppPatchSupported() bool

func (*DeploymentConfig) IsArgoAppSyncAndRefreshSupported added in v1.4.0

func (d *DeploymentConfig) IsArgoAppSyncAndRefreshSupported() bool

func (*DeploymentConfig) IsArgoCdClientSupported added in v1.4.0

func (d *DeploymentConfig) IsArgoCdClientSupported() bool

func (*DeploymentConfig) IsEmpty added in v1.4.0

func (d *DeploymentConfig) IsEmpty() bool

func (*DeploymentConfig) IsFluxCDRelease added in v1.8.0

func (d *DeploymentConfig) IsFluxCDRelease() bool

func (*DeploymentConfig) IsFluxRelease added in v1.8.0

func (d *DeploymentConfig) IsFluxRelease() bool

func (*DeploymentConfig) IsLinkedRelease added in v1.4.0

func (d *DeploymentConfig) IsLinkedRelease() bool

func (*DeploymentConfig) IsPipelineGitOpsRepoConfigured added in v1.4.0

func (d *DeploymentConfig) IsPipelineGitOpsRepoConfigured(isAppLevelGitOpsConfigured bool) bool

func (*DeploymentConfig) SetApplicationObjectClusterId added in v1.4.0

func (d *DeploymentConfig) SetApplicationObjectClusterId(id int)

func (*DeploymentConfig) SetChartLocation added in v1.4.0

func (d *DeploymentConfig) SetChartLocation(chartLocation string)

func (*DeploymentConfig) SetRepoURL added in v1.4.0

func (d *DeploymentConfig) SetRepoURL(repoURL string) *DeploymentConfig

type DeploymentConfigCredentialType

type DeploymentConfigCredentialType string
const (
	GitOps DeploymentConfigCredentialType = "gitOps"
)

func (DeploymentConfigCredentialType) String

type DeploymentConfigMin added in v1.4.0

type DeploymentConfigMin struct {
	DeploymentAppType      string
	ReleaseMode            string
	GitRepoUrl             string
	IsGitOpsRepoConfigured bool
}

func (*DeploymentConfigMin) IsLinkedRelease added in v1.4.0

func (d *DeploymentConfigMin) IsLinkedRelease() bool

type DeploymentConfigSelector

type DeploymentConfigSelector struct {
	AppId         int
	EnvironmentId int
	CDPipelineId  int
}

type DeploymentConfigType

type DeploymentConfigType string
const (
	CUSTOM           DeploymentConfigType = "custom"
	SYSTEM_GENERATED DeploymentConfigType = "system_generated"
)

func (DeploymentConfigType) String

func (d DeploymentConfigType) String() string

type Destination added in v1.4.0

type Destination struct {
	Namespace string `json:"namespace,omitempty"` // deployed application namespace
	Server    string `json:"server,omitempty"`    // deployed application cluster url
}

type DevtronArgoCdAppInfo added in v1.4.0

type DevtronArgoCdAppInfo struct {
	ArgoCdAppName    string
	ArgoAppClusterId int
	ArgoAppNamespace string
}

type ExternalReleaseType added in v1.4.0

type ExternalReleaseType string
const (
	ArgoApplication ExternalReleaseType = "argoApplication"
	HelmRelease     ExternalReleaseType = "helmRelease"
	Undefined       ExternalReleaseType = ""
)

func (ExternalReleaseType) IsArgoApplication added in v1.4.0

func (e ExternalReleaseType) IsArgoApplication() bool

type FluxCDSpec added in v1.8.0

type FluxCDSpec struct {
	ClusterId              int    `json:"clusterId"`
	HelmReleaseNamespace   string `json:"helmReleaseNamespace"`
	GitRepositoryName      string `json:"gitRepositoryName"`
	GitRepositoryNamespace string `json:"gitRepositoryNamespace"`
	HelmReleaseName        string `json:"helmReleaseName"`
	GitOpsSecretName       string `json:"gitOpsSecretName"` //fmt.Sprintf("devtron-flux-secret-%d", gitOpsConfig.Id)

	ChartLocation          string   `json:"chartLocation"`
	ChartVersion           string   `json:"chartVersion"`
	RevisionTarget         string   `json:"revisionTarget"`
	RepoUrl                string   `json:"repoUrl"`
	DevtronValueFile       string   `json:"devtronValueFile"`
	HelmReleaseValuesFiles []string `json:"helmReleaseValuesFiles"` //getValuesFileArr
	ExtFluxValues          string   `json:"extFluxValues"`
}

func (*FluxCDSpec) GetFinalValuesFilePathArray added in v1.8.0

func (f *FluxCDSpec) GetFinalValuesFilePathArray() []string

type HelmFileParameter added in v1.4.0

type HelmFileParameter struct {
	// Name is the name of the Helm parameter
	Name string `json:"name,omitempty"`
	// Path is the path to the file containing the values for the Helm parameter
	Path string `json:"path,omitempty"`
}

HelmFileParameter is a file parameter that's passed to helm template during manifest generation

type HelmParameter added in v1.4.0

type HelmParameter struct {
	// Name is the name of the Helm parameter
	Name string `json:"name,omitempty"`
	// Value is the value for the Helm parameter
	Value string `json:"value,omitempty"`
	// ForceString determines whether to tell Helm to interpret booleans and numbers as strings
	ForceString bool `json:"forceString,omitempty"`
}

type ManagedNamespaceMetadata added in v1.4.0

type ManagedNamespaceMetadata struct {
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
}

type ReleaseConfigVersion added in v1.4.0

type ReleaseConfigVersion string
const (
	Version ReleaseConfigVersion = "v1.0.0"
)

type ReleaseConfiguration added in v1.4.0

type ReleaseConfiguration struct {
	Version    ReleaseConfigVersion `json:"version"`
	ArgoCDSpec ArgoCDSpec           `json:"argoCDSpec"`
	FluxCDSpec FluxCDSpec           `json:"fluxCDSpec"`
}

type RetryStrategy added in v1.4.0

type RetryStrategy struct {
	// Limit is the maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed.
	Limit int64 `json:"limit,omitempty"`
	// Backoff controls how to backoff on subsequent retries of failed syncs
	Backoff *Backoff `json:"backoff,omitempty"`
}

RetryStrategy contains information about the strategy to apply when a sync failed

type SyncOptions added in v1.4.0

type SyncOptions []string

type SyncPolicy added in v1.4.0

type SyncPolicy struct {
	Automated                *SyncPolicyAutomated      `json:"automated,omitempty"`
	SyncOptions              SyncOptions               `json:"syncOptions,omitempty"`
	Retry                    *RetryStrategy            `json:"retry,omitempty"`
	ManagedNamespaceMetadata *ManagedNamespaceMetadata `json:"managedNamespaceMetadata,omitempty"`
}

type SyncPolicyAutomated added in v1.4.0

type SyncPolicyAutomated struct {
	Prune      bool `json:"prune,omitempty"`
	SelfHeal   bool `json:"selfHeal,omitempty"`
	AllowEmpty bool `json:"allowEmpty,omitempty"`
}

type UniqueDeploymentConfigIdentifier

type UniqueDeploymentConfigIdentifier string

func GetConfigUniqueIdentifier

func GetConfigUniqueIdentifier(appId, envId int) UniqueDeploymentConfigIdentifier

func (*UniqueDeploymentConfigIdentifier) GetAppAndEnvId

func (u *UniqueDeploymentConfigIdentifier) GetAppAndEnvId() (appId, envId int)

func (UniqueDeploymentConfigIdentifier) String

Jump to

Keyboard shortcuts

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