Add printer columns to RestateCloudEnvironment CRD#133
Conversation
The `RestateCloudEnvironment` CRD was the only Restate CRD that didn't declare any `printcolumn`s, so `kube`'s `CustomResourceExt::crd()` emitted `additionalPrinterColumns: []`. This empty-array default is stripped by the k8s API server on apply, which makes downstream GitOps tooling (e.g., ArgoCD) report perpetual drift on the field that no amount of re-syncing can converge. Add three useful printer columns — Environment ID, Region, and Age — mirroring what `RestateCluster` already does. Side benefits: - `kubectl get rce` now shows the environment ID and region directly. - The generated CRD no longer has `additionalPrinterColumns: []`, so the k8s/Helm round-trip is consistent for any consumer of this CRD. Both the Rust source and the regenerated `crd/restatecloudenvironments.yaml` are updated together.
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
|
just wanted to acknowledge this and say thank you. it'll be a few days until i have cycles to look more closely. just to set expectations! do have a read of this though: https://github.com/restatedev/restate-operator/tree/main/release-notes - it has instructions for adding an unreleased release note, which helps our release automation when it lands. doesn't need to be too long and thorough as it's pretty simple. |
Problem
RestateCloudEnvironmentis the only Restate CRD without declaredprintcolumns, sokube::CustomResourceExt::crd()emits:```yaml
versions:
name: v1beta1
```
The empty array is silently stripped by the k8s API server on apply (it's a default), but downstream tooling — most visibly ArgoCD — still sees `additionalPrinterColumns: []` in the rendered chart manifest while `kubectl get crd … -o yaml` returns nothing for the field. This produces perpetual drift on the CRD that no amount of re-syncing can converge, and shows up in ArgoCD as a Synced-but-with-diff state on the operator Application. Same issue happens for any user installing the Helm chart via GitOps.
Fix
Add three useful
printcolumnattributes — Environment, Region, Age — mirroring whatRestateClusteralready declares. Nowkubeemits real columns and downstream tooling stops drifting.Side benefit
`kubectl get rce` becomes genuinely useful:
```
NAME ENVIRONMENT REGION AGE
echofi-cloud-environment env_201kc7eqa2yphqtdxs5z38vjjn6 us 7d
```
(before this PR: just NAME + AGE.)
Files changed
Testing
Edited the Rust source by hand and updated the generated YAML to match exactly what the macro would emit (mirroring the format of the existing `RestateCluster` CRD). Did not run `just generate` locally because the build chain (`protoc`, k8s libs) wasn't available — happy to re-run if a maintainer wants verification, but the diff is mechanical.