1
0
mirror of https://github.com/rancher/types.git synced 2025-04-27 18:25:05 +00:00

Merge pull request #1149 from rawmind0/master-apibool

Updated api bool fields with default=true to *bool, to be usable from client
This commit is contained in:
Dan Ramich 2020-06-02 11:07:23 -07:00 committed by GitHub
commit 12f6c09793
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 40 additions and 15 deletions

View File

@ -359,7 +359,7 @@ type SMTPConfig struct {
Password string `json:"password,omitempty" norman:"type=password"`
Sender string `json:"sender,omitempty" norman:"required"`
DefaultRecipient string `json:"defaultRecipient,omitempty" norman:"required"`
TLS bool `json:"tls,omitempty" norman:"required,default=true"`
TLS *bool `json:"tls,omitempty" norman:"required,default=true"`
}
type SlackConfig struct {

View File

@ -177,7 +177,7 @@ type FluentForwarderConfig struct {
ClientKey string `json:"clientKey,omitempty"`
ClientKeyPass string `json:"clientKeyPass,omitempty"`
SSLVerify bool `json:"sslVerify,omitempty"`
Compress bool `json:"compress,omitempty" norman:"default=true"`
Compress *bool `json:"compress,omitempty" norman:"default=true"`
FluentServers []FluentServer `json:"fluentServers,omitempty" norman:"required"`
}

View File

@ -246,7 +246,7 @@ type NodeCommonParams struct {
EngineLabel map[string]string `json:"engineLabel,omitempty"`
EngineStorageDriver string `json:"engineStorageDriver,omitempty"`
EngineEnv map[string]string `json:"engineEnv,omitempty"`
UseInternalIPAddress bool `json:"useInternalIpAddress,omitempty" norman:"default=true,noupdate"`
UseInternalIPAddress *bool `json:"useInternalIpAddress,omitempty" norman:"default=true,noupdate"`
}
type NodeDriver struct {
@ -327,7 +327,7 @@ type NodeDrainInput struct {
Force bool `yaml:"force" json:"force,omitempty"`
// If there are DaemonSet-managed pods, drain will not proceed without IgnoreDaemonSets set to true
// (even when set to true, kubectl won't delete pods - so setting default to true)
IgnoreDaemonSets bool `yaml:"ignore_daemonsets" json:"ignoreDaemonSets,omitempty" norman:"default=true"`
IgnoreDaemonSets *bool `yaml:"ignore_daemonsets" json:"ignoreDaemonSets,omitempty" norman:"default=true"`
// Continue even if there are pods using emptyDir
DeleteLocalData bool `yaml:"delete_local_data" json:"deleteLocalData,omitempty"`
//Period of time in seconds given to each pod to terminate gracefully.

View File

@ -33,7 +33,7 @@ type RancherKubernetesEngineConfig struct {
// Authorization mode configuration used in the cluster
Authorization AuthzConfig `yaml:"authorization" json:"authorization,omitempty"`
// Enable/disable strict docker version checking
IgnoreDockerVersion bool `yaml:"ignore_docker_version" json:"ignoreDockerVersion" norman:"default=true"`
IgnoreDockerVersion *bool `yaml:"ignore_docker_version" json:"ignoreDockerVersion" norman:"default=true"`
// Kubernetes version to use (if kubernetes image is specifed, image version takes precedence)
Version string `yaml:"kubernetes_version" json:"kubernetesVersion,omitempty"`
// List of private registries and their credentials

View File

@ -3653,6 +3653,11 @@ func (in *FlannelNetworkProvider) DeepCopy() *FlannelNetworkProvider {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *FluentForwarderConfig) DeepCopyInto(out *FluentForwarderConfig) {
*out = *in
if in.Compress != nil {
in, out := &in.Compress, &out.Compress
*out = new(bool)
**out = **in
}
if in.FluentServers != nil {
in, out := &in.FluentServers, &out.FluentServers
*out = make([]FluentServer, len(*in))
@ -5922,6 +5927,11 @@ func (in *NodeCommonParams) DeepCopyInto(out *NodeCommonParams) {
(*out)[key] = val
}
}
if in.UseInternalIPAddress != nil {
in, out := &in.UseInternalIPAddress, &out.UseInternalIPAddress
*out = new(bool)
**out = **in
}
return
}
@ -5954,6 +5964,11 @@ func (in *NodeCondition) DeepCopy() *NodeCondition {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NodeDrainInput) DeepCopyInto(out *NodeDrainInput) {
*out = *in
if in.IgnoreDaemonSets != nil {
in, out := &in.IgnoreDaemonSets, &out.IgnoreDaemonSets
*out = new(bool)
**out = **in
}
return
}
@ -6291,7 +6306,7 @@ func (in *NodeSpec) DeepCopyInto(out *NodeSpec) {
if in.NodeDrainInput != nil {
in, out := &in.NodeDrainInput, &out.NodeDrainInput
*out = new(NodeDrainInput)
**out = **in
(*in).DeepCopyInto(*out)
}
in.MetadataUpdate.DeepCopyInto(&out.MetadataUpdate)
return
@ -6513,7 +6528,7 @@ func (in *NodeUpgradeStrategy) DeepCopyInto(out *NodeUpgradeStrategy) {
if in.DrainInput != nil {
in, out := &in.DrainInput, &out.DrainInput
*out = new(NodeDrainInput)
**out = **in
(*in).DeepCopyInto(*out)
}
return
}
@ -6562,7 +6577,7 @@ func (in *Notification) DeepCopyInto(out *Notification) {
if in.SMTPConfig != nil {
in, out := &in.SMTPConfig, &out.SMTPConfig
*out = new(SMTPConfig)
**out = **in
(*in).DeepCopyInto(*out)
}
if in.SlackConfig != nil {
in, out := &in.SlackConfig, &out.SlackConfig
@ -6665,7 +6680,7 @@ func (in *NotifierSpec) DeepCopyInto(out *NotifierSpec) {
if in.SMTPConfig != nil {
in, out := &in.SMTPConfig, &out.SMTPConfig
*out = new(SMTPConfig)
**out = **in
(*in).DeepCopyInto(*out)
}
if in.SlackConfig != nil {
in, out := &in.SlackConfig, &out.SlackConfig
@ -8516,6 +8531,11 @@ func (in *RancherKubernetesEngineConfig) DeepCopyInto(out *RancherKubernetesEngi
}
out.SystemImages = in.SystemImages
in.Authorization.DeepCopyInto(&out.Authorization)
if in.IgnoreDockerVersion != nil {
in, out := &in.IgnoreDockerVersion, &out.IgnoreDockerVersion
*out = new(bool)
**out = **in
}
if in.PrivateRegistries != nil {
in, out := &in.PrivateRegistries, &out.PrivateRegistries
*out = make([]PrivateRegistry, len(*in))
@ -8996,6 +9016,11 @@ func (in *S3BackupConfig) DeepCopy() *S3BackupConfig {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SMTPConfig) DeepCopyInto(out *SMTPConfig) {
*out = *in
if in.TLS != nil {
in, out := &in.TLS, &out.TLS
*out = new(bool)
**out = **in
}
return
}

View File

@ -17,7 +17,7 @@ type FluentForwarderConfig struct {
ClientCert string `json:"clientCert,omitempty" yaml:"clientCert,omitempty"`
ClientKey string `json:"clientKey,omitempty" yaml:"clientKey,omitempty"`
ClientKeyPass string `json:"clientKeyPass,omitempty" yaml:"clientKeyPass,omitempty"`
Compress bool `json:"compress,omitempty" yaml:"compress,omitempty"`
Compress *bool `json:"compress,omitempty" yaml:"compress,omitempty"`
EnableTLS bool `json:"enableTls,omitempty" yaml:"enableTls,omitempty"`
FluentServers []FluentServer `json:"fluentServers,omitempty" yaml:"fluentServers,omitempty"`
SSLVerify bool `json:"sslVerify,omitempty" yaml:"sslVerify,omitempty"`

View File

@ -13,6 +13,6 @@ type NodeDrainInput struct {
DeleteLocalData bool `json:"deleteLocalData,omitempty" yaml:"deleteLocalData,omitempty"`
Force bool `json:"force,omitempty" yaml:"force,omitempty"`
GracePeriod int64 `json:"gracePeriod,omitempty" yaml:"gracePeriod,omitempty"`
IgnoreDaemonSets bool `json:"ignoreDaemonSets,omitempty" yaml:"ignoreDaemonSets,omitempty"`
IgnoreDaemonSets *bool `json:"ignoreDaemonSets,omitempty" yaml:"ignoreDaemonSets,omitempty"`
Timeout int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"`
}

View File

@ -63,7 +63,7 @@ type NodeTemplate struct {
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
UseInternalIPAddress bool `json:"useInternalIpAddress,omitempty" yaml:"useInternalIpAddress,omitempty"`
UseInternalIPAddress *bool `json:"useInternalIpAddress,omitempty" yaml:"useInternalIpAddress,omitempty"`
}
type NodeTemplateCollection struct {

View File

@ -36,5 +36,5 @@ type NodeTemplateSpec struct {
EngineRegistryMirror []string `json:"engineRegistryMirror,omitempty" yaml:"engineRegistryMirror,omitempty"`
EngineStorageDriver string `json:"engineStorageDriver,omitempty" yaml:"engineStorageDriver,omitempty"`
NodeTaints []Taint `json:"nodeTaints,omitempty" yaml:"nodeTaints,omitempty"`
UseInternalIPAddress bool `json:"useInternalIpAddress,omitempty" yaml:"useInternalIpAddress,omitempty"`
UseInternalIPAddress *bool `json:"useInternalIpAddress,omitempty" yaml:"useInternalIpAddress,omitempty"`
}

View File

@ -38,7 +38,7 @@ type RancherKubernetesEngineConfig struct {
CloudProvider *CloudProvider `json:"cloudProvider,omitempty" yaml:"cloudProvider,omitempty"`
ClusterName string `json:"clusterName,omitempty" yaml:"clusterName,omitempty"`
DNS *DNSConfig `json:"dns,omitempty" yaml:"dns,omitempty"`
IgnoreDockerVersion bool `json:"ignoreDockerVersion,omitempty" yaml:"ignoreDockerVersion,omitempty"`
IgnoreDockerVersion *bool `json:"ignoreDockerVersion,omitempty" yaml:"ignoreDockerVersion,omitempty"`
Ingress *IngressConfig `json:"ingress,omitempty" yaml:"ingress,omitempty"`
Monitoring *MonitoringConfig `json:"monitoring,omitempty" yaml:"monitoring,omitempty"`
Network *NetworkConfig `json:"network,omitempty" yaml:"network,omitempty"`

View File

@ -17,6 +17,6 @@ type SMTPConfig struct {
Password string `json:"password,omitempty" yaml:"password,omitempty"`
Port int64 `json:"port,omitempty" yaml:"port,omitempty"`
Sender string `json:"sender,omitempty" yaml:"sender,omitempty"`
TLS bool `json:"tls,omitempty" yaml:"tls,omitempty"`
TLS *bool `json:"tls,omitempty" yaml:"tls,omitempty"`
Username string `json:"username,omitempty" yaml:"username,omitempty"`
}