mirror of
https://github.com/rancher/types.git
synced 2025-07-31 20:55:00 +00:00
Update types
This commit is contained in:
parent
d45d3364fd
commit
4fbc7e62c6
@ -47,9 +47,8 @@ type ClusterSpec struct {
|
||||
DisplayName string `json:"displayName"`
|
||||
Description string `json:"description"`
|
||||
Internal bool `json:"internal" norman:"nocreate,noupdate"`
|
||||
Imported bool `json:"imported" norman:"noupdate"`
|
||||
Embedded bool `json:"embedded" norman:"noupdate"`
|
||||
EmbeddedConfig *K8sServerConfig `json:"embeddedConfig"`
|
||||
ImportedConfig *ImportedConfig `json:"importedConfig" norman:"noupdate"`
|
||||
EmbeddedConfig *K8sServerConfig `json:"embeddedConfig" norman:"noupdate"`
|
||||
GoogleKubernetesEngineConfig *GoogleKubernetesEngineConfig `json:"googleKubernetesEngineConfig,omitempty"`
|
||||
AzureKubernetesServiceConfig *AzureKubernetesServiceConfig `json:"azureKubernetesServiceConfig,omitempty"`
|
||||
RancherKubernetesEngineConfig *RancherKubernetesEngineConfig `json:"rancherKubernetesEngineConfig,omitempty"`
|
||||
@ -57,6 +56,10 @@ type ClusterSpec struct {
|
||||
DefaultClusterRoleForProjectMembers string `json:"defaultClusterRoleForProjectMembers,omitempty" norman:"type=reference[roleTemplate]"`
|
||||
}
|
||||
|
||||
type ImportedConfig struct {
|
||||
KubeConfig string `json:"kubeConfig"`
|
||||
}
|
||||
|
||||
type K8sServerConfig struct {
|
||||
AdmissionControllers []string `json:"admissionControllers,omitempty"`
|
||||
ServiceNetCIDR string `json:"serviceNetCidr,omitempty"`
|
||||
|
@ -21,6 +21,8 @@ type ListenConfig struct {
|
||||
Description string `json:"description,omitempty"`
|
||||
Mode string `json:"mode,omitempty" norman:"type=enum,options=https|http|acme"`
|
||||
CACerts string `json:"caCerts,omitempty"`
|
||||
CACert string `json:"caCert,omitempty"`
|
||||
CAKey string `json:"caKey,omitempty"`
|
||||
Cert string `json:"cert,omitempty"`
|
||||
Key string `json:"key,omitempty" norman:"writeOnly"`
|
||||
Domains []string `json:"domains,omitempty"`
|
||||
|
@ -103,15 +103,29 @@ type MachineConfig struct {
|
||||
Annotations map[string]string `json:"annotations"`
|
||||
}
|
||||
|
||||
type CustomConfig struct {
|
||||
// IP or FQDN that is fully resolvable and used for SSH communication
|
||||
Address string `yaml:"address" json:"address,omitempty"`
|
||||
// Optional - Internal address that will be used for components communication
|
||||
InternalAddress string `yaml:"internal_address" json:"internalAddress,omitempty"`
|
||||
// SSH user that will be used by RKE
|
||||
User string `yaml:"user" json:"user,omitempty"`
|
||||
// Optional - Docker socket on the node that will be used in tunneling
|
||||
DockerSocket string `yaml:"docker_socket" json:"dockerSocket,omitempty"`
|
||||
// SSH Private Key
|
||||
SSHKey string `yaml:"ssh_key" json:"sshKey,omitempty"`
|
||||
}
|
||||
|
||||
type MachineSpec struct {
|
||||
NodeSpec v1.NodeSpec `json:"nodeSpec"`
|
||||
Description string `json:"description,omitempty"`
|
||||
DisplayName string `json:"displayName"`
|
||||
RequestedHostname string `json:"requestedHostname,omitempty" norman:"noupdate"`
|
||||
ClusterName string `json:"clusterName,omitempty" norman:"type=reference[cluster],noupdate,required"`
|
||||
Role []string `json:"role,omitempty" norman:"noupdate,type=array[enum],options=etcd|worker|controlplane"`
|
||||
MachineTemplateName string `json:"machineTemplateName,omitempty" norman:"type=reference[machineTemplate],noupdate"`
|
||||
UseInternalIPAddress bool `json:"useInternalIpAddress,omitempty" norman:"default=true,noupdate"`
|
||||
NodeSpec v1.NodeSpec `json:"nodeSpec"`
|
||||
CustomConfig *CustomConfig `json:"customConfig"`
|
||||
Description string `json:"description,omitempty"`
|
||||
DisplayName string `json:"displayName"`
|
||||
RequestedHostname string `json:"requestedHostname,omitempty" norman:"noupdate"`
|
||||
ClusterName string `json:"clusterName,omitempty" norman:"type=reference[cluster],noupdate,required"`
|
||||
Role []string `json:"role,omitempty" norman:"noupdate,type=array[enum],options=etcd|worker|controlplane"`
|
||||
MachineTemplateName string `json:"machineTemplateName,omitempty" norman:"type=reference[machineTemplate],noupdate"`
|
||||
UseInternalIPAddress bool `json:"useInternalIpAddress,omitempty" norman:"default=true,noupdate"`
|
||||
}
|
||||
|
||||
type MachineCommonParams struct {
|
||||
|
@ -253,7 +253,11 @@ func userTypes(schema *types.Schemas) *types.Schemas {
|
||||
|
||||
func globalTypes(schema *types.Schemas) *types.Schemas {
|
||||
return schema.
|
||||
AddMapperForType(&Version, v3.ListenConfig{}, m.DisplayName{}).
|
||||
AddMapperForType(&Version, v3.ListenConfig{},
|
||||
m.DisplayName{},
|
||||
m.Drop{Field: "caKey"},
|
||||
m.Drop{Field: "caCert"},
|
||||
).
|
||||
MustImport(&Version, v3.ListenConfig{}).
|
||||
MustImportAndCustomize(&Version, v3.Setting{}, func(schema *types.Schema) {
|
||||
schema.MustCustomizeField("name", func(f types.Field) types.Field {
|
||||
|
Loading…
Reference in New Issue
Block a user