Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/driver/vz/vz_driver_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ var knownYamlProperties = []string{
"Images",
"Memory",
"Message",
"Meta",
"MinimumLimaVersion",
"Mounts",
"MountType",
Expand Down
1 change: 1 addition & 0 deletions pkg/driver/wsl2/wsl_driver_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var knownYamlProperties = []string{
"HostResolver",
"Images",
"Message",
"Meta",
"Mounts",
"MountType",
"Param",
Expand Down
11 changes: 6 additions & 5 deletions pkg/limatype/lima_yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ type LimaYAML struct {
PropagateProxyEnv *bool `yaml:"propagateProxyEnv,omitempty" json:"propagateProxyEnv,omitempty" jsonschema:"nullable"`
CACertificates CACertificates `yaml:"caCerts,omitempty" json:"caCerts,omitempty"`
// Deprecated: Use VMOpts.VZ.Rosetta instead.
Rosetta Rosetta `yaml:"rosetta,omitempty" json:"rosetta,omitempty"`
Plain *bool `yaml:"plain,omitempty" json:"plain,omitempty" jsonschema:"nullable"`
TimeZone *string `yaml:"timezone,omitempty" json:"timezone,omitempty" jsonschema:"nullable"`
NestedVirtualization *bool `yaml:"nestedVirtualization,omitempty" json:"nestedVirtualization,omitempty" jsonschema:"nullable"`
User User `yaml:"user,omitempty" json:"user,omitempty"`
Rosetta Rosetta `yaml:"rosetta,omitempty" json:"rosetta,omitempty"`
Plain *bool `yaml:"plain,omitempty" json:"plain,omitempty" jsonschema:"nullable"`
TimeZone *string `yaml:"timezone,omitempty" json:"timezone,omitempty" jsonschema:"nullable"`
NestedVirtualization *bool `yaml:"nestedVirtualization,omitempty" json:"nestedVirtualization,omitempty" jsonschema:"nullable"`
User User `yaml:"user,omitempty" json:"user,omitempty"`
Meta map[string]any `yaml:"meta,omitempty" json:"meta,omitempty" jsonschema:"nullable"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FillDefault needs to be updated for overriding

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bikeshedding: why not call this "labels"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bikeshedding: why not call this "labels"

  1. Because I think of the value of labels as just strings (map[string]string), not objects, and I don't want to put any constraints on the data a user wants to put there.

  2. I find meta more generic than labels, e.g. meta.keywords looks better to me than labels.keywords. And with point (1), meta.keywords can be a []string, but labels.keywords would be a comma-separated list that would need to be parsed and could not be used easily with jq/yq.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FillDefault needs to be updated for overriding

I guess. And then it also should be supported by template embedding, for consistency.

At first I thought since Lima doesn't use the value of Meta, just declaring the field to make sure we don't get strict YAML errors would be enough. But I guess I was wrong. 😄

}

type BaseTemplates []LocatorWithDigest
Expand Down
Loading