Documentation
¶
Index ¶
- Constants
- Variables
- func IfStep(action Action, fn func(s *Step))
- func IfTrigger(action Action, fn func(t *Trigger))
- func ScriptForInput(input []string) string
- type Action
- type ActionMetadata
- type ActionMetadataManager
- type ActionStatus
- type ActionStatusGetterManager
- type ActionStatusManager
- type ActionStatusProcessState
- type ActionStatusSetterManager
- type ActionStatusWhenCondition
- type ActionType
- type Condition
- type ConditionEvaluationResult
- type ConditionGetterManager
- type ConditionManager
- type ConditionSetterManager
- type Connection
- type ConnectionManager
- type DecoratorType
- type DeploymentEnvironment
- type Entrypoint
- type Environment
- type EnvironmentGetterManager
- type EnvironmentManager
- type EnvironmentSetterManager
- type EnvironmentVariable
- type Event
- type EventManager
- type Hash
- type LogManager
- type MetadataManagers
- type Parameter
- type ParameterGetterManager
- type ParameterManager
- type ParameterSetterManager
- type Run
- type RunReconcilerManagers
- type SchemaValidationResult
- type Secret
- type SecretManager
- type Spec
- type SpecGetterManager
- type SpecManager
- type SpecSetterManager
- type State
- type StateGetterManager
- type StateManager
- type StateSetterManager
- type StatusProperty
- type Step
- type StepDecorator
- type StepDecoratorManager
- type StepMessage
- type StepMessageGetterManager
- type StepMessageManager
- type StepMessageSetterManager
- type StepOutput
- type StepOutputGetterManager
- type StepOutputManager
- type StepOutputMetadata
- type StepOutputSetterManager
- type Trigger
- type WebhookTriggerReconcilerManagers
- type WhenConditionStatus
- type WorkflowRun
- type WorkflowRunManager
Constants ¶
View Source
const ( EntrypointCommand = "entrypoint" EntrypointCommandFlag = "-entrypoint" EntrypointCommandArgSeparator = "--" )
View Source
const ( DefaultImage = "alpine:latest" DefaultCommand = "echo" InputScriptMountPath = "/var/run/puppet/relay/config" InputScriptName = "input-script" // TODO Consider configuration options for runtime tools ToolsCommandInitialize = "initialize" ToolsImage = "us-docker.pkg.dev/puppet-relay-contrib-oss/relay-core/relay-runtime-tools:latest" ToolsMountName = "relay-tools" ToolsMountPath = "/var/lib/puppet/relay" ToolsSource = "/ko-app/relay-runtime-tools" )
View Source
const ( RelayDomainIDAnnotation = "relay.sh/domain-id" RelayTenantIDAnnotation = "relay.sh/tenant-id" RelayVaultEngineMountAnnotation = "relay.sh/vault-engine-mount" RelayVaultSecretPathAnnotation = "relay.sh/vault-secret-path" RelayVaultConnectionPathAnnotation = "relay.sh/vault-connection-path" RelayControllerTokenHashAnnotation = "controller.relay.sh/token-hash" RelayControllerTenantNameLabel = "controller.relay.sh/tenant-name" RelayControllerTenantWorkloadLabel = "controller.relay.sh/tenant-workload" RelayControllerWorkflowRunIDLabel = "controller.relay.sh/run-id" RelayControllerWebhookTriggerIDLabel = "controller.relay.sh/webhook-trigger-id" RelayInstallerNameLabel = "install.relay.sh/relay-core" RelayAppNameLabel = "app.kubernetes.io/name" RelayAppInstanceLabel = "app.kubernetes.io/instance" RelayAppComponentLabel = "app.kubernetes.io/component" RelayAppManagedByLabel = "app.kubernetes.io/managed-by" )
View Source
const ( Shebang = "#!" DefaultInterpreter = Shebang + "/bin/sh" )
View Source
const ActionPodStepContainerName = "step-step"
ActionPodStepContainerName is used to set the container name for step and trigger on all action pods.
TODO: move all references of "step-step" to this const
Variables ¶
View Source
var ( ActionTypeStep = ActionType{Singular: "step", Plural: "steps"} ActionTypeTrigger = ActionType{Singular: "trigger", Plural: "triggers"} )
View Source
var ( ErrNotFound = errors.New("model: not found") ErrRejected = errors.New("model: rejected") ErrConflict = errors.New("model: conflict") )
View Source
var ( DeploymentEnvironmentDevelopment = DeploymentEnvironment{ // contains filtered or unexported fields } DeploymentEnvironmentTest = DeploymentEnvironment{ // contains filtered or unexported fields } DeploymentEnvironments = map[string]DeploymentEnvironment{ DeploymentEnvironmentDevelopment.Name(): DeploymentEnvironmentDevelopment, DeploymentEnvironmentTest.Name(): DeploymentEnvironmentTest, } )
Functions ¶
func ScriptForInput ¶
Types ¶
type Action ¶
type Action interface { Type() ActionType Hash() Hash }
type ActionMetadata ¶
type ActionMetadata struct {
Image string
}
type ActionMetadataManager ¶
type ActionMetadataManager interface {
Get(ctx context.Context) (*ActionMetadata, error)
}
type ActionStatus ¶
type ActionStatus struct { Name string ProcessState *ActionStatusProcessState WhenCondition *ActionStatusWhenCondition }
func (*ActionStatus) Failed ¶
func (as *ActionStatus) Failed() (bool, error)
func (*ActionStatus) IsStatusProperty ¶
func (as *ActionStatus) IsStatusProperty(property StatusProperty) (bool, error)
func (*ActionStatus) Skipped ¶
func (as *ActionStatus) Skipped() (bool, error)
func (*ActionStatus) Succeeded ¶
func (as *ActionStatus) Succeeded() (bool, error)
type ActionStatusGetterManager ¶
type ActionStatusGetterManager interface { List(ctx context.Context) ([]*ActionStatus, error) Get(ctx context.Context, action Action) (*ActionStatus, error) }
type ActionStatusManager ¶
type ActionStatusManager interface { ActionStatusGetterManager ActionStatusSetterManager }
type ActionStatusSetterManager ¶
type ActionStatusSetterManager interface {
Set(ctx context.Context, ss *ActionStatus) error
}
type ActionStatusWhenCondition ¶
type ActionStatusWhenCondition struct { Timestamp time.Time WhenConditionStatus WhenConditionStatus }
type ActionType ¶
type ConditionEvaluationResult ¶
type ConditionEvaluationResult struct {
Expression any
}
type ConditionGetterManager ¶
type ConditionManager ¶
type ConditionManager interface { ConditionGetterManager ConditionSetterManager }
type ConditionSetterManager ¶
type Connection ¶
type ConnectionManager ¶
type ConnectionManager interface { List(ctx context.Context) ([]*Connection, error) Get(ctx context.Context, typ, name string) (*Connection, error) }
type DecoratorType ¶
type DecoratorType string
const ( // DecoratorTypeLink is a reference to a URI. This informs a UI to display // the decorator as a link. DecoratorTypeLink DecoratorType = "link" )
type DeploymentEnvironment ¶
type DeploymentEnvironment struct {
// contains filtered or unexported fields
}
func (DeploymentEnvironment) Name ¶
func (e DeploymentEnvironment) Name() string
func (DeploymentEnvironment) SecureLogging ¶
func (e DeploymentEnvironment) SecureLogging() bool
func (DeploymentEnvironment) Timeout ¶
func (e DeploymentEnvironment) Timeout() time.Duration
type Entrypoint ¶
type Environment ¶
type EnvironmentGetterManager ¶
type EnvironmentGetterManager interface { // Get retrieves the environment for this action, if any. Get(ctx context.Context) (*Environment, error) }
type EnvironmentManager ¶
type EnvironmentManager interface { EnvironmentGetterManager EnvironmentSetterManager }
type EnvironmentVariable ¶
type EnvironmentVariable string
const ( EnvironmentVariableDefaultTimeout EnvironmentVariable = "RELAY_DEFAULT_TIMEOUT" EnvironmentVariableEnableSecureLogging EnvironmentVariable = "RELAY_ENABLE_SECURE_LOGGING" EnvironmentVariableMetadataAPIURL EnvironmentVariable = "METADATA_API_URL" )
func (EnvironmentVariable) String ¶
func (ev EnvironmentVariable) String() string
type EventManager ¶
type Hash ¶
Hash wraps the result of a SHA-1 checksum operation. It is different than hashutil.Sum so that it can be used as a map key.
func (Hash) HexEncoding ¶
type LogManager ¶
type MetadataManagers ¶
type MetadataManagers interface { ActionStatus() ActionStatusManager Conditions() ConditionGetterManager Connections() ConnectionManager Events() EventManager Environment() EnvironmentGetterManager Parameters() ParameterGetterManager Logs() LogManager Secrets() SecretManager Spec() SpecGetterManager State() StateGetterManager ActionMetadata() ActionMetadataManager StepDecorators() StepDecoratorManager StepMessages() StepMessageManager StepOutputs() StepOutputManager WorkflowRuns() WorkflowRunManager }
MetadataManagers are the managers used by actions accessing the metadata service.
type ParameterGetterManager ¶
type ParameterManager ¶
type ParameterManager interface { ParameterGetterManager ParameterSetterManager }
type ParameterSetterManager ¶
type RunReconcilerManagers ¶
type RunReconcilerManagers interface { Conditions() ConditionSetterManager Parameters() ParameterSetterManager Environment() EnvironmentSetterManager Spec() SpecSetterManager State() StateSetterManager }
RunReconcilerManagers are the managers used by the run reconciler when setting up a new run.
type SchemaValidationResult ¶
type SchemaValidationResult struct {
Expression any
}
type SecretManager ¶
type SpecGetterManager ¶
type SpecManager ¶
type SpecManager interface { SpecGetterManager SpecSetterManager }
type SpecSetterManager ¶
type StateGetterManager ¶
type StateManager ¶
type StateManager interface { StateGetterManager StateSetterManager }
type StateSetterManager ¶
type StatusProperty ¶
type StatusProperty string
const ( StatusPropertyFailed StatusProperty = "failed" StatusPropertySkipped StatusProperty = "skipped" StatusPropertySucceeded StatusProperty = "succeeded" )
func (StatusProperty) String ¶
func (sp StatusProperty) String() string
type StepDecorator ¶
type StepDecorator struct { Step *Step Name string Value relayv1beta1.Decorator }
type StepDecoratorManager ¶
type StepMessage ¶
type StepMessage struct { ID string Details string Time time.Time ConditionEvaluationResult *ConditionEvaluationResult SchemaValidationResult *SchemaValidationResult }
type StepMessageGetterManager ¶
type StepMessageGetterManager interface {
List(ctx context.Context) ([]*StepMessage, error)
}
type StepMessageManager ¶
type StepMessageManager interface { StepMessageGetterManager StepMessageSetterManager }
type StepMessageSetterManager ¶
type StepMessageSetterManager interface {
Set(ctx context.Context, sm *StepMessage) error
}
type StepOutput ¶
type StepOutput struct { Step *Step Name string Value interface{} Metadata *StepOutputMetadata }
type StepOutputGetterManager ¶
type StepOutputGetterManager interface { List(ctx context.Context) ([]*StepOutput, error) ListSelf(ctx context.Context) ([]*StepOutput, error) Get(ctx context.Context, stepName, name string) (*StepOutput, error) }
type StepOutputManager ¶
type StepOutputManager interface { StepOutputGetterManager StepOutputSetterManager }
type StepOutputMetadata ¶
type StepOutputMetadata struct {
Sensitive bool
}
type StepOutputSetterManager ¶
type Trigger ¶
type Trigger struct {
Name string
}
func (*Trigger) Type ¶
func (*Trigger) Type() ActionType
type WebhookTriggerReconcilerManagers ¶
type WebhookTriggerReconcilerManagers interface { Environment() EnvironmentSetterManager Spec() SpecSetterManager }
WebhookTriggerReconcilerManagers are the managers used by the workflow trigger reconciler when configuring a Knative service for the trigger.
type WhenConditionStatus ¶
type WhenConditionStatus string
const ( WhenConditionStatusEvaluating WhenConditionStatus = "WhenConditionEvaluating" WhenConditionStatusFailure WhenConditionStatus = "WhenConditionFailure" WhenConditionStatusNotSatisfied WhenConditionStatus = "WhenConditionNotSatisfied" WhenConditionStatusSatisfied WhenConditionStatus = "WhenConditionSatisfied" WhenConditionStatusUnknown WhenConditionStatus = "WhenConditionUnknown" )
func (WhenConditionStatus) String ¶
func (wcs WhenConditionStatus) String() string
type WorkflowRun ¶
type WorkflowRunManager ¶
type WorkflowRunManager interface {
Run(ctx context.Context, name string, parameters map[string]openapi.WorkflowRunParameter) (*WorkflowRun, error)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.