|
|
@ -175,8 +175,8 @@ type ClusterCreateOpts struct { |
|
|
|
GlobalLabels map[string]string `yaml:"globalLabels,omitempty" json:"globalLabels,omitempty"` |
|
|
|
GlobalLabels map[string]string `yaml:"globalLabels,omitempty" json:"globalLabels,omitempty"` |
|
|
|
GlobalEnv []string `yaml:"globalEnv,omitempty" json:"globalEnv,omitempty"` |
|
|
|
GlobalEnv []string `yaml:"globalEnv,omitempty" json:"globalEnv,omitempty"` |
|
|
|
Registries struct { |
|
|
|
Registries struct { |
|
|
|
Create *Registry `yaml:"create,omitempty" json:"create,omitempty"` |
|
|
|
Create *Registry `yaml:"create,omitempty" json:"create,omitempty"` |
|
|
|
Use []*ExternalRegistry `yaml:"use,omitempty" json:"use,omitempty"` |
|
|
|
Use []*Registry `yaml:"use,omitempty" json:"use,omitempty"` |
|
|
|
} `yaml:"registries,omitempty" json:"registries,omitempty"` |
|
|
|
} `yaml:"registries,omitempty" json:"registries,omitempty"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -320,7 +320,13 @@ type ExternalDatastore struct { |
|
|
|
Network string `yaml:"network" json:"network,omitempty"` |
|
|
|
Network string `yaml:"network" json:"network,omitempty"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// ExposedPort describes specs needed to expose the API-Server
|
|
|
|
// MappedPort combines an internal port mapped to an exposed port
|
|
|
|
|
|
|
|
type MappedPort struct { |
|
|
|
|
|
|
|
InternalPort string `yaml:"internal,omitempty" json:"internal,omitempty"` |
|
|
|
|
|
|
|
ExternalPort ExposedPort `yaml:"expose,omitempty" json:"expose,omitempty"` |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ExposedPort describes a port exposed on the host system
|
|
|
|
type ExposedPort struct { |
|
|
|
type ExposedPort struct { |
|
|
|
Host string `yaml:"host" json:"host,omitempty"` |
|
|
|
Host string `yaml:"host" json:"host,omitempty"` |
|
|
|
HostIP string `yaml:"hostIP" json:"hostIP,omitempty"` |
|
|
|
HostIP string `yaml:"hostIP" json:"hostIP,omitempty"` |
|
|
@ -356,10 +362,10 @@ const ( |
|
|
|
|
|
|
|
|
|
|
|
// Registry describes a k3d-managed registry
|
|
|
|
// Registry describes a k3d-managed registry
|
|
|
|
type Registry struct { |
|
|
|
type Registry struct { |
|
|
|
ClusterRef string // filled automatically -> if created with a cluster
|
|
|
|
ClusterRef string // filled automatically -> if created with a cluster
|
|
|
|
Host string `yaml:"host" json:"host"` |
|
|
|
Host string `yaml:"host" json:"host"` |
|
|
|
Image string `yaml:"image,omitempty" json:"image,omitempty"` |
|
|
|
Image string `yaml:"image,omitempty" json:"image,omitempty"` |
|
|
|
Port ExposedPort `yaml:"port" json:"port"` |
|
|
|
Port MappedPort `yaml:"port" json:"port"` |
|
|
|
Options struct { |
|
|
|
Options struct { |
|
|
|
ConfigFile string `yaml:"configFile,omitempty" json:"configFile,omitempty"` |
|
|
|
ConfigFile string `yaml:"configFile,omitempty" json:"configFile,omitempty"` |
|
|
|
Proxy struct { |
|
|
|
Proxy struct { |
|
|
@ -369,11 +375,3 @@ type Registry struct { |
|
|
|
} `yaml:"proxy,omitempty" json:"proxy,omitempty"` |
|
|
|
} `yaml:"proxy,omitempty" json:"proxy,omitempty"` |
|
|
|
} `yaml:"options,omitempty" json:"options,omitempty"` |
|
|
|
} `yaml:"options,omitempty" json:"options,omitempty"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// ExternalRegistry describes a registry that is not managed together with the current cluster -> we only update the registries.yaml
|
|
|
|
|
|
|
|
type ExternalRegistry struct { |
|
|
|
|
|
|
|
Host string `yaml:"host" json:"host"` |
|
|
|
|
|
|
|
Port string `yaml:"port" json:"port"` |
|
|
|
|
|
|
|
ExternalPort string `yaml:"externalPort" json:"externalPort"` |
|
|
|
|
|
|
|
Proxy string `yaml:"proxy,omitempty" json:"proxy,omitempty"` // to use the external registry as a proxy for e.g. docker.io
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|