Skip to content

Commit

Permalink
Runner can talk to timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e committed Dec 10, 2024
1 parent f51c0a9 commit 35d772c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import (
"github.com/TBD54566975/ftl/backend/runner/observability"
"github.com/TBD54566975/ftl/backend/runner/proxy"
"github.com/TBD54566975/ftl/backend/runner/pubsub"
"github.com/TBD54566975/ftl/backend/timeline"
"github.com/TBD54566975/ftl/common/plugin"
"github.com/TBD54566975/ftl/internal/download"
"github.com/TBD54566975/ftl/internal/dsn"
Expand All @@ -58,6 +59,7 @@ type Config struct {
Key model.RunnerKey `help:"Runner key (auto)."`
ControllerEndpoint *url.URL `name:"ftl-endpoint" help:"Controller endpoint." env:"FTL_ENDPOINT" default:"http://127.0.0.1:8892"`
LeaseEndpoint *url.URL `name:"ftl-lease-endpoint" help:"Lease endpoint endpoint." env:"FTL_LEASE_ENDPOINT" default:"http://127.0.0.1:8895"`
TimelineEndpoint *url.URL `help:"Timeline endpoint." env:"FTL_TIMELINE_ENDPOINT" default:"http://127.0.0.1:8894"`
TemplateDir string `help:"Template directory to copy into each deployment, if any." type:"existingdir"`
DeploymentDir string `help:"Directory to store deployments in." default:"${deploymentdir}"`
DeploymentKeepHistory int `help:"Number of deployments to keep history for." default:"3"`
Expand All @@ -84,6 +86,8 @@ func Start(ctx context.Context, config Config, storage *artefacts.OCIArtefactSer
logger := log.FromContext(ctx).Attrs(map[string]string{"runner": config.Key.String()})
logger.Debugf("Starting FTL Runner")

ctx = timeline.ContextWithClient(ctx, timeline.NewClient(ctx, config.TimelineEndpoint))

err = manageDeploymentDirectory(logger, config)
if err != nil {
observability.Runner.StartupFailed(ctx)
Expand Down
2 changes: 2 additions & 0 deletions charts/ftl/templates/runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ data:
value: "http://0.0.0.0:{{ (index .Values.runner.ports 0).containerPort }}"
- name: FTL_LEASE_ENDPOINT
value: http://ftl-lease:8892
- name: FTL_TIMELINE_ENDPOINT
value: "http://{{ .Values.timeline.service.name }}:{{ .Values.timeline.service.port }}"
- name: FTL_ARTEFACT_REGISTRY_ALLOW_INSECURE
value: "{{ .Values.registry.allowInsecure }}"
- name: FTL_ARTEFACT_REGISTRY_USERNAME
Expand Down

0 comments on commit 35d772c

Please sign in to comment.