Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: integrate asm and db into controller #1697

Merged
merged 4 commits into from
Jun 7, 2024
Merged

feat: integrate asm and db into controller #1697

merged 4 commits into from
Jun 7, 2024

Conversation

gak
Copy link
Contributor

@gak gak commented Jun 7, 2024

Fixes #1692

This PR integrates AWS secrets manager (ASM) and DB project resolver/config provider into the controller.

Please note that ftl dev does not support these yet.

Manual test with localstack:

ftl🐚 ➜  ftl git:(gak/asm-in-controller) ✗ export AWS_REGION=us-west-2 export AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test AWS_ENDPOINT_URL=http://localhost:4566
ftl🐚 ➜  ftl git:(gak/asm-in-controller) ✗ ftl-controller
info: Web console available at: http://localhost:8892
info: HTTP ingress server listening on: http://localhost:8891
warn:heartbeatController: failed to heartbeat controller: duplicate key value violates unique constraint "controller_endpoint_not_dead_idx": conflict

etc...

Another terminal using AWS secrets:

ftl🐚 ➜  ftl git:(gak/asm-in-controller) echo -n '{"user": "sup!", "pass": "<0001f9be>"}' | LOG_LEVEL=trace ftl secret set my.module --asm
trace: Loading config from /Users/gak/src/ftl/ftl-project.toml
trace: /xyz.block.ftl.v1.AdminService/SecretSet (unary)
ftl🐚 ➜  ftl git:(gak/asm-in-controller) ✗ ftl secret list
my.module
ftl🐚 ➜  ftl git:(gak/asm-in-controller) ✗ ftl secret get my.module
{"user": "sup!", "pass": "🦾"}

And config via db:

ftl🐚 ➜  ftl git:(gak/asm-in-controller) ftl config set myconfig hithere --db
ftl🐚 ➜  ftl git:(gak/asm-in-controller) ftl config list
myconfig
ftl🐚 ➜  ftl git:(gak/asm-in-controller) ftl config get myconfig
hithere

@gak gak requested a review from alecthomas as a code owner June 7, 2024 00:46
@gak gak requested review from a team, matt2e and wesbillman and removed request for a team June 7, 2024 00:46
@ftl-robot ftl-robot mentioned this pull request Jun 7, 2024
@gak gak changed the title feat: integrate asm into controller (only). rm 1p. feat: integrate asm and db into controller Jun 7, 2024
cmd/ftl/cmd_secret.go Outdated Show resolved Hide resolved
@alecthomas
Copy link
Collaborator

Awesome thanks @gak

@gak gak enabled auto-merge (squash) June 7, 2024 02:48
@gak gak merged commit 9d8901f into main Jun 7, 2024
37 checks passed
@gak gak deleted the gak/asm-in-controller branch June 7, 2024 02:50
@matt2e matt2e added the approved Marks an already closed PR as approved label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Marks an already closed PR as approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor ftl-controller to use ASM + DB config
3 participants