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

Support KV namespaces creating/binding #239

Open
johnd0e opened this issue Mar 3, 2024 · 2 comments
Open

Support KV namespaces creating/binding #239

johnd0e opened this issue Mar 3, 2024 · 2 comments

Comments

@johnd0e
Copy link

johnd0e commented Mar 3, 2024

I want to use some github repo as template, with deploy button.

The problem is the original repo uses KV and has kv_namespace hardcoded in wrangler.toml.
So no surprize that wrangler-action fails:

  • newly deployed worker has no KV namespace bound
  • and it's impossible to create namespace with same id as hardcoded in wrangler.toml.

Possible solution:

  • implement check for existence of KV namespaces with given names
    • if not exist, then create
  • correct id in wrangler.toml.

The last step looks not clean for me, perhaps better would be to refer namespaces in other ways.
E.g.:

  • by value of given env var.
  • or/and by their global name (like seen in web dashboard)
@carafelix
Copy link

Is there a way to not depend on wrangler.toml to bind the kv namespace?

@shakibhasan09
Copy link

Want to know too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants