Documentation ¶
Index ¶
- Constants
- Variables
- func AggregateStatusConditions(conds ...relayv1beta1.Condition) corev1.ConditionStatus
- func ApplyKnativeService(ctx context.Context, cl client.Client, wtd *WebhookTriggerDeps) (*obj.KnativeService, error)
- func ApplyPipelineRun(ctx context.Context, cl client.Client, pp *PipelineParts) (*obj.PipelineRun, error)
- func ConfigureImmutableConfigMapForRun(ctx context.Context, cm *corev1obj.ConfigMap, rd *RunDeps) error
- func ConfigureImmutableConfigMapForWebhookTrigger(ctx context.Context, cm *corev1obj.ConfigMap, wt *obj.WebhookTrigger) error
- func ConfigureKnativeService(ctx context.Context, s *obj.KnativeService, wtd *WebhookTriggerDeps) error
- func ConfigureLimitRange(lr *corev1obj.LimitRange, opts ...LimitRangeOption)
- func ConfigureMetadataAPIRole(role *rbacv1obj.Role, ...)
- func ConfigureMetadataAPIRoleBinding(rb *rbacv1obj.RoleBinding, sa *corev1obj.ServiceAccount, role *rbacv1obj.Role)
- func ConfigureMetadataAPIServiceAccount(sa *corev1obj.ServiceAccount)
- func ConfigureMutableConfigMapForRun(ctx context.Context, cm *corev1obj.ConfigMap, r *obj.Run) error
- func ConfigureNetworkPolicyForRun(np *networkingv1obj.NetworkPolicy, r *obj.Run, opts ...NetworkPolicyOption)
- func ConfigureNetworkPolicyForTenant(np *networkingv1obj.NetworkPolicy)
- func ConfigureNetworkPolicyForWebhookTrigger(np *networkingv1obj.NetworkPolicy, wt *obj.WebhookTrigger, ...)
- func ConfigurePipelineParts(ctx context.Context, p *PipelineParts) error
- func ConfigurePipelineRun(ctx context.Context, pr *obj.PipelineRun, pp *PipelineParts) error
- func ConfigureRun(ctx context.Context, rd *RunDeps, pr *obj.PipelineRun)
- func ConfigureRunDeps(ctx context.Context, rd *RunDeps) error
- func ConfigureRunStatus(ctx context.Context, rd *RunDeps)
- func ConfigureRunStepStatus(ctx context.Context, rd *RunDeps, pr *obj.PipelineRun)
- func ConfigureRunStepStatusConditions(ctx context.Context, currentStepStatus *relayv1beta1.StepStatus, ...) []relayv1beta1.StepCondition
- func ConfigureRunWithSpecificStatus(r *obj.Run, rc relayv1beta1.RunConditionType, status corev1.ConditionStatus)
- func ConfigureStepStatus(ctx context.Context, rd *RunDeps, stepName string, action *model.Step, ...) *relayv1beta1.StepStatus
- func ConfigureTask(ctx context.Context, t *obj.Task, rd *RunDeps, ws *relayv1beta1.Step) error
- func ConfigureTaskSet(ctx context.Context, ts *TaskSet) error
- func ConfigureTenant(t *obj.Tenant, td *TenantDepsResult)
- func ConfigureTenantDeps(ctx context.Context, td *TenantDeps) error
- func ConfigureUntrustedServiceAccount(sa *corev1obj.ServiceAccount)
- func ConfigureWebhookTrigger(wt *obj.WebhookTrigger, ksr *KnativeServiceResult)
- func ConfigureWebhookTriggerDeps(ctx context.Context, wtd *WebhookTriggerDeps) error
- func ModelStep(r *obj.Run, step *relayv1beta1.Step) *model.Step
- func ModelStepFromName(r *obj.Run, stepName string) *model.Step
- func ModelStepObjectKey(key client.ObjectKey, ms *model.Step) client.ObjectKey
- func ModelWebhookTrigger(wt *obj.WebhookTrigger) *model.Trigger
- func SuffixObjectKeyWithHashOfObjectKey(key, hashable client.ObjectKey) client.ObjectKey
- func UpdateStatusConditionIfTransitioned(target *relayv1beta1.Condition, fn func() relayv1beta1.Condition)
- type APITriggerEventSink
- type APIWorkflowExecutionSink
- type KnativeRevisionSet
- type KnativeServiceResult
- type LimitRangeOption
- type NetworkPolicyOption
- func NetworkPolicyWithDeniedIPBlocks(blocks []string) NetworkPolicyOption
- func NetworkPolicyWithMetadataAPIPodSelector(selector metav1.LabelSelector) NetworkPolicyOption
- func NetworkPolicyWithMetadataAPIPort(port int) NetworkPolicyOption
- func NetworkPolicyWithSystemNamespaceSelector(selector metav1.LabelSelector) NetworkPolicyOption
- type PipelineParts
- func (pp *PipelineParts) LabelAnnotateFrom(ctx context.Context, from metav1.Object)
- func (pp *PipelineParts) Load(ctx context.Context, cl client.Client) (bool, error)
- func (pp *PipelineParts) Owned(ctx context.Context, owner lifecycle.TypedObject) error
- func (pp *PipelineParts) Persist(ctx context.Context, cl client.Client) error
- type RunDeps
- func (rd *RunDeps) AnnotateStepToken(ctx context.Context, target *metav1.ObjectMeta, ws *relayv1beta1.Step) error
- func (rd *RunDeps) Delete(ctx context.Context, cl client.Client, opts ...lifecycle.DeleteOption) (bool, error)
- func (rd *RunDeps) Load(ctx context.Context, cl client.Client) (*RunDepsLoadResult, error)
- func (rd *RunDeps) Persist(ctx context.Context, cl client.Client) error
- type RunDepsLoadResult
- type RunDepsOption
- type TaskSet
- func (ts *TaskSet) LabelAnnotateFrom(ctx context.Context, from metav1.Object)
- func (ts *TaskSet) Load(ctx context.Context, cl client.Client) (bool, error)
- func (ts *TaskSet) Owned(ctx context.Context, owner lifecycle.TypedObject) error
- func (ts *TaskSet) Persist(ctx context.Context, cl client.Client) error
- type TenantDeps
- func (td *TenantDeps) Delete(ctx context.Context, cl client.Client, opts ...lifecycle.DeleteOption) (bool, error)
- func (td *TenantDeps) DeleteStale(ctx context.Context, cl client.Client, opts ...lifecycle.DeleteOption) (bool, error)
- func (td *TenantDeps) Load(ctx context.Context, cl client.Client) (bool, error)
- func (td *TenantDeps) Persist(ctx context.Context, cl client.Client) error
- type TenantDepsOption
- type TenantDepsResult
- type WebhookTriggerDeps
- func (wtd *WebhookTriggerDeps) AnnotateTriggerToken(ctx context.Context, target *metav1.ObjectMeta) error
- func (wtd *WebhookTriggerDeps) Delete(ctx context.Context, cl client.Client, opts ...lifecycle.DeleteOption) (bool, error)
- func (wtd *WebhookTriggerDeps) DeleteStale(ctx context.Context, cl client.Client, opts ...lifecycle.DeleteOption) (bool, error)
- func (wtd *WebhookTriggerDeps) Load(ctx context.Context, cl client.Client) (*WebhookTriggerDepsLoadResult, error)
- func (wtd *WebhookTriggerDeps) Persist(ctx context.Context, cl client.Client) error
- type WebhookTriggerDepsLoadResult
- type WebhookTriggerDepsOption
- type WorkflowDeps
- type WorkflowDepsLoadResult
Constants ¶
View Source
const ( ImmutableConfigMapResourceVersionAnnotation = "controller.relay.sh/immutable-config-map-resource-version" KnativeServiceVisibilityLabel = "serving.knative.dev/visibility" )
View Source
const (
KnativeServiceVisibilityClusterLocal = "cluster-local"
)
View Source
const (
// XXX MAKE SURE THIS GETS APPLIED
ManagedByLabelValue = "relay.sh"
)
View Source
const ToolsWorkspaceName = "tools"
Variables ¶
View Source
var (
DefaultNetworkPolicyDeniedIPBlocks = []string{
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.31.196.0/24",
"192.52.193.0/24",
"192.168.0.0/16",
"192.175.48.0/24",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"240.0.0.0/4",
}
)
View Source
var DependencyManager = ownerext.NewManager("controller.relay.sh/dependency-of")
Functions ¶
func AggregateStatusConditions ¶
func AggregateStatusConditions(conds ...relayv1beta1.Condition) corev1.ConditionStatus
func ApplyKnativeService ¶
func ApplyKnativeService(ctx context.Context, cl client.Client, wtd *WebhookTriggerDeps) (*obj.KnativeService, error)
func ApplyPipelineRun ¶
func ApplyPipelineRun(ctx context.Context, cl client.Client, pp *PipelineParts) (*obj.PipelineRun, error)
func ConfigureKnativeService ¶
func ConfigureKnativeService(ctx context.Context, s *obj.KnativeService, wtd *WebhookTriggerDeps) error
func ConfigureLimitRange ¶
func ConfigureLimitRange(lr *corev1obj.LimitRange, opts ...LimitRangeOption)
func ConfigureMetadataAPIRoleBinding ¶
func ConfigureMetadataAPIRoleBinding(rb *rbacv1obj.RoleBinding, sa *corev1obj.ServiceAccount, role *rbacv1obj.Role)
func ConfigureMetadataAPIServiceAccount ¶
func ConfigureMetadataAPIServiceAccount(sa *corev1obj.ServiceAccount)
func ConfigureNetworkPolicyForRun ¶
func ConfigureNetworkPolicyForRun(np *networkingv1obj.NetworkPolicy, r *obj.Run, opts ...NetworkPolicyOption)
func ConfigureNetworkPolicyForTenant ¶
func ConfigureNetworkPolicyForTenant(np *networkingv1obj.NetworkPolicy)
func ConfigureNetworkPolicyForWebhookTrigger ¶
func ConfigureNetworkPolicyForWebhookTrigger(np *networkingv1obj.NetworkPolicy, wt *obj.WebhookTrigger, opts ...NetworkPolicyOption)
func ConfigurePipelineParts ¶
func ConfigurePipelineParts(ctx context.Context, p *PipelineParts) error
func ConfigurePipelineRun ¶
func ConfigurePipelineRun(ctx context.Context, pr *obj.PipelineRun, pp *PipelineParts) error
func ConfigureRun ¶
func ConfigureRun(ctx context.Context, rd *RunDeps, pr *obj.PipelineRun)
func ConfigureRunStatus ¶
func ConfigureRunStepStatus ¶
func ConfigureRunStepStatus(ctx context.Context, rd *RunDeps, pr *obj.PipelineRun)
func ConfigureRunStepStatusConditions ¶
func ConfigureRunStepStatusConditions(ctx context.Context, currentStepStatus *relayv1beta1.StepStatus, actionStatus *model.ActionStatus) []relayv1beta1.StepCondition
func ConfigureRunWithSpecificStatus ¶
func ConfigureRunWithSpecificStatus(r *obj.Run, rc relayv1beta1.RunConditionType, status corev1.ConditionStatus)
func ConfigureStepStatus ¶
func ConfigureStepStatus(ctx context.Context, rd *RunDeps, stepName string, action *model.Step, status *tektonv1beta1.PipelineRunTaskRunStatus, currentStepStatus *relayv1beta1.StepStatus) *relayv1beta1.StepStatus
func ConfigureTask ¶
func ConfigureTenant ¶
func ConfigureTenant(t *obj.Tenant, td *TenantDepsResult)
func ConfigureTenantDeps ¶
func ConfigureTenantDeps(ctx context.Context, td *TenantDeps) error
func ConfigureUntrustedServiceAccount ¶
func ConfigureUntrustedServiceAccount(sa *corev1obj.ServiceAccount)
func ConfigureWebhookTrigger ¶
func ConfigureWebhookTrigger(wt *obj.WebhookTrigger, ksr *KnativeServiceResult)
func ConfigureWebhookTriggerDeps ¶
func ConfigureWebhookTriggerDeps(ctx context.Context, wtd *WebhookTriggerDeps) error
func ModelStepObjectKey ¶
func ModelWebhookTrigger ¶
func ModelWebhookTrigger(wt *obj.WebhookTrigger) *model.Trigger
func UpdateStatusConditionIfTransitioned ¶
func UpdateStatusConditionIfTransitioned(target *relayv1beta1.Condition, fn func() relayv1beta1.Condition)
Types ¶
type APITriggerEventSink ¶
type APITriggerEventSink struct { Sink *relayv1beta1.APITriggerEventSink TokenSecret *corev1obj.OpaqueSecret }
func NewAPITriggerEventSink ¶
func NewAPITriggerEventSink(namespace string, sink *relayv1beta1.APITriggerEventSink) *APITriggerEventSink
func (*APITriggerEventSink) Token ¶
func (tes *APITriggerEventSink) Token() (string, bool)
func (*APITriggerEventSink) URL ¶
func (tes *APITriggerEventSink) URL() string
type APIWorkflowExecutionSink ¶
type APIWorkflowExecutionSink struct { Sink *relayv1beta1.APIWorkflowExecutionSink TokenSecret *corev1obj.OpaqueSecret }
func NewAPIWorkflowExecutionSink ¶
func NewAPIWorkflowExecutionSink(namespace string, sink *relayv1beta1.APIWorkflowExecutionSink) *APIWorkflowExecutionSink
func (*APIWorkflowExecutionSink) Token ¶
func (a *APIWorkflowExecutionSink) Token() (string, bool)
func (*APIWorkflowExecutionSink) URL ¶
func (a *APIWorkflowExecutionSink) URL() string
type KnativeRevisionSet ¶
type KnativeRevisionSet struct { ListOptions *client.ListOptions Revisions []*obj.KnativeRevision }
func NewKnativeRevisionSet ¶
func NewKnativeRevisionSet(opts ...client.ListOption) *KnativeRevisionSet
func NewKnativeRevisionSetForKnativeService ¶
func NewKnativeRevisionSetForKnativeService(ks *obj.KnativeService) *KnativeRevisionSet
type KnativeServiceResult ¶
type KnativeServiceResult struct { KnativeService *obj.KnativeService Error error }
func AsKnativeServiceResult ¶
func AsKnativeServiceResult(ks *obj.KnativeService, err error) *KnativeServiceResult
type LimitRangeOption ¶
type LimitRangeOption func(opts *limitRangeOptions)
func LimitRangeWithContainerDefaultLimit ¶
func LimitRangeWithContainerDefaultLimit(rl corev1.ResourceList) LimitRangeOption
func LimitRangeWithContainerDefaultRequestLimit ¶
func LimitRangeWithContainerDefaultRequestLimit(rl corev1.ResourceList) LimitRangeOption
func LimitRangeWithContainerMaxLimit ¶
func LimitRangeWithContainerMaxLimit(rl corev1.ResourceList) LimitRangeOption
type NetworkPolicyOption ¶
type NetworkPolicyOption func(opts *networkPolicyOptions)
func NetworkPolicyWithDeniedIPBlocks ¶
func NetworkPolicyWithDeniedIPBlocks(blocks []string) NetworkPolicyOption
func NetworkPolicyWithMetadataAPIPodSelector ¶
func NetworkPolicyWithMetadataAPIPodSelector(selector metav1.LabelSelector) NetworkPolicyOption
func NetworkPolicyWithMetadataAPIPort ¶
func NetworkPolicyWithMetadataAPIPort(port int) NetworkPolicyOption
func NetworkPolicyWithSystemNamespaceSelector ¶
func NetworkPolicyWithSystemNamespaceSelector(selector metav1.LabelSelector) NetworkPolicyOption
type PipelineParts ¶
func ApplyPipelineParts ¶
func NewPipelineParts ¶
func NewPipelineParts(deps *RunDeps) *PipelineParts
func (*PipelineParts) LabelAnnotateFrom ¶
func (pp *PipelineParts) LabelAnnotateFrom(ctx context.Context, from metav1.Object)
func (*PipelineParts) Owned ¶
func (pp *PipelineParts) Owned(ctx context.Context, owner lifecycle.TypedObject) error
type RunDeps ¶
type RunDeps struct { Run *obj.Run Workflow *obj.Workflow WorkflowDeps *WorkflowDeps Environment string RuntimeToolsImage string Standalone bool Issuer authenticate.Issuer OwnerConfigMap *corev1obj.ConfigMap NetworkPolicy *networkingv1obj.NetworkPolicy ImmutableConfigMap *corev1obj.ConfigMap MutableConfigMap *corev1obj.ConfigMap MetadataAPIURL *url.URL MetadataAPIServiceAccount *corev1obj.ServiceAccount MetadataAPIServiceAccountTokenSecrets *corev1obj.ServiceAccountTokenSecrets MetadataAPIRole *rbacv1obj.Role MetadataAPIRoleBinding *rbacv1obj.RoleBinding PipelineServiceAccount *corev1obj.ServiceAccount UntrustedServiceAccount *corev1obj.ServiceAccount }
RunDeps represents the dependencies of a Run.
func NewRunDeps ¶
func NewRunDeps(r *obj.Run, issuer authenticate.Issuer, metadataAPIURL *url.URL, opts ...RunDepsOption) *RunDeps
func (*RunDeps) AnnotateStepToken ¶
func (rd *RunDeps) AnnotateStepToken(ctx context.Context, target *metav1.ObjectMeta, ws *relayv1beta1.Step) error
type RunDepsLoadResult ¶
type RunDepsOption ¶
type RunDepsOption func(rd *RunDeps)
func RunDepsWithEnvironment ¶
func RunDepsWithEnvironment(environment string) RunDepsOption
func RunDepsWithRuntimeToolsImage ¶
func RunDepsWithRuntimeToolsImage(image string) RunDepsOption
func RunDepsWithStandaloneMode ¶
func RunDepsWithStandaloneMode(standalone bool) RunDepsOption
type TenantDeps ¶
type TenantDeps struct { Tenant *obj.Tenant Standalone bool // StaleNamespace is the old namespace of a tenant that needs to be cleaned // up. StaleNamespace *corev1obj.Namespace Namespace *corev1obj.Namespace NetworkPolicy *networkingv1obj.NetworkPolicy LimitRange *corev1obj.LimitRange APITriggerEventSink *APITriggerEventSink APIWorkflowExecutionSink *APIWorkflowExecutionSink }
func ApplyTenantDeps ¶
func ApplyTenantDeps(ctx context.Context, cl client.Client, t *obj.Tenant, opts ...TenantDepsOption) (*TenantDeps, error)
func NewTenantDeps ¶
func NewTenantDeps(t *obj.Tenant, opts ...TenantDepsOption) *TenantDeps
func (*TenantDeps) Delete ¶
func (td *TenantDeps) Delete(ctx context.Context, cl client.Client, opts ...lifecycle.DeleteOption) (bool, error)
func (*TenantDeps) DeleteStale ¶
func (td *TenantDeps) DeleteStale(ctx context.Context, cl client.Client, opts ...lifecycle.DeleteOption) (bool, error)
type TenantDepsOption ¶
type TenantDepsOption func(td *TenantDeps)
func TenantDepsWithStandaloneMode ¶
func TenantDepsWithStandaloneMode(standalone bool) TenantDepsOption
type TenantDepsResult ¶
type TenantDepsResult struct { TenantDeps *TenantDeps Error error }
func AsTenantDepsResult ¶
func AsTenantDepsResult(td *TenantDeps, err error) *TenantDepsResult
type WebhookTriggerDeps ¶
type WebhookTriggerDeps struct { WebhookTrigger *obj.WebhookTrigger Issuer authenticate.Issuer Tenant *obj.Tenant TenantDeps *TenantDeps Environment string RuntimeToolsImage string Standalone bool // StaleOwnerConfigMap is a reference to a now-outdated stub object that // needs to be cleaned up. It is set if the tenant is deleted or if the // tenant namespace changes. StaleOwnerConfigMap *corev1obj.ConfigMap // OwnerConfigMap is a stub object that allows us to aggregate ownership of // the other objects created by these dependencies in the tenant namespace. OwnerConfigMap *corev1obj.ConfigMap NetworkPolicy *networkingv1obj.NetworkPolicy ImmutableConfigMap *corev1obj.ConfigMap MutableConfigMap *corev1obj.ConfigMap MetadataAPIURL *url.URL MetadataAPIServiceAccount *corev1obj.ServiceAccount MetadataAPIServiceAccountTokenSecrets *corev1obj.ServiceAccountTokenSecrets MetadataAPIRole *rbacv1obj.Role MetadataAPIRoleBinding *rbacv1obj.RoleBinding KnativeServiceAccount *corev1obj.ServiceAccount }
func NewWebhookTriggerDeps ¶
func NewWebhookTriggerDeps(wt *obj.WebhookTrigger, issuer authenticate.Issuer, metadataAPIURL *url.URL, opts ...WebhookTriggerDepsOption) *WebhookTriggerDeps
func (*WebhookTriggerDeps) AnnotateTriggerToken ¶
func (wtd *WebhookTriggerDeps) AnnotateTriggerToken(ctx context.Context, target *metav1.ObjectMeta) error
func (*WebhookTriggerDeps) Delete ¶
func (wtd *WebhookTriggerDeps) Delete(ctx context.Context, cl client.Client, opts ...lifecycle.DeleteOption) (bool, error)
func (*WebhookTriggerDeps) DeleteStale ¶
func (wtd *WebhookTriggerDeps) DeleteStale(ctx context.Context, cl client.Client, opts ...lifecycle.DeleteOption) (bool, error)
func (*WebhookTriggerDeps) Load ¶
func (wtd *WebhookTriggerDeps) Load(ctx context.Context, cl client.Client) (*WebhookTriggerDepsLoadResult, error)
type WebhookTriggerDepsOption ¶
type WebhookTriggerDepsOption func(wtd *WebhookTriggerDeps)
func WebhookTriggerDepsWithEnvironment ¶
func WebhookTriggerDepsWithEnvironment(environment string) WebhookTriggerDepsOption
func WebhookTriggerDepsWithRuntimeToolsImage ¶
func WebhookTriggerDepsWithRuntimeToolsImage(image string) WebhookTriggerDepsOption
func WebhookTriggerDepsWithStandaloneMode ¶
func WebhookTriggerDepsWithStandaloneMode(standalone bool) WebhookTriggerDepsOption
type WorkflowDeps ¶
type WorkflowDeps struct { Workflow *obj.Workflow Tenant *obj.Tenant TenantDeps *TenantDeps }
WorkflowDeps represents the dependencies of a Workflow.
func NewWorkflowDeps ¶
func NewWorkflowDeps(w *obj.Workflow) *WorkflowDeps
func (*WorkflowDeps) Load ¶
func (wd *WorkflowDeps) Load(ctx context.Context, cl client.Client) (*WorkflowDepsLoadResult, error)
type WorkflowDepsLoadResult ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.