-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop defaulting within the template blocks #704
Comments
Added to epic #586 |
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. |
This adds `applyconfiguration-gen` to generate apply configurations for our APIs. The workspace template is updated to use it. It's a moderately uphill battle to get apply configurations working with controllers due to various pieces not including built-in support for them. In practice this means we need to cut a couple small corners -- in particular implementing our own `DeepCopy` and tweaking the generated `GroupVersion` code. Fixes #704.
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:
The text was updated successfully, but these errors were encountered: