authzed / spicedb-operator

Kubernetes controller for managing instances of SpiceDB
Apache License 2.0
62 stars 26 forks source link

Report pod errors on the spicedbcluster status #212

Closed ecordell closed 1 year ago

ecordell commented 1 year ago

The operator can't catch every possible config issue for SpiceDB. If there's an error rolling out the pods, this PR now reports the termination message in the SpiceDBCluster status.

Example of running with a bad cmd:

status:
  conditions:
  - lastTransitionTime: "2023-06-20T21:22:43Z"
    message: 'Waiting for deployment to be available: 0/2 available, 0/2 ready, 2/2
      updated, 1/1 generation.'
    reason: WaitingForDeploymentAvailability
    status: "True"
    type: RollingDeployment
  - lastTransitionTime: "2023-06-20T21:22:49Z"
    message: 'failed to create containerd task: failed to create shim task: OCI runtime
      create failed: runc create failed: unable to start container process: exec:
      "badcmd": executable file not found in $PATH: unknown'
    reason: PodError
    status: "True"
    type: RolloutError