Skip to content

Commit 891130e

Browse files
rubenfiszelclaude
andcommitted
feat: make K8s operator private and add registry EE warning
Move K8s operator source code (crd, db_sync, reconciler, resolve) to windmill-ee-private and gate behind feature = "private". OSS stubs provide error messages when the feature is disabled. Add an info Alert banner in the Registries settings section when no enterprise license is active. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6cf3f5f commit 891130e

File tree

9 files changed

+38
-589
lines changed

9 files changed

+38
-589
lines changed

backend/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ lto = "thin"
9696

9797
[features]
9898
default = []
99-
private = ["windmill-api/private", "windmill-api-agent-workers?/private", "windmill-autoscaling/private", "windmill-common/private", "windmill-git-sync/private", "windmill-indexer/private", "windmill-queue/private", "windmill-worker/private", "windmill-test-utils/private"]
99+
private = ["windmill-api/private", "windmill-api-agent-workers?/private", "windmill-autoscaling/private", "windmill-common/private", "windmill-git-sync/private", "windmill-indexer/private", "windmill-operator?/private", "windmill-queue/private", "windmill-worker/private", "windmill-test-utils/private"]
100100
agent_worker_server = ["windmill-api/agent_worker_server", "dep:windmill-api-agent-workers", "windmill-test-utils/agent_worker_server"]
101101
enterprise = ["windmill-worker/enterprise", "windmill-queue/enterprise", "windmill-api/enterprise", "windmill-api-agent-workers?/enterprise", "dep:windmill-autoscaling", "windmill-autoscaling/enterprise", "windmill-git-sync/enterprise", "windmill-common/prometheus", "windmill-common/enterprise"]
102102
local_reports = ["windmill-common/local_reports"]

backend/ee-repo-ref.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e7f80bca9320580e1cb96b4f4ca9942649abce7f
1+
c2f12c6989e9f069fd274085aefde29264f73c8c

backend/windmill-operator/src/crd.rs

Lines changed: 0 additions & 218 deletions
This file was deleted.

backend/windmill-operator/src/db_sync.rs

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
pub mod crd;
2-
pub mod db_sync;
3-
pub mod reconciler;
4-
pub mod resolve;
1+
#[cfg(feature = "private")]
2+
pub mod crd_ee;
3+
#[cfg(feature = "private")]
4+
pub mod db_sync_ee;
5+
#[cfg(feature = "private")]
6+
pub mod reconciler_ee;
7+
#[cfg(feature = "private")]
8+
pub mod resolve_ee;
59

6-
pub use reconciler::run;
7-
8-
/// Print the CRD YAML definition to stdout.
9-
pub fn print_crd_yaml() {
10-
use kube::CustomResourceExt;
11-
let crd = crd::WindmillInstance::crd();
12-
println!("{}", serde_yml::to_string(&crd).unwrap());
13-
}
10+
mod operator_oss;
11+
pub use operator_oss::*;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#[cfg(feature = "private")]
2+
pub use crate::reconciler_ee::run;
3+
4+
#[cfg(feature = "private")]
5+
pub fn print_crd_yaml() {
6+
use kube::CustomResourceExt;
7+
let crd = crate::crd_ee::WindmillInstance::crd();
8+
println!("{}", serde_yml::to_string(&crd).unwrap());
9+
}
10+
11+
#[cfg(not(feature = "private"))]
12+
pub async fn run(_db: sqlx::Pool<sqlx::Postgres>) -> anyhow::Result<()> {
13+
anyhow::bail!("K8s operator is not available in this build")
14+
}
15+
16+
#[cfg(not(feature = "private"))]
17+
pub fn print_crd_yaml() {
18+
eprintln!("K8s operator CRD generation is not available in this build");
19+
}

0 commit comments

Comments
 (0)