Skip to content

Commit

Permalink
k3dv1alpha4: add HostAliases to config (#270)
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Sieger <[email protected]>
  • Loading branch information
nicksieger authored Jan 30, 2023
1 parent 49b5edb commit cbc5581
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/api/k3dv1alpha4/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ type SimpleConfigRegistries struct {
Config string `mapstructure:"config" yaml:"config,omitempty" json:"config,omitempty"` // registries.yaml (k3s config for containerd registry override)
}

type SimpleConfigHostAlias struct {
IP string `mapstructure:"ip" yaml:"ip" json:"ip"`
Hostnames []string `mapstructure:"hostnames" yaml:"hostnames" json:"hostnames"`
}

// SimpleConfig describes the toplevel k3d configuration file.
type SimpleConfig struct {
TypeMeta `yaml:",inline"`
Expand All @@ -111,6 +116,7 @@ type SimpleConfig struct {
Options SimpleConfigOptions `mapstructure:"options" yaml:"options,omitempty" json:"options,omitempty"`
Env []EnvVarWithNodeFilters `mapstructure:"env" yaml:"env,omitempty" json:"env,omitempty"`
Registries SimpleConfigRegistries `mapstructure:"registries" yaml:"registries,omitempty" json:"registries,omitempty"`
HostAliases []SimpleConfigHostAlias `mapstructure:"hostAliases" yaml:"hostAliases,omitempty" json:"hostAliases,omitempty"`
}

// SimpleExposureOpts provides a simplified syntax compared to the original k3d.ExposureOpts
Expand Down
28 changes: 28 additions & 0 deletions pkg/api/k3dv1alpha4/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cbc5581

Please sign in to comment.