Skip to content

Add printer columns to RestateCloudEnvironment CRD#133

Open
bcrastnopol wants to merge 1 commit into
restatedev:mainfrom
bcrastnopol:fix-rce-empty-printer-columns
Open

Add printer columns to RestateCloudEnvironment CRD#133
bcrastnopol wants to merge 1 commit into
restatedev:mainfrom
bcrastnopol:fix-rce-empty-printer-columns

Conversation

@bcrastnopol

Copy link
Copy Markdown

Problem

RestateCloudEnvironment is the only Restate CRD without declared printcolumns, so kube::CustomResourceExt::crd() emits:

```yaml
versions:

  • additionalPrinterColumns: []
    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 printcolumn attributes — Environment, Region, Age — mirroring what RestateCluster already declares. Now kube emits 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

  • `src/resources/restatecloudenvironments.rs` — three new `printcolumn` attributes inside `#[kube(...)]`
  • `crd/restatecloudenvironments.yaml` — regenerated to match

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.

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.
@github-actions

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


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.

@lukebond

Copy link
Copy Markdown
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants