I am trying to deploy - for now as a test - a Couchbase setup with the ‘couchbase/couchbase-operator’ Chart on a K3d, as we are examning if couchbase is something we should aim for. I have a few buckets and need to configure scopes for these buckets. Yet no matter where I try to add them I get errors (got “array”, expected “map”, got “string”, expected “map”, unknown field “organisation”).
scopes:
user:
collections:
?
name: user
organisation:
collections:
?
name: organisation
buckets:
default: null
authentication:
replicas: 1
conflictResolution: seqno
enableFlush: false
memoryQuota: 100Mi
user:
replicas: 1
conflictResolution: seqno
enableFlush: false
memoryQuota: 100Mi
The ? is that I used either a map (but don’t know what key/values to use) or as a list [‘user’, ‘organisation’]. I also try to add the scopes in the ‘buckets’ configuration, but then I need to use the resources
key, but don’t know what I need to add there? Documentation of the chart is very unclear and I can not find anything else.
Can someone help me with this? (Without the scopes configuration, the yaml part works and am able to start a very basic couchbase cluster)
Kind regards,
Werner
Hi Werner,
You can find an example for how to define your scopes here as part of our helm chart repository.
Thanks,
Justin Ashworth
1 Like
Hi Justin,
Thank you for your answer, I really appreciate that. I had seen the file, but till I read your message for some reason it didn’t land, sorry about that!
I am now able to deploy it without any error. I have this right now (related to bucket/scopes, as I also have users configured which seems to work fine):
scopes:
user:
collections:
managed: true
preserveDefaultCollection: false
resources:
- kind: CouchbaseCollection
name: "user"
- kind: CouchbaseCollection
name: "userapitoken"
defaultScope: false
name: user
organisation:
collections:
managed: true
preserveDefaultCollection: false
resources:
- kind: CouchbaseCollection
name: "organisation"
defaultScope: false
name: organisation
buckets:
default: null
authentication:
replicas: 1
conflictResolution: seqno
enableFlush: false
memoryQuota: 100Mi
user:
replicas: 1
conflictResolution: seqno
enableFlush: false
memoryQuota: 100Mi
scopes:
resources:
- kind: CouchbaseScope
name: "user"
- kind: CouchbaseScope
name: "organisation"
But when I look in the Admin UI, I see the buckets and when I click on “Scopes & Collections
” for my ‘user’ bucket on the right side, I don’t see any of the scopes. Is that because I didn’t create a collection yet? I only see the “_default
” and “_system
” scopes in my overview.
I tried adding the following:
collections:
user:
name: user
userapi:
name: userapi
organisation:
name: organisation
But also no scopes or collections in my “Scopes & Collections
” page.
I apologize if this feels like rookie mistakes. Thanks in advance.
Hey Werner,
I believe under your bucket definition for user, set user.scopes.managed
to true. It should result in this field on your bucket being set to true
Yes, that works. Thank you very much @justin.ashworth !