Closed EronWright closed 1 month ago
This feature is already implemented and initialization will fail.
This is where we create the Workspace object: https://github.com/pulumi/pulumi-kubernetes-operator/blob/d52dbe79ad0c3ea3110cc2c96f4afd47edd84347/operator/internal/controller/pulumi/stack_controller.go#L1165-L1168
Where the workspace controller talks to the agent: https://github.com/pulumi/pulumi-kubernetes-operator/blob/d52dbe79ad0c3ea3110cc2c96f4afd47edd84347/operator/internal/controller/auto/workspace_controller.go#L256-L261
In the agent code where we do not create the stack if it doesn't exist: https://github.com/pulumi/pulumi-kubernetes-operator/blob/d52dbe79ad0c3ea3110cc2c96f4afd47edd84347/agent/pkg/server/server.go#L186-L197
I have manually tested that this feature works.
Cannot close issue:
resolution/
Please fix these problems and try again.
The
Stack
has a featureUseLocalStackOnly
that, if true, prevents the system from creating new stacks in the backend. See https://github.com/pulumi/pulumi-kubernetes-operator/pull/186.The
Workspace
API has astacks
field to populate the workspace with stacks, and invokes the RPC layer to upsert each stack. Seems we must plumb a flag to support this.