how are you running it?
# spicedb
j
how are you running it?
s
Do you mean how am I running the query or how am I running the authz deployment? for the query, we checked the value in the db directly in the alembic_version table. For the authz deployment, we deployed in k8s with this config:
Copy code
apiVersion: authzed.com/v1alpha1
kind: SpiceDBCluster
metadata:
  name: authz-ps
  namespace: dev
spec:
  config:
    datastoreEngine: postgres
  secretName: ...
  patches:
    - kind: Deployment
      patch:
        spec:
          template:
            spec:
              nodeSelector:
                ...
j
how are you running the migrate command
you're likely passing an incorrect value for the target revision
of empty string, instead of
head
s
We are not running the migrate command specifically. When we are deploying the authz to k8s it's trying to do it automatically.
y
i.e. you're using the operator?
do you have an update channel defined?
s
I'm sorry. I really don't understand what you mean by that. Here's the deployment yaml for the operator, if that helps. If not could you please tell me what I should look for? https://cdn.discordapp.com/attachments/1420792392793067681/1421139712655102012/message.txt?ex=68d7f2fe&is=68d6a17e&hm=cbd58612797eeaf084f18b7407ada570ea5fcd092f31f632f3deebc3d08a226f&
y
that looks like the deployment of the operator itself rather than the custom resource that you wrote to have the operator do the work. do you have a SpiceDBCluster [like this one](https://github.com/authzed/spicedb-operator?tab=readme-ov-file#suggested-updates) written somewhere? does that object have a
channel
defined on it?
s
y
ah, i don't mean the definition of the operator
i mean the object with kind
SpiceDBCluster
that you wrote to define your SpiceDB instance
s
you mean this?
Copy code
apiVersion: authzed.com/v1alpha1
kind: SpiceDBCluster
metadata:
  name: authz-ps
  namespace: dev
spec:
  config:
    datastoreEngine: postgres
  secretName: ...
  patches:
    - kind: Deployment
      patch:
        spec:
          template:
            spec:
              nodeSelector:
                ...
that I initially sent. All I can tell is that we definitely haven't defined any update channels
y
yeah, that was the part i wanted to pull at
if you didn't define an update channel and you didn't define an image, the operator has nothing to go on
configure an update channel like in the readme and it should start working because it'll run the migrations for you to get to the version that's at the head of that channel
s
Thanks @yetitwo We are now getting this error:
Copy code
I0930 15:32:27.239033       1 event.go:389] "Event occurred" object="dev/devspice-new" fieldPath="" kind="SpiceDBCluster" apiVersion="authzed.com/v1alpha1" type="Warning" reason="InvalidSpiceDBConfig" message="invalid config: no update found in channel"
We tried these yamls:
Copy code
apiVersion: authzed.com/v1alpha1
kind: SpiceDBCluster
metadata:
  name: devspice-new
  namespace: dev
spec:
  config:
    datastoreEngine: postgres
  secretName: newsecret
Copy code
apiVersion: authzed.com/v1alpha1
kind: SpiceDBCluster
metadata:
  name: devspice-new
  namespace: dev
spec:
  channel: stable 
  version: v1.45.4
  config:
    datastoreEngine: postgres
  secretName: newsecret
Copy code
apiVersion: authzed.com/v1alpha1
kind: SpiceDBCluster
metadata:
  name: devspice-new
  namespace: dev
spec:
  channel: stable 
  version: v1.45.4
  config:
    datastoreEngine: postgres
  secretName: newsecret
status:
  version:
    name: v1.14.0
    channel: stable 
  availableVersions:
  - name: v1.14.1
    channel: stable
    description: direct update with no migrations
y
v1.45.4
isn't available in
stable
yet - the most recent version is available in rapid, and the second-to-most-recent is available in
stable
hold up
the OSS operator might be a few versions behind. let me see if that needs updates.
yeah, i updated it so that stable has the most recent version
but you'll need to choose a version that exists in the update graph (or else leave the version specification off of it and it will give you the most recent version)
s
Now it works. Thank you so much @yetitwo
y
sure thing!
5 Views