Closed EronWright closed 1 month ago
I think this is more to do with the WorkspaceSpec embedded in the Stack. We probably want an annotation to disable defaults on it (if there is such a thing) or create a separate Partial/Embedded type without defaults.
@blampe there's a code generator for just this purpose (applyconfigurations), to generate an EmbeddedWorkspaceSpec.
The same issue is present with PodTemplate in the WorkspaceSpec. IIRC there was a problem with DeepCopy being missing on the generated code, need to revisit it.
The type of the
StackSpec.workspaceTemplate
field should be an "apply" variant, similar to k8s.io/client-go/applyconfigurations; it should not set any default values. Otherwise it makes for noise in the higher-level APIs and overstates their intentions.For example, when we apply a given stack:
We get: