-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Component outputs are a great way for components to provide values to upstream consumers. Sometimes the data will be static (e.g. an event topic), and other times it will be dynamic with a different value provided to each consumer (e.g. credentials).
The component spec
# architect/dependency
version: v2
deployments:
main:
image: my-image:latest
command: npm start
services:
public:
deployment: main
port: 8080
admin:
deployment: main
port: 8081
outputs:
my-event-topic:
description: The topic I publish events to
value: my-topic-name
credentials:
description: Unique credentials to access my service
sensitive: true
on:
create:
image: my-image:latest
command: ./gen-credentials.sh
environment:
ADMIN_ADDR: ${{ services.admin.url }}
---
# architect/consumer
version: v2
dependencies:
dependency: architect/dependency
deployments:
main:
image: test:latest
environment:
PUBLIC_ADDR: ${{ dependencies.dependency.services.public.url }}
TOPIC: ${{ dependencies.dependency.outputs.my-event-topic.value }}
CREDENTIALS: ${{ dependencies.dependency.outputs.credentials.value }}Implementation notes
- The above schema assumes that the
outputs.*.on.createwill launch a task that has access to the public service. This should operate the same way other tasks and cronjobs work today. - The credentials should be the only thing logged to stdout
- The task we actually create should write the stdout contents to a "secret" resource that gets created for each consumer
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request