Documentation
¶
Index ¶
- Constants
- Variables
- func FeatureFlagEnabled(flag FeatureFlag) bool
- type AnalysisExpected
- type AnalysisHTTP
- type AnalysisHTTPHeader
- type AnalysisLog
- type AnalysisMetrics
- type AnalysisProviderDatadogConfig
- type AnalysisProviderPrometheusConfig
- type AnalysisProviderStackdriverConfig
- type AnalysisStageOptions
- type AnalysisTemplateRef
- type AnalysisTemplateSpec
- type Attachment
- type ChainApplicationMatcher
- type Config
- type ControlPlaneCache
- type ControlPlaneDataStore
- type ControlPlaneFileStore
- type ControlPlaneInsightCollector
- type ControlPlaneProject
- type ControlPlaneSpec
- type CustomSyncOptions
- type DataStoreFireStoreConfig
- type DataStoreMySQLConfig
- type DeploymentChain
- type DeploymentChainTriggerCondition
- type DeploymentCommitMatcher
- type DeploymentNotification
- type DeploymentPipeline
- type DeploymentPlanner
- type DriftDetection
- type Duration
- type EventWatcherConfig
- type EventWatcherEvent
- type EventWatcherHandler
- type EventWatcherHandlerConfig
- type EventWatcherHandlerType
- type EventWatcherMatcher
- type EventWatcherReplacement
- type EventWatcherSpec
- type FeatureFlag
- type FileStoreGCSConfig
- type FileStoreMinioConfig
- type FileStoreS3Config
- type GenericApplicationSpec
- type HelmChartRegistry
- type HelmChartRegistryType
- type HelmChartRepository
- type HelmChartRepositoryType
- type InsightCollectorApplication
- type InsightCollectorDeployment
- type Kind
- type KubernetesAppStateInformer
- type KubernetesResourceMatcher
- type LauncherConfig
- type LauncherSpec
- type NotificationMention
- type NotificationReceiver
- type NotificationReceiverSlack
- type NotificationReceiverWebhook
- type NotificationRoute
- type Notifications
- type OnChain
- type OnCommand
- type OnCommit
- type OnOutOfSync
- type Percentage
- type PipedAnalysisProvider
- type PipedDeployTarget
- type PipedEventWatcher
- type PipedEventWatcherGitRepo
- type PipedGit
- type PipedPlatformProvider
- type PipedPlugin
- type PipedRepository
- type PipedSpec
- func (s *PipedSpec) Clone() (*PipedSpec, error)
- func (s *PipedSpec) EnableDefaultKubernetesPlatformProvider()
- func (s *PipedSpec) FindPlatformProvider(name string, t model.ApplicationKind) (PipedPlatformProvider, bool)
- func (s *PipedSpec) FindPlatformProvidersByLabels(labels map[string]string, t model.ApplicationKind) []PipedPlatformProvider
- func (s *PipedSpec) GetAnalysisProvider(name string) (PipedAnalysisProvider, bool)
- func (s *PipedSpec) GetRepository(id string) (PipedRepository, bool)
- func (s *PipedSpec) GetRepositoryMap() map[string]PipedRepository
- func (s *PipedSpec) GitHelmChartRepositories() []HelmChartRepository
- func (s *PipedSpec) HTTPHelmChartRepositories() []HelmChartRepository
- func (s *PipedSpec) HasPlatformProvider(name string, t model.ApplicationKind) bool
- func (s *PipedSpec) IsInsecureChartRepository(name string) bool
- func (s *PipedSpec) LoadPipedKey() ([]byte, error)
- func (s *PipedSpec) Mask()
- func (s *PipedSpec) UnmarshalJSON(data []byte) error
- func (s *PipedSpec) Validate() error
- type PipelineStage
- type PlatformProviderCloudRunConfig
- type PlatformProviderECSConfig
- type PlatformProviderKubernetesConfig
- type PlatformProviderLambdaConfig
- type PlatformProviderTerraformConfig
- type PostSync
- type ProjectStaticUser
- type Replicas
- type SecretEncryption
- type SecretManagement
- type SecretManagementGCPKMS
- type SecretManagementKeyPair
- type SharedSSOConfig
- type SkipOptions
- type Spec
- type TemplatableAnalysisHTTP
- type TemplatableAnalysisLog
- type TemplatableAnalysisMetrics
- type Trigger
- type WaitApprovalStageOptions
- type WaitStageOptions
Constants ¶
const ( AnalysisStrategyThreshold = "THRESHOLD" AnalysisStrategyPrevious = "PREVIOUS" AnalysisStrategyCanaryBaseline = "CANARY_BASELINE" AnalysisStrategyCanaryPrimary = "CANARY_PRIMARY" AnalysisDeviationEither = "EITHER" AnalysisDeviationHigh = "HIGH" AnalysisDeviationLow = "LOW" )
const ( VersionV1Beta1 = "pipecd.dev/v1beta1" )
const (
// EventWatcherHandlerTypeGitUpdate represents the handler type for git updating.
EventWatcherHandlerTypeGitUpdate = "GIT_UPDATE"
)
Variables ¶
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
func FeatureFlagEnabled ¶
func FeatureFlagEnabled(flag FeatureFlag) bool
Types ¶
type AnalysisExpected ¶
AnalysisExpected defines the range used for metrics analysis.
func (*AnalysisExpected) InRange ¶
func (e *AnalysisExpected) InRange(value float64) bool
InRange returns true if the given value is within the range.
func (*AnalysisExpected) String ¶
func (e *AnalysisExpected) String() string
func (*AnalysisExpected) Validate ¶
func (e *AnalysisExpected) Validate() error
type AnalysisHTTP ¶
type AnalysisHTTP struct { URL string `json:"url"` Method string `json:"method"` // Custom headers to set in the request. HTTP allows repeated headers. Headers []AnalysisHTTPHeader `json:"headers"` ExpectedCode int `json:"expectedCode"` ExpectedResponse string `json:"expectedResponse"` Interval Duration `json:"interval"` // Maximum number of failed checks before the response is considered as failure. FailureLimit int `json:"failureLimit"` // If true, it considers as success when no data returned from the analysis provider. // Default is false. SkipOnNoData bool `json:"skipOnNoData"` Timeout Duration `json:"timeout"` }
AnalysisHTTP contains common configurable values for deployment analysis with http.
func (*AnalysisHTTP) Validate ¶
func (a *AnalysisHTTP) Validate() error
type AnalysisHTTPHeader ¶
type AnalysisLog ¶
type AnalysisLog struct { Query string `json:"query"` Interval Duration `json:"interval"` // Maximum number of failed checks before the query result is considered as failure. FailureLimit int `json:"failureLimit"` // If true, it considers as success when no data returned from the analysis provider. // Default is false. SkipOnNoData bool `json:"skipOnNoData"` // How long after which the query times out. Timeout Duration `json:"timeout"` Provider string `json:"provider"` }
AnalysisLog contains common configurable values for deployment analysis with log.
func (*AnalysisLog) Validate ¶
func (a *AnalysisLog) Validate() error
type AnalysisMetrics ¶
type AnalysisMetrics struct { // The strategy name. One of THRESHOLD or PREVIOUS or CANARY_BASELINE or CANARY_PRIMARY is available. // Defaults to THRESHOLD. Strategy string `json:"strategy" default:"THRESHOLD"` // The unique name of provider defined in the Piped Configuration. // Required field. Provider string `json:"provider"` // A query performed against the Analysis Provider. // Required field. Query string `json:"query"` // The expected query result. // Required field for the THRESHOLD strategy. Expected AnalysisExpected `json:"expected"` // Run a query at this intervals. // Required field. Interval Duration `json:"interval"` // Acceptable number of failures. For instance, If 1 is set, // the analysis will be considered a failure after 2 failures. // Default is 0. FailureLimit int `json:"failureLimit"` // If true, it considers as a success when no data returned from the analysis provider. // Default is false. SkipOnNoData bool `json:"skipOnNoData"` // How long after which the query times out. // Default is 30s. Timeout Duration `json:"timeout" default:"30s"` // The stage fails on deviation in the specified direction. One of LOW or HIGH or EITHER is available. // This can be used only for PREVIOUS, CANARY_BASELINE or CANARY_PRIMARY. Defaults to EITHER. Deviation string `json:"deviation" default:"EITHER"` // The custom arguments to be populated for the Canary query. // They can be referred as {{ .VariantArgs.xxx }}. CanaryArgs map[string]string `json:"canaryArgs"` // The custom arguments to be populated for the Baseline query. // They can be referred as {{ .VariantArgs.xxx }}. BaselineArgs map[string]string `json:"baselineArgs"` // The custom arguments to be populated for the Primary query. // They can be referred as {{ .VariantArgs.xxx }}. PrimaryArgs map[string]string `json:"primaryArgs"` }
AnalysisMetrics contains common configurable values for deployment analysis with metrics.
func (*AnalysisMetrics) Validate ¶
func (m *AnalysisMetrics) Validate() error
type AnalysisProviderDatadogConfig ¶
type AnalysisProviderDatadogConfig struct { // The address of Datadog API server. // Only "datadoghq.com", "us3.datadoghq.com", "datadoghq.eu", "ddog-gov.com" are available. // Defaults to "datadoghq.com" Address string `json:"address,omitempty"` // Required: The path to the api key file. APIKeyFile string `json:"apiKeyFile"` // Required: The path to the application key file. ApplicationKeyFile string `json:"applicationKeyFile"` // Base64 API Key for Datadog API server. APIKeyData string `json:"apiKeyData,omitempty"` // Base64 Application Key for Datadog API server. ApplicationKeyData string `json:"applicationKeyData,omitempty"` }
func (*AnalysisProviderDatadogConfig) Mask ¶
func (a *AnalysisProviderDatadogConfig) Mask()
func (*AnalysisProviderDatadogConfig) Validate ¶
func (a *AnalysisProviderDatadogConfig) Validate() error
type AnalysisProviderPrometheusConfig ¶
type AnalysisProviderPrometheusConfig struct { Address string `json:"address"` // The path to the username file. UsernameFile string `json:"usernameFile,omitempty"` // The path to the password file. PasswordFile string `json:"passwordFile,omitempty"` }
func (*AnalysisProviderPrometheusConfig) Mask ¶
func (a *AnalysisProviderPrometheusConfig) Mask()
func (*AnalysisProviderPrometheusConfig) Validate ¶
func (a *AnalysisProviderPrometheusConfig) Validate() error
type AnalysisProviderStackdriverConfig ¶
type AnalysisProviderStackdriverConfig struct { // The path to the service account file. ServiceAccountFile string `json:"serviceAccountFile"` }
func (*AnalysisProviderStackdriverConfig) Mask ¶
func (a *AnalysisProviderStackdriverConfig) Mask()
func (*AnalysisProviderStackdriverConfig) Validate ¶
func (a *AnalysisProviderStackdriverConfig) Validate() error
type AnalysisStageOptions ¶
type AnalysisStageOptions struct { // How long the analysis process should be executed. Duration Duration `json:"duration,omitempty"` // TODO: Consider about how to handle a pod restart // possible count of pod restarting RestartThreshold int `json:"restartThreshold,omitempty"` Metrics []TemplatableAnalysisMetrics `json:"metrics,omitempty"` Logs []TemplatableAnalysisLog `json:"logs,omitempty"` HTTPS []TemplatableAnalysisHTTP `json:"https,omitempty"` SkipOn SkipOptions `json:"skipOn,omitempty"` }
AnalysisStageOptions contains all configurable values for a K8S_ANALYSIS stage.
func (*AnalysisStageOptions) Validate ¶
func (a *AnalysisStageOptions) Validate() error
type AnalysisTemplateRef ¶
type AnalysisTemplateRef struct { Name string `json:"name"` AppArgs map[string]string `json:"appArgs"` }
func (*AnalysisTemplateRef) Validate ¶
func (a *AnalysisTemplateRef) Validate() error
type AnalysisTemplateSpec ¶
type AnalysisTemplateSpec struct { Metrics map[string]AnalysisMetrics `json:"metrics"` Logs map[string]AnalysisLog `json:"logs"` HTTPS map[string]AnalysisHTTP `json:"https"` }
func LoadAnalysisTemplate ¶
func LoadAnalysisTemplate(repoRoot string) (*AnalysisTemplateSpec, error)
LoadAnalysisTemplate finds the config file for the analysis template in the .pipe directory first up. And returns parsed config, ErrNotFound is returned if not found.
func (*AnalysisTemplateSpec) Validate ¶
func (s *AnalysisTemplateSpec) Validate() error
type Attachment ¶
type Attachment struct { // Map of name to refer with the file path which contain embedding source data. Sources map[string]string `json:"sources"` // List of files to be embedded before using. Targets []string `json:"targets"` }
func (*Attachment) Validate ¶
func (a *Attachment) Validate() error
type ChainApplicationMatcher ¶
type ChainApplicationMatcher struct { Name string `json:"name"` Kind string `json:"kind"` Labels map[string]string `json:"labels"` }
ChainApplicationMatcher provides filters used to find the right applications to trigger as a part of the deployment chain.
func (*ChainApplicationMatcher) Validate ¶
func (m *ChainApplicationMatcher) Validate() error
type Config ¶
Config represents configuration data load from file. The spec is depend on the kind of configuration.
func DecodeYAML ¶
DecodeYAML unmarshals config YAML data to config struct. It also validates the configuration after decoding.
func LoadFromYAML ¶
LoadFromYAML reads and decodes a yaml file to construct the Config.
func (*Config[T, RT]) UnmarshalJSON ¶
type ControlPlaneCache ¶
type ControlPlaneCache struct {
TTL Duration `json:"ttl"`
}
func (ControlPlaneCache) TTLDuration ¶
func (c ControlPlaneCache) TTLDuration() time.Duration
type ControlPlaneDataStore ¶
type ControlPlaneDataStore struct { // The datastore type. Type model.DataStoreType // The configuration in the case of Cloud Firestore. FirestoreConfig *DataStoreFireStoreConfig // The configuration in the case of general MySQL. MySQLConfig *DataStoreMySQLConfig }
func (*ControlPlaneDataStore) UnmarshalJSON ¶
func (d *ControlPlaneDataStore) UnmarshalJSON(data []byte) error
type ControlPlaneFileStore ¶
type ControlPlaneFileStore struct { // The filestore type. Type model.FileStoreType // The configuration in the case of Google Cloud Storage. GCSConfig *FileStoreGCSConfig `json:"gcs"` // The configuration in the case of Amazon S3. S3Config *FileStoreS3Config `json:"s3"` // The configuration in the case of Minio. MinioConfig *FileStoreMinioConfig `json:"minio"` }
func (*ControlPlaneFileStore) UnmarshalJSON ¶
func (f *ControlPlaneFileStore) UnmarshalJSON(data []byte) error
type ControlPlaneInsightCollector ¶
type ControlPlaneInsightCollector struct { Application InsightCollectorApplication `json:"application"` Deployment InsightCollectorDeployment `json:"deployment"` }
type ControlPlaneProject ¶
type ControlPlaneProject struct { // The unique identifier of the project. ID string `json:"id"` // The description about the project. Desc string `json:"desc"` // Static admin account of the project. StaticAdmin ProjectStaticUser `json:"staticAdmin"` }
type ControlPlaneSpec ¶
type ControlPlaneSpec struct { // The address to the control plane. // This is required if SSO is enabled. Address string `json:"address"` // A randomly generated string used to sign oauth state. StateKey string `json:"stateKey"` // The configuration of datastore for control plane. Datastore ControlPlaneDataStore `json:"datastore"` // The configuration of filestore for control plane. Filestore ControlPlaneFileStore `json:"filestore"` // The configuration of cache for control plane. Cache ControlPlaneCache `json:"cache"` // The configuration of insight collector. InsightCollector ControlPlaneInsightCollector `json:"insightCollector"` // List of debugging/quickstart projects defined in Control Plane configuration. // Please note that do not use this to configure the projects running in the production. Projects []ControlPlaneProject `json:"projects"` SharedSSOConfigs []SharedSSOConfig `json:"sharedSSOConfigs"` }
ControlPlaneSpec defines all configuration for all control-plane components.
func (*ControlPlaneSpec) FindProject ¶
func (s *ControlPlaneSpec) FindProject(id string) (ControlPlaneProject, bool)
FindProject finds and returns a specific project in the configured list.
func (*ControlPlaneSpec) ProjectMap ¶
func (s *ControlPlaneSpec) ProjectMap() map[string]ControlPlaneProject
func (*ControlPlaneSpec) SharedSSOConfigMap ¶
func (s *ControlPlaneSpec) SharedSSOConfigMap() map[string]*model.ProjectSSOConfig
func (*ControlPlaneSpec) Validate ¶
func (s *ControlPlaneSpec) Validate() error
type CustomSyncOptions ¶
type CustomSyncOptions struct { Timeout Duration `json:"timeout" default:"6h"` Envs map[string]string `json:"envs"` Run string `json:"run"` }
func (*CustomSyncOptions) Validate ¶
func (c *CustomSyncOptions) Validate() error
type DataStoreFireStoreConfig ¶
type DataStoreFireStoreConfig struct { // The root path element considered as a logical namespace, e.g. `pipecd`. Namespace string `json:"namespace"` // The second path element considered as a logical environment, e.g. `dev`. // All pipecd collections will have path formatted according to `{namespace}/{environment}/{collection-name}`. Environment string `json:"environment"` // The prefix for collection name. // This can be used to avoid conflicts with existing collections in your Firestore database. CollectionNamePrefix string `json:"collectionNamePrefix"` // The name of GCP project hosting the Firestore. Project string `json:"project"` // The path to the service account file for accessing Firestores. CredentialsFile string `json:"credentialsFile"` }
type DataStoreMySQLConfig ¶
type DataStoreMySQLConfig struct { // The url of MySQL. All of credentials can be specified via this field. URL string `json:"url"` // The name of the database. // For those who don't want to include the database in the URL. Database string `json:"database"` // The path to the username file. // For those who don't want to include the username in the URL. UsernameFile string `json:"usernameFile"` // The path to the password file. // For those who don't want to include the password in the URL. PasswordFile string `json:"passwordFile"` }
type DeploymentChain ¶
type DeploymentChain struct { // ApplicationMatchers provides list of ChainApplicationMatcher which contain filters to be used // to find applications to deploy as chain node. It's required to not empty. ApplicationMatchers []ChainApplicationMatcher `json:"applications"` }
DeploymentChain provides all configurations used to trigger a chain of deployments.
func (*DeploymentChain) Validate ¶
func (dc *DeploymentChain) Validate() error
type DeploymentChainTriggerCondition ¶
type DeploymentChainTriggerCondition struct {
CommitPrefix string `json:"commitPrefix"`
}
func (*DeploymentChainTriggerCondition) Validate ¶
func (c *DeploymentChainTriggerCondition) Validate() error
type DeploymentCommitMatcher ¶
type DeploymentCommitMatcher struct { // It makes sure to perform syncing if the commit message matches this regular expression. QuickSync string `json:"quickSync"` // It makes sure to perform pipeline if the commit message matches this regular expression. Pipeline string `json:"pipeline"` }
DeploymentCommitMatcher provides a way to decide how to deploy.
type DeploymentNotification ¶
type DeploymentNotification struct { // List of users to be notified for each event. Mentions []NotificationMention `json:"mentions"` }
DeploymentNotification represents the way to send to users or groups.
func (*DeploymentNotification) FindSlackGroups ¶
func (n *DeploymentNotification) FindSlackGroups(event model.NotificationEventType) []string
FindSlackGroups returns a list of slack group IDs to be mentioned for the given event.
func (*DeploymentNotification) FindSlackUsers ¶
func (n *DeploymentNotification) FindSlackUsers(event model.NotificationEventType) []string
FindSlackUsers returns a list of slack user IDs to be mentioned for the given event.
type DeploymentPipeline ¶
type DeploymentPipeline struct {
Stages []PipelineStage `json:"stages"`
}
DeploymentPipeline represents the way to deploy the application. The pipeline is triggered by changes in any of the following objects: - Target PodSpec (Target can be Deployment, DaemonSet, StatefulSet) - ConfigMaps, Secrets that are mounted as volumes or envs in the deployment.
type DeploymentPlanner ¶
type DeploymentPlanner struct { // Disable auto-detecting to use QUICK_SYNC or PROGRESSIVE_SYNC. // Always use the speficied pipeline for all deployments. AlwaysUsePipeline bool `json:"alwaysUsePipeline"` // Automatically reverts all deployment changes on failure. // Default is true. AutoRollback *bool `json:"autoRollback,omitempty" default:"true"` }
type DriftDetection ¶
type DriftDetection struct { // IgnoreFields are a list of 'apiVersion:kind:namespace:name#fieldPath' IgnoreFields []string `json:"ignoreFields"` }
func (*DriftDetection) Validate ¶
func (dd *DriftDetection) Validate() error
type EventWatcherConfig ¶
type EventWatcherConfig struct { // Matcher represents which event will be handled. Matcher EventWatcherMatcher `json:"matcher"` // Handler represents how the matched event will be handled. Handler EventWatcherHandler `json:"handler"` }
type EventWatcherEvent ¶
type EventWatcherEvent struct { // The event name. Name string `json:"name"` // Additional attributes of event. This can make an event definition // unique even if the one with the same name exists. Labels map[string]string `json:"labels"` // List of places where will be replaced when the new event matches. Replacements []EventWatcherReplacement `json:"replacements"` }
EventWatcherEvent defines which file will be replaced when the given event happened.
func (*EventWatcherEvent) Validate ¶
func (e *EventWatcherEvent) Validate() error
type EventWatcherHandler ¶
type EventWatcherHandler struct { // The handler type of event watcher. Type EventWatcherHandlerType `json:"type,omitempty"` // The config for event watcher handler. Config EventWatcherHandlerConfig `json:"config"` }
type EventWatcherHandlerConfig ¶
type EventWatcherHandlerConfig struct { // The commit message used to push after replacing values. // Default message is used if not given. CommitMessage string `json:"commitMessage,omitempty"` // Whether to create a new branch or not when event watcher commits changes. MakePullRequest bool `json:"makePullRequest,omitempty"` // List of places where will be replaced when the new event matches. Replacements []EventWatcherReplacement `json:"replacements"` }
type EventWatcherHandlerType ¶
type EventWatcherHandlerType string
EventWatcherHandlerType represents the type of an event watcher handler.
type EventWatcherMatcher ¶
type EventWatcherReplacement ¶
type EventWatcherReplacement struct { // The path to the file to be updated. File string `json:"file"` // The field to be updated. Only one of these can be used. // // The YAML path to the field to be updated. It requires to start // with `$` which represents the root element. e.g. `$.foo.bar[0].baz`. YAMLField string `json:"yamlField"` // The JSON path to the field to be updated. JSONField string `json:"jsonField"` // The HCL path to the field to be updated. HCLField string `json:"HCLField"` // The regex string specifying what should be replaced. // Only the first capturing group enclosed by `()` will be replaced with the new value. // e.g. "host.xz/foo/bar:(v[0-9].[0-9].[0-9])" Regex string `json:"regex"` }
type EventWatcherSpec ¶
type EventWatcherSpec struct {
Events []EventWatcherEvent `json:"events"`
}
func LoadEventWatcher ¶
func LoadEventWatcher(repoRoot string, includePatterns, excludePatterns []string) (*EventWatcherSpec, error)
LoadEventWatcher gives back parsed EventWatcher config after merging config files placed under the .pipe directory. With "includes" and "excludes", you can filter the files included the result. "excludes" are prioritized if both "excludes" and "includes" are given. ErrNotFound is returned if not found.
func (*EventWatcherSpec) Validate ¶
func (s *EventWatcherSpec) Validate() error
type FeatureFlag ¶
type FeatureFlag string
const (
FeatureFlagInsights FeatureFlag = "PIPECD_FEATURE_FLAG_INSIGHTS"
)
type FileStoreGCSConfig ¶
type FileStoreMinioConfig ¶
type FileStoreMinioConfig struct { // The address of Minio. Endpoint string `json:"endpoint"` // The bucket name to store. Bucket string `json:"bucket"` // The path to the access key file. AccessKeyFile string `json:"accessKeyFile"` // The path to the secret key file. SecretKeyFile string `json:"secretKeyFile"` // Whether the given bucket should be made automatically if not exists. AutoCreateBucket bool `json:"autoCreateBucket"` }
type FileStoreS3Config ¶
type FileStoreS3Config struct { // The bucket name to store artifacts and logs in the piped. Bucket string `json:"bucket"` // The aws region of S3 bucket. Region string `json:"region"` // The aws profile name. Profile string `json:"profile"` // The path to the credentials file for accessing AWS. CredentialsFile string `json:"credentialsFile"` // The IAM role arn to use when assuming an role. RoleARN string `json:"roleARN"` // Path to the WebIdentity token the SDK should use to assume a role with. TokenFile string `json:"tokenFile"` }
type GenericApplicationSpec ¶
type GenericApplicationSpec struct { // The application name. // This is required if you set the application through the application configuration file. Name string `json:"name"` // Additional attributes to identify applications. Labels map[string]string `json:"labels"` // Notes on the Application. Description string `json:"description"` // Configuration used while planning deployment. Planner DeploymentPlanner `json:"planner"` // Forcibly use QuickSync or Pipeline when commit message matched the specified pattern. CommitMatcher DeploymentCommitMatcher `json:"commitMatcher"` // Pipeline for deploying progressively. Pipeline *DeploymentPipeline `json:"pipeline"` // The trigger configuration use to determine trigger logic. Trigger Trigger `json:"trigger"` // Configuration to be used once the deployment is triggered successfully. PostSync *PostSync `json:"postSync"` // The maximum length of time to execute deployment before giving up. // Default is 6h. Timeout Duration `json:"timeout,omitempty" default:"6h"` // List of encrypted secrets and targets that should be decoded before using. Encryption *SecretEncryption `json:"encryption"` // List of files that should be attached to application manifests before using. Attachment *Attachment `json:"attachment"` // Additional configuration used while sending notification to external services. DeploymentNotification *DeploymentNotification `json:"notification"` // List of the configuration for event watcher. EventWatcher []EventWatcherConfig `json:"eventWatcher"` // Configuration for drift detection DriftDetection *DriftDetection `json:"driftDetection"` }
func (GenericApplicationSpec) GetStage ¶
func (s GenericApplicationSpec) GetStage(index int32) (PipelineStage, bool)
func (GenericApplicationSpec) GetStageByte ¶
func (s GenericApplicationSpec) GetStageByte(index int32) ([]byte, bool)
func (GenericApplicationSpec) HasStage ¶
func (s GenericApplicationSpec) HasStage(stage model.Stage) bool
HasStage checks if the given stage is included in the pipeline.
func (*GenericApplicationSpec) Validate ¶
func (s *GenericApplicationSpec) Validate() error
type HelmChartRegistry ¶
type HelmChartRegistry struct { // The registry type. Currently, only OCI is supported. Type HelmChartRegistryType `json:"type" default:"OCI"` // The address to the Helm chart registry. Address string `json:"address"` // Username used for the registry authentication. Username string `json:"username,omitempty"` // Password used for the registry authentication. Password string `json:"password,omitempty"` }
func (*HelmChartRegistry) IsOCI ¶
func (r *HelmChartRegistry) IsOCI() bool
func (*HelmChartRegistry) Mask ¶
func (r *HelmChartRegistry) Mask()
func (*HelmChartRegistry) Validate ¶
func (r *HelmChartRegistry) Validate() error
type HelmChartRegistryType ¶
type HelmChartRegistryType string
const (
OCIHelmChartRegistry HelmChartRegistryType = "OCI"
)
The registry types that hosts Helm charts.
type HelmChartRepository ¶
type HelmChartRepository struct { // The repository type. Currently, HTTP and GIT are supported. // Default is HTTP. Type HelmChartRepositoryType `json:"type" default:"HTTP"` // Configuration for HTTP type. // The name of the Helm chart repository. Name string `json:"name,omitempty"` // The address to the Helm chart repository. Address string `json:"address,omitempty"` // Username used for the repository backed by HTTP basic authentication. Username string `json:"username,omitempty"` // Password used for the repository backed by HTTP basic authentication. Password string `json:"password,omitempty"` // Whether to skip TLS certificate checks for the repository or not. Insecure bool `json:"insecure"` // Configuration for GIT type. // Remote address of the Git repository used to clone Helm charts. // e.g. git@github.com:org/repo.git GitRemote string `json:"gitRemote,omitempty"` // The path to the private ssh key file used while cloning Helm charts from above Git repository. SSHKeyFile string `json:"sshKeyFile,omitempty"` }
func (*HelmChartRepository) IsGitRepository ¶
func (r *HelmChartRepository) IsGitRepository() bool
func (*HelmChartRepository) IsHTTPRepository ¶
func (r *HelmChartRepository) IsHTTPRepository() bool
func (*HelmChartRepository) Mask ¶
func (r *HelmChartRepository) Mask()
func (*HelmChartRepository) Validate ¶
func (r *HelmChartRepository) Validate() error
type HelmChartRepositoryType ¶
type HelmChartRepositoryType string
const ( HTTPHelmChartRepository HelmChartRepositoryType = "HTTP" GITHelmChartRepository HelmChartRepositoryType = "GIT" )
type Kind ¶
type Kind string
Kind represents the kind of configuration the data contains.
const ( // KindKubernetesApp represents application configuration for a Kubernetes application. // This application can be a group of plain-YAML Kubernetes manifests, // or kustomization manifests or helm manifests. // // Deprecated: use KindApplication instead. KindKubernetesApp Kind = "KubernetesApp" // KindTerraformApp represents application configuration for a Terraform application. // This application contains a single workspace of a terraform root module. // // Deprecated: use KindApplication instead. KindTerraformApp Kind = "TerraformApp" // KindLambdaApp represents application configuration for an AWS Lambda application. // // Deprecated: use KindApplication instead. KindLambdaApp Kind = "LambdaApp" // KindCloudRunApp represents application configuration for a CloudRun application. // // Deprecated: use KindApplication instead. KindCloudRunApp Kind = "CloudRunApp" // KindECSApp represents application configuration for an AWS ECS. // // Deprecated: use KindApplication instead. KindECSApp Kind = "ECSApp" // KindApplication represents a generic application configuration. KindApplication Kind = "Application" )
const ( // KindPiped represents configuration for piped. // This configuration will be loaded while the piped is starting up. KindPiped Kind = "Piped" // KindControlPlane represents configuration for control plane's services. KindControlPlane Kind = "ControlPlane" // KindAnalysisTemplate represents shared analysis template for a repository. // This configuration file should be placed in .pipe directory // at the root of the repository. KindAnalysisTemplate Kind = "AnalysisTemplate" // KindEventWatcher represents configuration for Event Watcher. KindEventWatcher Kind = "EventWatcher" )
type KubernetesAppStateInformer ¶
type KubernetesAppStateInformer struct { // Only watches the specified namespace. // Empty means watching all namespaces. Namespace string `json:"namespace,omitempty"` // List of resources that should be added to the watching targets. IncludeResources []KubernetesResourceMatcher `json:"includeResources,omitempty"` // List of resources that should be ignored from the watching targets. ExcludeResources []KubernetesResourceMatcher `json:"excludeResources,omitempty"` }
type LauncherConfig ¶
type LauncherConfig struct { Kind Kind `json:"kind"` APIVersion string `json:"apiVersion,omitempty"` Spec LauncherSpec `json:"spec"` }
func (*LauncherConfig) Validate ¶
func (c *LauncherConfig) Validate() error
type LauncherSpec ¶
type LauncherSpec struct { // The identifier of the PipeCD project where this piped belongs to. ProjectID string // The unique identifier generated for this piped. PipedID string // The path to the file containing the generated Key string for this piped. PipedKeyFile string // Base64 encoded string of Piped key. PipedKeyData string // The address used to connect to the control-plane's API. APIAddress string `json:"apiAddress"` }
func (*LauncherSpec) LoadPipedKey ¶
func (s *LauncherSpec) LoadPipedKey() ([]byte, error)
type NotificationMention ¶
type NotificationMention struct { // The event to be notified to users. Event string `json:"event"` // Deprecated: Please use SlackUsers instead // List of user IDs for mentioning in Slack. // See https://api.slack.com/reference/surfaces/formatting#mentioning-users // for more information on how to check them. Slack []string `json:"slack"` // List of user IDs for mentioning in Slack. // See https://api.slack.com/reference/surfaces/formatting#mentioning-users // for more information on how to check them. SlackUsers []string `json:"slackusers,omitempty"` // List of group IDs for mentioning in Slack. // See https://api.slack.com/reference/surfaces/formatting#mentioning-groups // for more information on how to check them. SlackGroups []string `json:"slackgroups,omitempty"` // TODO: Support for email notification // The email for notification. Email []string `json:"email"` }
func (*NotificationMention) Validate ¶
func (n *NotificationMention) Validate() error
type NotificationReceiver ¶
type NotificationReceiver struct { Name string `json:"name"` Slack *NotificationReceiverSlack `json:"slack,omitempty"` Webhook *NotificationReceiverWebhook `json:"webhook,omitempty"` }
func (*NotificationReceiver) Mask ¶
func (n *NotificationReceiver) Mask()
type NotificationReceiverSlack ¶
type NotificationReceiverSlack struct { HookURL string `json:"hookURL"` OAuthToken string `json:"oauthToken"` // Deprecated: use OAuthTokenData instead. OAuthTokenData string `json:"oauthTokenData"` OAuthTokenFile string `json:"oauthTokenFile"` ChannelID string `json:"channelID"` MentionedAccounts []string `json:"mentionedAccounts,omitempty"` MentionedGroups []string `json:"mentionedGroups,omitempty"` }
func (*NotificationReceiverSlack) Mask ¶
func (n *NotificationReceiverSlack) Mask()
func (*NotificationReceiverSlack) Validate ¶
func (n *NotificationReceiverSlack) Validate() error
type NotificationReceiverWebhook ¶
type NotificationReceiverWebhook struct { URL string `json:"url"` SignatureKey string `json:"signatureKey,omitempty" default:"PipeCD-Signature"` SignatureValue string `json:"signatureValue,omitempty"` SignatureValueFile string `json:"signatureValueFile,omitempty"` }
func (*NotificationReceiverWebhook) LoadSignatureValue ¶
func (n *NotificationReceiverWebhook) LoadSignatureValue() (string, error)
func (*NotificationReceiverWebhook) Mask ¶
func (n *NotificationReceiverWebhook) Mask()
type NotificationRoute ¶
type NotificationRoute struct { Name string `json:"name"` Receiver string `json:"receiver"` Events []string `json:"events,omitempty"` IgnoreEvents []string `json:"ignoreEvents,omitempty"` Groups []string `json:"groups,omitempty"` IgnoreGroups []string `json:"ignoreGroups,omitempty"` Apps []string `json:"apps,omitempty"` IgnoreApps []string `json:"ignoreApps,omitempty"` Labels map[string]string `json:"labels,omitempty"` IgnoreLabels map[string]string `json:"ignoreLabels,omitempty"` }
type Notifications ¶
type Notifications struct { // List of notification routes. Routes []NotificationRoute `json:"routes,omitempty"` // List of notification receivers. Receivers []NotificationReceiver `json:"receivers,omitempty"` }
func (*Notifications) Mask ¶
func (n *Notifications) Mask()
type OnChain ¶
type OnChain struct { // Whether to exclude application from triggering target // when received a new CHAIN_SYNC command. // Default is true. Disabled *bool `json:"disabled,omitempty" default:"true"` }
type OnCommand ¶
type OnCommand struct { // Whether to exclude application from triggering target // when received a new SYNC command. // Default is false. Disabled bool `json:"disabled,omitempty"` }
type OnCommit ¶
type OnCommit struct { // Whether to exclude application from triggering target // when a new commit touched the application. // Default is false. Disabled bool `json:"disabled,omitempty"` // List of directories or files where their changes will trigger the deployment. // Regular expression can be used. Paths []string `json:"paths,omitempty"` // List of directories or files where their changes will be ignored. // Regular expression can be used. Ignores []string `json:"ignores,omitempty"` }
type OnOutOfSync ¶
type OnOutOfSync struct { // Whether to exclude application from triggering target // when application is at OUT_OF_SYNC state. // Default is true. Disabled *bool `json:"disabled,omitempty" default:"true"` // Minimum amount of time must be elapsed since the last deployment. // This can be used to avoid triggering unnecessary continuous deployments based on OUT_OF_SYNC status. MinWindow Duration `json:"minWindow,omitempty" default:"5m"` }
type Percentage ¶
func (Percentage) Int ¶
func (p Percentage) Int() int
func (Percentage) MarshalJSON ¶
func (p Percentage) MarshalJSON() ([]byte, error)
func (Percentage) MarshalYAML ¶
func (p Percentage) MarshalYAML() (interface{}, error)
func (Percentage) String ¶
func (p Percentage) String() string
func (*Percentage) UnmarshalJSON ¶
func (p *Percentage) UnmarshalJSON(b []byte) error
type PipedAnalysisProvider ¶
type PipedAnalysisProvider struct { Name string `json:"name"` Type model.AnalysisProviderType `json:"type"` PrometheusConfig *AnalysisProviderPrometheusConfig DatadogConfig *AnalysisProviderDatadogConfig StackdriverConfig *AnalysisProviderStackdriverConfig }
func (*PipedAnalysisProvider) MarshalJSON ¶
func (p *PipedAnalysisProvider) MarshalJSON() ([]byte, error)
func (*PipedAnalysisProvider) Mask ¶
func (p *PipedAnalysisProvider) Mask()
func (*PipedAnalysisProvider) UnmarshalJSON ¶
func (p *PipedAnalysisProvider) UnmarshalJSON(data []byte) error
func (*PipedAnalysisProvider) Validate ¶
func (p *PipedAnalysisProvider) Validate() error
type PipedDeployTarget ¶
type PipedDeployTarget struct { // The name of the deploy target. Name string `json:"name"` // The labes of the deploy target. Labels map[string]string `json:"labels,omitempty"` // The configuration of the deploy target. Config json.RawMessage `json:"config"` }
PipedDeployTarget defines the deploy target configuration for the piped.
type PipedEventWatcher ¶
type PipedEventWatcher struct { // Interval to fetch the latest event and compare it with one defined in EventWatcher config files CheckInterval Duration `json:"checkInterval,omitempty"` // The configuration list of git repositories to be observed. // Only the repositories in this list will be observed by Piped. GitRepos []PipedEventWatcherGitRepo `json:"gitRepos,omitempty"` }
func (*PipedEventWatcher) Validate ¶
func (p *PipedEventWatcher) Validate() error
type PipedEventWatcherGitRepo ¶
type PipedEventWatcherGitRepo struct { // Id of the git repository. This must be unique within // the repos' elements. RepoID string `json:"repoId,omitempty"` // The commit message used to push after replacing values. // Default message is used if not given. CommitMessage string `json:"commitMessage,omitempty"` // The file path patterns to be included. // Patterns can be used like "foo/*.yaml". Includes []string `json:"includes,omitempty"` // The file path patterns to be excluded. // Patterns can be used like "foo/*.yaml". // This is prioritized if both includes and this one are given. Excludes []string `json:"excludes,omitempty"` }
type PipedGit ¶
type PipedGit struct { // The username that will be configured for `git` user. // Default is "piped". Username string `json:"username,omitempty"` // The email that will be configured for `git` user. // Default is "pipecd.dev@gmail.com". Email string `json:"email,omitempty"` // Where to write ssh config file. // Default is "$HOME/.ssh/config". SSHConfigFilePath string `json:"sshConfigFilePath,omitempty"` // The host name. // e.g. github.com, gitlab.com // Default is "github.com". Host string `json:"host,omitempty"` // The hostname or IP address of the remote git server. // e.g. github.com, gitlab.com // Default is the same value with Host. HostName string `json:"hostName,omitempty"` // The path to the private ssh key file. // This will be used to clone the source code of the specified git repositories. SSHKeyFile string `json:"sshKeyFile,omitempty"` // Base64 encoded string of ssh-key. SSHKeyData string `json:"sshKeyData,omitempty"` // Base64 encoded string of password. // This will be used to clone the source repo with https basic auth. Password string `json:"password,omitempty"` }
func (*PipedGit) DecodedPassword ¶
func (PipedGit) LoadSSHKey ¶
func (PipedGit) ShouldConfigureSSHConfig ¶
type PipedPlatformProvider ¶
type PipedPlatformProvider struct { Name string `json:"name"` Type model.PlatformProviderType `json:"type"` Labels map[string]string `json:"labels,omitempty"` KubernetesConfig *PlatformProviderKubernetesConfig TerraformConfig *PlatformProviderTerraformConfig CloudRunConfig *PlatformProviderCloudRunConfig LambdaConfig *PlatformProviderLambdaConfig ECSConfig *PlatformProviderECSConfig }
func (*PipedPlatformProvider) MarshalJSON ¶
func (p *PipedPlatformProvider) MarshalJSON() ([]byte, error)
func (*PipedPlatformProvider) Mask ¶
func (p *PipedPlatformProvider) Mask()
func (*PipedPlatformProvider) UnmarshalJSON ¶
func (p *PipedPlatformProvider) UnmarshalJSON(data []byte) error
type PipedPlugin ¶
type PipedPlugin struct { // The name of the plugin. Name string `json:"name"` // The port which the plugin listens to. Port int `json:"port"` // The deploy target names. DeployTargets []PipedDeployTarget `json:"deployTargets,omitempty"` }
PipedPlugin defines the plugin configuration for the piped.
type PipedRepository ¶
type PipedRepository struct { // Unique identifier for this repository. // This must be unique in the piped scope. RepoID string `json:"repoId"` // Remote address of the repository used to clone the source code. // e.g. git@github.com:org/repo.git Remote string `json:"remote"` // The branch will be handled. Branch string `json:"branch"` }
type PipedSpec ¶
type PipedSpec struct { // The identifier of the PipeCD project where this piped belongs to. ProjectID string `json:"projectID"` // The unique identifier generated for this piped. PipedID string `json:"pipedID"` // The path to the file containing the generated Key string for this piped. PipedKeyFile string `json:"pipedKeyFile,omitempty"` // Base64 encoded string of Piped key. PipedKeyData string `json:"pipedKeyData,omitempty"` // The name of this piped. Name string `json:"name,omitempty"` // The address used to connect to the control-plane's API. APIAddress string `json:"apiAddress"` // The address to the control-plane's Web. WebAddress string `json:"webAddress,omitempty"` // How often to check whether an application should be synced. // Default is 1m. SyncInterval Duration `json:"syncInterval,omitempty" default:"1m"` // How often to check whether an application configuration file should be synced. // Default is 1m. AppConfigSyncInterval Duration `json:"appConfigSyncInterval,omitempty" default:"1m"` // Git configuration needed for git commands. Git PipedGit `json:"git,omitempty"` // List of git repositories this piped will handle. Repositories []PipedRepository `json:"repositories,omitempty"` // List of helm chart repositories that should be added while starting up. ChartRepositories []HelmChartRepository `json:"chartRepositories,omitempty"` // List of helm chart registries that should be logged in while starting up. ChartRegistries []HelmChartRegistry `json:"chartRegistries,omitempty"` // List of cloud providers can be used by this piped. // Deprecated: use PlatformProvider instead. CloudProviders []PipedPlatformProvider `json:"cloudProviders,omitempty"` // List of platform providers can be used by this piped. PlatformProviders []PipedPlatformProvider `json:"platformProviders,omitempty"` // List of plugiin configs Plugins []PipedPlugin `json:"plugins,omitempty"` // List of analysis providers can be used by this piped. AnalysisProviders []PipedAnalysisProvider `json:"analysisProviders,omitempty"` // Sending notification to Slack, Webhook… Notifications Notifications `json:"notifications"` // What secret management method should be used. SecretManagement *SecretManagement `json:"secretManagement,omitempty"` // Optional settings for event watcher. EventWatcher PipedEventWatcher `json:"eventWatcher"` // List of labels to filter all applications this piped will handle. AppSelector map[string]string `json:"appSelector,omitempty"` }
PipedSpec contains configurable data used to while running Piped.
func (*PipedSpec) EnableDefaultKubernetesPlatformProvider ¶
func (s *PipedSpec) EnableDefaultKubernetesPlatformProvider()
EnableDefaultKubernetesPlatformProvider adds the default kubernetes cloud provider if it was not specified.
func (*PipedSpec) FindPlatformProvider ¶
func (s *PipedSpec) FindPlatformProvider(name string, t model.ApplicationKind) (PipedPlatformProvider, bool)
FindPlatformProvider finds and returns a Platform Provider by name and type.
func (*PipedSpec) FindPlatformProvidersByLabels ¶
func (s *PipedSpec) FindPlatformProvidersByLabels(labels map[string]string, t model.ApplicationKind) []PipedPlatformProvider
FindPlatformProvidersByLabels finds all PlatformProviders which match the provided labels.
func (*PipedSpec) GetAnalysisProvider ¶
func (s *PipedSpec) GetAnalysisProvider(name string) (PipedAnalysisProvider, bool)
GetAnalysisProvider finds and returns an Analysis Provider config whose name is the given string.
func (*PipedSpec) GetRepository ¶
func (s *PipedSpec) GetRepository(id string) (PipedRepository, bool)
GetRepository finds a repository with the given ID from the configured list.
func (*PipedSpec) GetRepositoryMap ¶
func (s *PipedSpec) GetRepositoryMap() map[string]PipedRepository
GetRepositoryMap returns a map of repositories where key is repo id.
func (*PipedSpec) GitHelmChartRepositories ¶
func (s *PipedSpec) GitHelmChartRepositories() []HelmChartRepository
func (*PipedSpec) HTTPHelmChartRepositories ¶
func (s *PipedSpec) HTTPHelmChartRepositories() []HelmChartRepository
func (*PipedSpec) HasPlatformProvider ¶
func (s *PipedSpec) HasPlatformProvider(name string, t model.ApplicationKind) bool
HasPlatformProvider checks whether the given provider is configured or not.
func (*PipedSpec) IsInsecureChartRepository ¶
func (*PipedSpec) LoadPipedKey ¶
func (*PipedSpec) UnmarshalJSON ¶
type PipelineStage ¶
type PipelineStage struct { ID string `json:"id"` Name model.Stage `json:"name"` Desc string `json:"desc,omitempty"` Timeout Duration `json:"timeout"` With json.RawMessage `json:"with"` }
PipelineStage represents a single stage of a pipeline. This is used as a generic struct for all stage type.
type PlatformProviderCloudRunConfig ¶
type PlatformProviderCloudRunConfig struct { // The GCP project hosting the CloudRun service. Project string `json:"project"` // The region of running CloudRun service. Region string `json:"region"` // The path to the service account file for accessing CloudRun service. CredentialsFile string `json:"credentialsFile,omitempty"` }
func (*PlatformProviderCloudRunConfig) Mask ¶
func (c *PlatformProviderCloudRunConfig) Mask()
type PlatformProviderECSConfig ¶
type PlatformProviderECSConfig struct { // The region to send requests to. This parameter is required. // e.g. "us-west-2" // A full list of regions is: https://docs.aws.amazon.com/general/latest/gr/rande.html Region string `json:"region"` // Path to the shared credentials file. CredentialsFile string `json:"credentialsFile,omitempty"` // The IAM role arn to use when assuming an role. RoleARN string `json:"roleARN,omitempty"` // Path to the WebIdentity token the SDK should use to assume a role with. TokenFile string `json:"tokenFile,omitempty"` // AWS Profile to extract credentials from the shared credentials file. // If empty, the environment variable "AWS_PROFILE" is used. // "default" is populated if the environment variable is also not set. Profile string `json:"profile,omitempty"` }
func (*PlatformProviderECSConfig) Mask ¶
func (c *PlatformProviderECSConfig) Mask()
type PlatformProviderKubernetesConfig ¶
type PlatformProviderKubernetesConfig struct { // The master URL of the kubernetes cluster. // Empty means in-cluster. MasterURL string `json:"masterURL,omitempty"` // The path to the kubeconfig file. // Empty means in-cluster. KubeConfigPath string `json:"kubeConfigPath,omitempty"` // Configuration for application resource informer. AppStateInformer KubernetesAppStateInformer `json:"appStateInformer"` // Version of kubectl will be used. KubectlVersion string `json:"kubectlVersion"` }
type PlatformProviderLambdaConfig ¶
type PlatformProviderLambdaConfig struct { // The region to send requests to. This parameter is required. // e.g. "us-west-2" // A full list of regions is: https://docs.aws.amazon.com/general/latest/gr/rande.html Region string `json:"region"` // Path to the shared credentials file. CredentialsFile string `json:"credentialsFile,omitempty"` // The IAM role arn to use when assuming an role. RoleARN string `json:"roleARN,omitempty"` // Path to the WebIdentity token the SDK should use to assume a role with. TokenFile string `json:"tokenFile,omitempty"` // AWS Profile to extract credentials from the shared credentials file. // If empty, the environment variable "AWS_PROFILE" is used. // "default" is populated if the environment variable is also not set. Profile string `json:"profile,omitempty"` }
func (*PlatformProviderLambdaConfig) Mask ¶
func (c *PlatformProviderLambdaConfig) Mask()
type PlatformProviderTerraformConfig ¶
type PlatformProviderTerraformConfig struct { // List of variables that will be set directly on terraform commands with "-var" flag. // The variable must be formatted by "key=value" as below: // "image_id=ami-abc123" // 'image_id_list=["ami-abc123","ami-def456"]' // 'image_id_map={"us-east-1":"ami-abc123","us-east-2":"ami-def456"}' Vars []string `json:"vars,omitempty"` // Enable drift detection. // TODO: This is a temporary option because Terraform drift detection is buggy and has performance issues. This will be possibly removed in the future release. DriftDetectionEnabled *bool `json:"driftDetectionEnabled" default:"true"` }
type PostSync ¶
type PostSync struct {
DeploymentChain *DeploymentChain `json:"chain"`
}
PostSync provides all configurations to be used once the current deployment is triggered successfully.
type ProjectStaticUser ¶
type SecretEncryption ¶
type SecretEncryption struct { // List of encrypted secrets. EncryptedSecrets map[string]string `json:"encryptedSecrets"` // List of files to be decrypted before using. DecryptionTargets []string `json:"decryptionTargets"` }
func (*SecretEncryption) Validate ¶
func (e *SecretEncryption) Validate() error
type SecretManagement ¶
type SecretManagement struct { // Which management service should be used. // Available values: KEY_PAIR, GCP_KMS, AWS_KMS Type model.SecretManagementType `json:"type"` KeyPair *SecretManagementKeyPair GCPKMS *SecretManagementGCPKMS }
func (*SecretManagement) MarshalJSON ¶
func (s *SecretManagement) MarshalJSON() ([]byte, error)
func (*SecretManagement) Mask ¶
func (s *SecretManagement) Mask()
func (*SecretManagement) UnmarshalJSON ¶
func (s *SecretManagement) UnmarshalJSON(data []byte) error
func (*SecretManagement) Validate ¶
func (s *SecretManagement) Validate() error
type SecretManagementGCPKMS ¶
type SecretManagementGCPKMS struct { // Configurable fields when using Google Cloud KMS. // The key name used for decrypting the sealed secret. KeyName string `json:"keyName"` // The path to the service account used to decrypt secret. DecryptServiceAccountFile string `json:"decryptServiceAccountFile"` // The path to the service account used to encrypt secret. EncryptServiceAccountFile string `json:"encryptServiceAccountFile"` }
func (*SecretManagementGCPKMS) Mask ¶
func (s *SecretManagementGCPKMS) Mask()
func (*SecretManagementGCPKMS) Validate ¶
func (s *SecretManagementGCPKMS) Validate() error
type SecretManagementKeyPair ¶
type SecretManagementKeyPair struct { // The path to the private RSA key file. PrivateKeyFile string `json:"privateKeyFile"` // Base64 encoded string of private key. PrivateKeyData string `json:"privateKeyData,omitempty"` // The path to the public RSA key file. PublicKeyFile string `json:"publicKeyFile"` // Base64 encoded string of public key. PublicKeyData string `json:"publicKeyData,omitempty"` }
func (*SecretManagementKeyPair) LoadPrivateKey ¶
func (s *SecretManagementKeyPair) LoadPrivateKey() ([]byte, error)
func (*SecretManagementKeyPair) LoadPublicKey ¶
func (s *SecretManagementKeyPair) LoadPublicKey() ([]byte, error)
func (*SecretManagementKeyPair) Mask ¶
func (s *SecretManagementKeyPair) Mask()
func (*SecretManagementKeyPair) Validate ¶
func (s *SecretManagementKeyPair) Validate() error
type SharedSSOConfig ¶
type SharedSSOConfig struct {}
func (*SharedSSOConfig) UnmarshalJSON ¶
func (s *SharedSSOConfig) UnmarshalJSON(data []byte) error
type SkipOptions ¶
type SkipOptions struct { CommitMessagePrefixes []string `json:"commitMessagePrefixes,omitempty"` Paths []string `json:"paths,omitempty"` }
SkipOptions contains all configurable values for skipping a stage.
type Spec ¶
Spec[T] represents both of follows - the type is pointer type of T - the type has Validate method
type TemplatableAnalysisHTTP ¶
type TemplatableAnalysisHTTP struct { AnalysisHTTP Template AnalysisTemplateRef `json:"template"` }
TemplatableAnalysisHTTP wraps AnalysisHTTP to allow specify template to use.
type TemplatableAnalysisLog ¶
type TemplatableAnalysisLog struct { AnalysisLog Template AnalysisTemplateRef `json:"template"` }
TemplatableAnalysisLog wraps AnalysisLog to allow specify template to use.
type TemplatableAnalysisMetrics ¶
type TemplatableAnalysisMetrics struct { AnalysisMetrics Template AnalysisTemplateRef `json:"template"` }
TemplatableAnalysisMetrics wraps AnalysisMetrics to allow specify template to use.
type Trigger ¶
type Trigger struct { // Configurable fields used while deciding the application // should be triggered or not based on commit changes. OnCommit OnCommit `json:"onCommit"` // Configurable fields used while deciding the application // should be triggered or not based on received SYNC command. OnCommand OnCommand `json:"onCommand"` // Configurable fields used while deciding the application // should be triggered or not based on OUT_OF_SYNC state. OnOutOfSync OnOutOfSync `json:"onOutOfSync"` // Configurable fields used while deciding the application // should be triggered based on received CHAIN_SYNC command. OnChain OnChain `json:"onChain"` }
type WaitApprovalStageOptions ¶
type WaitApprovalStageOptions struct { // The maximum length of time to wait before giving up. // Defaults to 6h. Timeout Duration `json:"timeout" default:"6h"` Approvers []string `json:"approvers"` MinApproverNum int `json:"minApproverNum" default:"1"` SkipOn SkipOptions `json:"skipOn,omitempty"` }
WaitStageOptions contains all configurable values for a WAIT_APPROVAL stage.
func (*WaitApprovalStageOptions) Validate ¶
func (w *WaitApprovalStageOptions) Validate() error
type WaitStageOptions ¶
type WaitStageOptions struct { Duration Duration `json:"duration"` SkipOn SkipOptions `json:"skipOn,omitempty"` }
WaitStageOptions contains all configurable values for a WAIT stage.