Problem
The operator runs all three controllers (restatecluster, restatecloudenvironment, restatedeployment) in a single process via tokio::join! in src/main.rs. The restatecloudenvironment controller does a preflight list and hard-exits if it fails:
// src/controllers/restatecloudenvironment/controller.rs:172
if let Err(e) = rce.list(&ListParams::default().limit(1)).await {
error!("RestateCloudEnvironment is not queryable; {e:?}. Is the CRD installed?");
std::process::exit(1);
}
So if the RestateCloudEnvironment CRD is not installed, the entire operator process exits and crash-loops — even for a deployment that only uses RestateCluster and never touches RestateCloudEnvironment.
Impact
BYOC only uses RestateCluster, but must install all three CRDs (RestateCloudEnvironment and RestateDeployment included) purely so the operator can boot. As of restatedev/nuon-byoc#129 the chart's CRDs are gated off (installCrds: false, CRDs vendored out-of-band), so BYOC now vendors all three CRDs just to satisfy this startup requirement — carrying two CRDs it does not otherwise use.
Proposal
Make each controller tolerant of its CRD being absent: if the CRD/API isn't listable at startup, log a warning and skip starting that controller instead of exiting the process. The operator then runs whatever controllers have their CRDs present. (Optionally gate controllers behind explicit flags/values so an operator can be run in a "RestateCluster-only" mode deliberately.)
Once this lands, BYOC can vendor only restateclusters and drop the two unused CRDs.
Related cleanup
The restatedeployment controller's startup guard looks like a copy-paste bug — it lists services while the error message says "RestateDeployment is not queryable":
// src/controllers/restatedeployment/controller.rs (~line 1258)
if let Err(e) = services.list(&ListParams::default().limit(1)).await {
error!("RestateDeployment is not queryable; {e:?}. Is the CRD installed?");
std::process::exit(1);
}
Core Service objects are always listable, so this check never actually detects a missing RestateDeployment CRD. Worth fixing (or removing) as part of this work.
Problem
The operator runs all three controllers (
restatecluster,restatecloudenvironment,restatedeployment) in a single process viatokio::join!insrc/main.rs. Therestatecloudenvironmentcontroller does a preflight list and hard-exits if it fails:So if the
RestateCloudEnvironmentCRD is not installed, the entire operator process exits and crash-loops — even for a deployment that only usesRestateClusterand never touchesRestateCloudEnvironment.Impact
BYOC only uses
RestateCluster, but must install all three CRDs (RestateCloudEnvironmentandRestateDeploymentincluded) purely so the operator can boot. As of restatedev/nuon-byoc#129 the chart's CRDs are gated off (installCrds: false, CRDs vendored out-of-band), so BYOC now vendors all three CRDs just to satisfy this startup requirement — carrying two CRDs it does not otherwise use.Proposal
Make each controller tolerant of its CRD being absent: if the CRD/API isn't listable at startup, log a warning and skip starting that controller instead of exiting the process. The operator then runs whatever controllers have their CRDs present. (Optionally gate controllers behind explicit flags/values so an operator can be run in a "RestateCluster-only" mode deliberately.)
Once this lands, BYOC can vendor only
restateclustersand drop the two unused CRDs.Related cleanup
The
restatedeploymentcontroller's startup guard looks like a copy-paste bug — it listsserviceswhile the error message says "RestateDeployment is not queryable":Core
Serviceobjects are always listable, so this check never actually detects a missingRestateDeploymentCRD. Worth fixing (or removing) as part of this work.