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

memory datastore is set with dispatch enabled by default #111

Closed
vroldanbet opened this issue Nov 23, 2022 · 4 comments · Fixed by #112
Closed

memory datastore is set with dispatch enabled by default #111

vroldanbet opened this issue Nov 23, 2022 · 4 comments · Fixed by #112
Labels
kind/bug Something is broken or regressed

Comments

@vroldanbet
Copy link
Contributor

Following the example in README.md leads to a failure when performing Check

zed version
client: zed 0.7.5
service: v1.15.0
...
zed permission check blog/post:1 read  blog/user:emilia --revision "${ZEDTOKEN}"
Error: rpc error: code = Unavailable desc = last connection error: connection error: desc = "transport: Error while dialing dial tcp 192.168.9.11:50053: connect: connection refused"
@vroldanbet
Copy link
Contributor Author

The example provided in the README.md shows the following custom resource:

apiVersion: authzed.com/v1alpha1
kind: SpiceDBCluster
metadata:
  name: dev
spec:
  config:
    image: ghcr.io/authzed/spicedb:v1.11.0
    datastoreEngine: memory 
  secretName: dev-spicedb-config

This results in the following ENVs in the Deployment

SPICEDB_DATASTORE_ENGINE : memory
SPICEDB_DISPATCH_CLUSTER_ENABLED : false
SPICEDB_DISPATCH_UPSTREAM_ADDR : kubernetes:///dev.default:dispatch
SPICEDB_GRPC_PRESHARED_KEY : secretKeyRef(dev-spicedb-config.preshared_key) 

while the cluster dispatch server is disabled, setting SPICEDB_DISPATCH_UPSTREAM_ADDR to anything other than an empty string will enable dispatching.

The operator should know memory datastore cannot be dispatched and sett the ENV to empty.

@vroldanbet vroldanbet added the kind/bug Something is broken or regressed label Nov 23, 2022
@vroldanbet
Copy link
Contributor Author

Also see #30

@ensonic
Copy link
Contributor

ensonic commented Nov 23, 2022

even using this config:

spec:
  config:
    datastoreEngine: memory
    image: authzed/spicedb:v1.15.0
    dispatchUpstreamAddr: ''

causes the following env settings on the spicedb deployment

SPICEDB_DISPATCH_UPSTREAM_ADDR: kubernetes:///dev.default:dispatch
SPICEDB_DISPATCH_CLUSTER_ENABLED: false

@vroldanbet
Copy link
Contributor Author

@ensonic yeah as referenced above in #30 , the operator does not currently allow customizing dispatch.

vroldanbet added a commit that referenced this issue Nov 24, 2022
fixes #111

users running the repository example where stuck
because the SpiceDB instance spun up had Dispatch API
server disabled, but actual dispatching enabled, so
Check requests errored out.

This adds tests to verify the untested method
ToEnvVarApplyConfiguration() and makes sure
memory datastore does not set dispatchUpstreamAddr
vroldanbet added a commit that referenced this issue Dec 1, 2022
fixes #111

users running the repository example where stuck
because the SpiceDB instance spun up had Dispatch API
server disabled, but actual dispatching enabled, so
Check requests errored out.

This adds tests to verify the untested method
ToEnvVarApplyConfiguration() and makes sure
memory datastore does not set dispatchUpstreamAddr
vroldanbet added a commit that referenced this issue Dec 1, 2022
fixes #111

users running the repository example where stuck
because the SpiceDB instance spun up had Dispatch API
server disabled, but actual dispatching enabled, so
Check requests errored out.

This adds tests to verify the untested method
ToEnvVarApplyConfiguration() and makes sure
memory datastore does not set dispatchUpstreamAddr

Co-authored-by: Sam Kim <sam@authzed.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something is broken or regressed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants