mirror of
https://github.com/rancher/types.git
synced 2025-07-02 16:31:48 +00:00
Update k3s types to make version a string
This commit is contained in:
parent
12620b5bd7
commit
711984f3d8
@ -1,12 +1,10 @@
|
||||
package v3
|
||||
|
||||
import "k8s.io/apimachinery/pkg/version"
|
||||
|
||||
//K3sConfig provides desired configuration for k3s clusters
|
||||
type K3sConfig struct {
|
||||
// k3s Kubernetes version
|
||||
Version *version.Info `yaml:"kubernetes_version" json:"kubernetesVersion,omitempty"`
|
||||
K3sUpgradeStrategy
|
||||
// k3s Kubernetes version, unset the value indicates an unmanaged cluster
|
||||
Version string `yaml:"kubernetes_version" json:"kubernetesVersion,omitempty"`
|
||||
K3sUpgradeStrategy `yaml:"k3s_upgrade_strategy,omitempty" json:"k3supgradeStrategy,omitempty"`
|
||||
}
|
||||
|
||||
//K3sUpgradeStrategy provides configuration to the downstream system-upgrade-controller
|
||||
|
@ -2227,7 +2227,7 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
|
||||
if in.K3sConfig != nil {
|
||||
in, out := &in.K3sConfig, &out.K3sConfig
|
||||
*out = new(K3sConfig)
|
||||
(*in).DeepCopyInto(*out)
|
||||
**out = **in
|
||||
}
|
||||
if in.ImportedConfig != nil {
|
||||
in, out := &in.ImportedConfig, &out.ImportedConfig
|
||||
@ -4524,11 +4524,6 @@ func (in *IngressConfig) DeepCopy() *IngressConfig {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *K3sConfig) DeepCopyInto(out *K3sConfig) {
|
||||
*out = *in
|
||||
if in.Version != nil {
|
||||
in, out := &in.Version, &out.Version
|
||||
*out = new(version.Info)
|
||||
**out = **in
|
||||
}
|
||||
out.K3sUpgradeStrategy = in.K3sUpgradeStrategy
|
||||
return
|
||||
}
|
||||
|
@ -1,14 +1,12 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
K3sConfigType = "k3sConfig"
|
||||
K3sConfigFieldServerConcurrency = "serverConcurrency"
|
||||
K3sConfigFieldVersion = "kubernetesVersion"
|
||||
K3sConfigFieldWorkerConcurrency = "workerConcurrency"
|
||||
K3sConfigType = "k3sConfig"
|
||||
K3sConfigFieldK3sUpgradeStrategy = "k3supgradeStrategy"
|
||||
K3sConfigFieldVersion = "kubernetesVersion"
|
||||
)
|
||||
|
||||
type K3sConfig struct {
|
||||
ServerConcurrency int64 `json:"serverConcurrency,omitempty" yaml:"serverConcurrency,omitempty"`
|
||||
Version *Info `json:"kubernetesVersion,omitempty" yaml:"kubernetesVersion,omitempty"`
|
||||
WorkerConcurrency int64 `json:"workerConcurrency,omitempty" yaml:"workerConcurrency,omitempty"`
|
||||
K3sUpgradeStrategy *K3sUpgradeStrategy `json:"k3supgradeStrategy,omitempty" yaml:"k3supgradeStrategy,omitempty"`
|
||||
Version string `json:"kubernetesVersion,omitempty" yaml:"kubernetesVersion,omitempty"`
|
||||
}
|
||||
|
12
client/management/v3/zz_generated_k3s_upgrade_strategy.go
Normal file
12
client/management/v3/zz_generated_k3s_upgrade_strategy.go
Normal file
@ -0,0 +1,12 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
K3sUpgradeStrategyType = "k3sUpgradeStrategy"
|
||||
K3sUpgradeStrategyFieldServerConcurrency = "serverConcurrency"
|
||||
K3sUpgradeStrategyFieldWorkerConcurrency = "workerConcurrency"
|
||||
)
|
||||
|
||||
type K3sUpgradeStrategy struct {
|
||||
ServerConcurrency int64 `json:"serverConcurrency,omitempty" yaml:"serverConcurrency,omitempty"`
|
||||
WorkerConcurrency int64 `json:"workerConcurrency,omitempty" yaml:"workerConcurrency,omitempty"`
|
||||
}
|
Loading…
Reference in New Issue
Block a user