From d0fc2bd2452f1ad938956ecf1492b832ce7f4c88 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Fri, 11 Jan 2019 17:19:21 +0100 Subject: [PATCH] UPSTREAM: : openshift: Rename ProviderConfig to ProviderSpec The machine provideConfig field has been renamed upstream kubernetes-sigs/cluster-api#548. AWS/Libvirt providers have been accommodated for supporting the new field openshift/cluster-api-provider-aws#127 and openshift/cluster-api-provider-libvirt#104 in a backward compatible manner. Hence we want to only allow the new field here and eventually drop the old one on the providers. --- .../apis/cluster/v1alpha1/cluster_types.go | 22 +++- .../pkg/apis/cluster/v1alpha1/common_types.go | 10 +- .../pkg/apis/cluster/v1alpha1/defaults.go | 74 ++++++++++++ .../apis/cluster/v1alpha1/machine_types.go | 47 +++++++- .../cluster/v1alpha1/machineclass_types.go | 16 ++- .../v1alpha1/machinedeployment_types.go | 18 ++- .../apis/cluster/v1alpha1/machineset_types.go | 19 ++- .../cluster/v1alpha1/zz_generated.deepcopy.go | 108 +++++++++++++++--- 8 files changed, 286 insertions(+), 28 deletions(-) create mode 100644 cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/defaults.go diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/cluster_types.go b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/cluster_types.go index 0aabc0c98f0e..c0cd29a46b92 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/cluster_types.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/cluster_types.go @@ -29,6 +29,7 @@ const ClusterFinalizer = "cluster.cluster.k8s.io" // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +/// [Cluster] // Cluster is the Schema for the clusters API // +k8s:openapi-gen=true // +kubebuilder:subresource:status @@ -40,6 +41,9 @@ type Cluster struct { Status ClusterStatus `json:"status,omitempty"` } +/// [Cluster] + +/// [ClusterSpec] // ClusterSpec defines the desired state of Cluster type ClusterSpec struct { // Cluster network configuration @@ -50,27 +54,36 @@ type ClusterSpec struct { // their own versioned API types that should be // serialized/deserialized from this field. // +optional - ProviderConfig ProviderConfig `json:"providerConfig,omitempty"` + ProviderSpec ProviderSpec `json:"providerSpec,omitempty"` } +/// [ClusterSpec] + +/// [ClusterNetworkingConfig] // ClusterNetworkingConfig specifies the different networking // parameters for a cluster. type ClusterNetworkingConfig struct { // The network ranges from which service VIPs are allocated. Services NetworkRanges `json:"services"` - // The network ranges from which POD networks are allocated. + // The network ranges from which Pod networks are allocated. Pods NetworkRanges `json:"pods"` // Domain name for services. ServiceDomain string `json:"serviceDomain"` } +/// [ClusterNetworkingConfig] + +/// [NetworkRanges] // NetworkRanges represents ranges of network addresses. type NetworkRanges struct { CIDRBlocks []string `json:"cidrBlocks"` } +/// [NetworkRanges] + +/// [ClusterStatus] // ClusterStatus defines the observed state of Cluster type ClusterStatus struct { // APIEndpoint represents the endpoint to communicate with the IP. @@ -100,6 +113,9 @@ type ClusterStatus struct { ProviderStatus *runtime.RawExtension `json:"providerStatus,omitempty"` } +/// [ClusterStatus] + +/// [APIEndpoint] // APIEndpoint represents a reachable Kubernetes API endpoint. type APIEndpoint struct { // The hostname on which the API server is serving. @@ -109,6 +125,8 @@ type APIEndpoint struct { Port int `json:"port"` } +/// [APIEndpoint] + func (o *Cluster) Validate() field.ErrorList { errors := field.ErrorList{} // perform validation here and add to errors using field.Invalid diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/common_types.go b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/common_types.go index 32bb55f8c19c..7a9c647fe296 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/common_types.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/common_types.go @@ -21,8 +21,8 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) -// ProviderConfig defines the configuration to use during node creation. -type ProviderConfig struct { +// ProviderSpec defines the configuration to use during node creation. +type ProviderSpec struct { // No more than one of the following may be specified. @@ -36,12 +36,12 @@ type ProviderConfig struct { // Source for the provider configuration. Cannot be used if value is // not empty. // +optional - ValueFrom *ProviderConfigSource `json:"valueFrom,omitempty"` + ValueFrom *ProviderSpecSource `json:"valueFrom,omitempty"` } -// ProviderConfigSource represents a source for the provider-specific +// ProviderSpecSource represents a source for the provider-specific // resource configuration. -type ProviderConfigSource struct { +type ProviderSpecSource struct { // The machine class from which the provider config should be sourced. // +optional MachineClass *MachineClassRef `json:"machineClass,omitempty"` diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/defaults.go b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/defaults.go new file mode 100644 index 000000000000..f9aeb4b438c7 --- /dev/null +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/defaults.go @@ -0,0 +1,74 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" + "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" +) + +// PopulateDefaultsMachineDeployment fills in default field values +// Currently it is called after reading objects, but it could be called in an admission webhook also +func PopulateDefaultsMachineDeployment(d *MachineDeployment) { + if d.Spec.Replicas == nil { + d.Spec.Replicas = new(int32) + *d.Spec.Replicas = 1 + } + + if d.Spec.MinReadySeconds == nil { + d.Spec.MinReadySeconds = new(int32) + *d.Spec.MinReadySeconds = 0 + } + + if d.Spec.RevisionHistoryLimit == nil { + d.Spec.RevisionHistoryLimit = new(int32) + *d.Spec.RevisionHistoryLimit = 1 + } + + if d.Spec.ProgressDeadlineSeconds == nil { + d.Spec.ProgressDeadlineSeconds = new(int32) + *d.Spec.ProgressDeadlineSeconds = 600 + } + + if d.Spec.Strategy == nil { + d.Spec.Strategy = &MachineDeploymentStrategy{} + } + + if d.Spec.Strategy.Type == "" { + d.Spec.Strategy.Type = common.RollingUpdateMachineDeploymentStrategyType + } + + // Default RollingUpdate strategy only if strategy type is RollingUpdate. + if d.Spec.Strategy.Type == common.RollingUpdateMachineDeploymentStrategyType { + if d.Spec.Strategy.RollingUpdate == nil { + d.Spec.Strategy.RollingUpdate = &MachineRollingUpdateDeployment{} + } + if d.Spec.Strategy.RollingUpdate.MaxSurge == nil { + ios1 := intstr.FromInt(1) + d.Spec.Strategy.RollingUpdate.MaxSurge = &ios1 + } + if d.Spec.Strategy.RollingUpdate.MaxUnavailable == nil { + ios0 := intstr.FromInt(0) + d.Spec.Strategy.RollingUpdate.MaxUnavailable = &ios0 + } + } + + if len(d.Namespace) == 0 { + d.Namespace = metav1.NamespaceDefault + } +} diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machine_types.go b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machine_types.go index 76b87b378f68..5a10bba39fb0 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machine_types.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machine_types.go @@ -24,12 +24,13 @@ import ( "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" ) -// Finalizer is set on PreareForCreate callback +// Finalizer is set on PrepareForCreate callback const MachineFinalizer = "machine.cluster.k8s.io" // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +/// [Machine] // Machine is the Schema for the machines API // +k8s:openapi-gen=true // +kubebuilder:subresource:status @@ -41,6 +42,9 @@ type Machine struct { Status MachineStatus `json:"status,omitempty"` } +/// [Machine] + +/// [MachineSpec] // MachineSpec defines the desired state of Machine type MachineSpec struct { // This ObjectMeta will autopopulate the Node created. Use this to @@ -57,7 +61,7 @@ type MachineSpec struct { // Provider-specific configuration to use during node creation. // +optional - ProviderConfig ProviderConfig `json:"providerConfig"` + ProviderSpec ProviderSpec `json:"providerSpec"` // Versions of key software to use. This field is optional at cluster // creation time, and omitting the field indicates that the cluster @@ -70,13 +74,16 @@ type MachineSpec struct { // To populate in the associated Node for dynamic kubelet config. This // field already exists in Node, so any updates to it in the Machine - // spec will be automatially copied to the linked NodeRef from the + // spec will be automatically copied to the linked NodeRef from the // status. The rest of dynamic kubelet config support should then work // as-is. // +optional ConfigSource *corev1.NodeConfigSource `json:"configSource,omitempty"` } +/// [MachineSpec] + +/// [MachineStatus] // MachineStatus defines the observed state of Machine type MachineStatus struct { // If the corresponding Node exists, this will point to its object. @@ -144,8 +151,40 @@ type MachineStatus struct { // Refer: https://kubernetes.io/docs/concepts/architecture/nodes/#condition // +optional Conditions []corev1.NodeCondition `json:"conditions,omitempty"` + + // LastOperation describes the last-operation performed by the machine-controller. + // This API should be useful as a history in terms of the latest operation performed on the + // specific machine. It should also convey the state of the latest-operation for example if + // it is still on-going, failed or completed successfully. + // +optional + LastOperation *LastOperation `json:"lastOperation,omitempty"` + + // Phase represents the current phase of machine actuation. + // E.g. Pending, Running, Terminating, Failed etc. + // +optional + Phase *string `json:"phase,omitempty"` +} + +// LastOperation represents the detail of the last performed operation on the MachineObject. +type LastOperation struct { + // Description is the human-readable description of the last operation. + Description *string `json:"description,omitempty"` + + // LastUpdateTime is the timestamp at which LastOperation API was last-updated. + LastUpdated *metav1.Time `json:"lastUpdated,omitempty"` + + // State is the current status of the last performed operation. + // E.g. Processing, Failed, Successful etc + State *string `json:"state,omitempty"` + + // Type is the type of operation which was last performed. + // E.g. Create, Delete, Update etc + Type *string `json:"type,omitempty"` } +/// [MachineStatus] + +/// [MachineVersionInfo] type MachineVersionInfo struct { // Semantic version of kubelet to run Kubelet string `json:"kubelet"` @@ -157,6 +196,8 @@ type MachineVersionInfo struct { ControlPlane string `json:"controlPlane,omitempty"` } +/// [MachineVersionInfo] + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // MachineList contains a list of Machine diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machineclass_types.go b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machineclass_types.go index 9e2b1abb2933..7844f6cfa463 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machineclass_types.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machineclass_types.go @@ -25,6 +25,7 @@ import ( // +genclient:noStatus // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +/// [MachineClass] // MachineClass can be used to templatize and re-use provider configuration // across multiple Machines / MachineSets / MachineDeployments. // +k8s:openapi-gen=true @@ -55,10 +56,23 @@ type MachineClass struct { // Allocatable corev1.ResourceList `json:"allocatable"` // Provider-specific configuration to use during node creation. - ProviderConfig runtime.RawExtension `json:"providerConfig"` + ProviderSpec runtime.RawExtension `json:"providerSpec"` // TODO: should this use an api.ObjectReference to a 'MachineTemplate' instead? // A link to the MachineTemplate that will be used to create provider // specific configuration for Machines of this class. // MachineTemplate corev1.ObjectReference `json:machineTemplate` } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// MachineClassList contains a list of MachineClasses +type MachineClassList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []MachineClass `json:"items"` +} + +func init() { + SchemeBuilder.Register(&MachineClass{}, &MachineClassList{}) +} diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machinedeployment_types.go b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machinedeployment_types.go index d3017c05d7f6..690d095ad04e 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machinedeployment_types.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machinedeployment_types.go @@ -23,6 +23,7 @@ import ( "sigs.k8s.io/cluster-api/pkg/apis/cluster/common" ) +/// [MachineDeploymentSpec] // MachineDeploymentSpec defines the desired state of MachineDeployment type MachineDeploymentSpec struct { // Number of desired machines. Defaults to 1. @@ -40,7 +41,7 @@ type MachineDeploymentSpec struct { // The deployment strategy to use to replace existing machines with // new ones. // +optional - Strategy MachineDeploymentStrategy `json:"strategy,omitempty"` + Strategy *MachineDeploymentStrategy `json:"strategy,omitempty"` // Minimum number of seconds for which a newly created machine should // be ready. @@ -67,6 +68,9 @@ type MachineDeploymentSpec struct { ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"` } +/// [MachineDeploymentSpec] + +/// [MachineDeploymentStrategy] // MachineDeploymentStrategy describes how to replace existing machines // with new ones. type MachineDeploymentStrategy struct { @@ -82,6 +86,9 @@ type MachineDeploymentStrategy struct { RollingUpdate *MachineRollingUpdateDeployment `json:"rollingUpdate,omitempty"` } +/// [MachineDeploymentStrategy] + +/// [MachineRollingUpdateDeployment] // Spec to control the desired behavior of rolling update. type MachineRollingUpdateDeployment struct { // The maximum number of machines that can be unavailable during the update. @@ -116,6 +123,9 @@ type MachineRollingUpdateDeployment struct { MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"` } +/// [MachineRollingUpdateDeployment] + +/// [MachineDeploymentStatus] // MachineDeploymentStatus defines the observed state of MachineDeployment type MachineDeploymentStatus struct { // The generation observed by the deployment controller. @@ -150,12 +160,16 @@ type MachineDeploymentStatus struct { UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"` } +/// [MachineDeploymentStatus] + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +/// [MachineDeployment] // MachineDeployment is the Schema for the machinedeployments API // +k8s:openapi-gen=true // +kubebuilder:subresource:status +// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.labelSelector type MachineDeployment struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -164,6 +178,8 @@ type MachineDeployment struct { Status MachineDeploymentStatus `json:"status,omitempty"` } +/// [MachineDeployment] + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // MachineDeploymentList contains a list of MachineDeployment diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machineset_types.go b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machineset_types.go index de5d52dae981..40c04286a3cf 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machineset_types.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/machineset_types.go @@ -30,9 +30,11 @@ import ( // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +/// [MachineSet] // MachineSet ensures that a specified number of machines replicas are running at any given time. // +k8s:openapi-gen=true // +kubebuilder:subresource:status +// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.labelSelector type MachineSet struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -41,6 +43,9 @@ type MachineSet struct { Status MachineSetStatus `json:"status,omitempty"` } +/// [MachineSet] + +/// [MachineSetSpec] // MachineSetSpec defines the desired state of MachineSet type MachineSetSpec struct { // Replicas is the number of desired replicas. @@ -49,7 +54,7 @@ type MachineSetSpec struct { // +optional Replicas *int32 `json:"replicas,omitempty"` - // Minimum number of seconds for which a newly created machine should be ready. + // MinReadySeconds is the minimum number of seconds for which a newly created machine should be ready. // Defaults to 0 (machine will be considered available as soon as it is ready) // +optional MinReadySeconds int32 `json:"minReadySeconds,omitempty"` @@ -66,7 +71,10 @@ type MachineSetSpec struct { Template MachineTemplateSpec `json:"template,omitempty"` } -// MachineTemplateSpec describes the data a machine should have when created from a template +/// [MachineSetSpec] // doxygen marker + +/// [MachineTemplateSpec] // doxygen marker +// MachineTemplateSpec describes the data needed to create a Machine from a template type MachineTemplateSpec struct { // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata @@ -79,6 +87,9 @@ type MachineTemplateSpec struct { Spec MachineSpec `json:"spec,omitempty"` } +/// [MachineTemplateSpec] + +/// [MachineSetStatus] // MachineSetStatus defines the observed state of MachineSet type MachineSetStatus struct { // Replicas is the most recently observed number of replicas. @@ -109,7 +120,7 @@ type MachineSetStatus struct { // These fields should not be set for transitive errors that a // controller faces that are expected to be fixed automatically over // time (like service outages), but instead indicate that something is - // fundamentally wrong with the MachineTemplates's spec or the configuration of + // fundamentally wrong with the MachineTemplate's spec or the configuration of // the machine controller, and that manual intervention is required. Examples // of terminal errors would be invalid combinations of settings in the // spec, values that are unsupported by the machine controller, or the @@ -124,6 +135,8 @@ type MachineSetStatus struct { ErrorMessage *string `json:"errorMessage,omitempty"` } +/// [MachineSetStatus] + func (machineSet *MachineSet) Validate() field.ErrorList { errors := field.ErrorList{} diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go index 73598a5475ec..9b0a0352080a 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go @@ -126,7 +126,7 @@ func (in *ClusterNetworkingConfig) DeepCopy() *ClusterNetworkingConfig { func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { *out = *in in.ClusterNetwork.DeepCopyInto(&out.ClusterNetwork) - in.ProviderConfig.DeepCopyInto(&out.ProviderConfig) + in.ProviderSpec.DeepCopyInto(&out.ProviderSpec) return } @@ -166,6 +166,41 @@ func (in *ClusterStatus) DeepCopy() *ClusterStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LastOperation) DeepCopyInto(out *LastOperation) { + *out = *in + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.LastUpdated != nil { + in, out := &in.LastUpdated, &out.LastUpdated + *out = (*in).DeepCopy() + } + if in.State != nil { + in, out := &in.State, &out.State + *out = new(string) + **out = **in + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastOperation. +func (in *LastOperation) DeepCopy() *LastOperation { + if in == nil { + return nil + } + out := new(LastOperation) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Machine) DeepCopyInto(out *Machine) { *out = *in @@ -199,7 +234,7 @@ func (in *MachineClass) DeepCopyInto(out *MachineClass) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.ProviderConfig.DeepCopyInto(&out.ProviderConfig) + in.ProviderSpec.DeepCopyInto(&out.ProviderSpec) return } @@ -221,6 +256,39 @@ func (in *MachineClass) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineClassList) DeepCopyInto(out *MachineClassList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MachineClass, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineClassList. +func (in *MachineClassList) DeepCopy() *MachineClassList { + if in == nil { + return nil + } + out := new(MachineClassList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineClassList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineClassRef) DeepCopyInto(out *MachineClassRef) { *out = *in @@ -313,7 +381,11 @@ func (in *MachineDeploymentSpec) DeepCopyInto(out *MachineDeploymentSpec) { } in.Selector.DeepCopyInto(&out.Selector) in.Template.DeepCopyInto(&out.Template) - in.Strategy.DeepCopyInto(&out.Strategy) + if in.Strategy != nil { + in, out := &in.Strategy, &out.Strategy + *out = new(MachineDeploymentStrategy) + (*in).DeepCopyInto(*out) + } if in.MinReadySeconds != nil { in, out := &in.MinReadySeconds, &out.MinReadySeconds *out = new(int32) @@ -559,7 +631,7 @@ func (in *MachineSpec) DeepCopyInto(out *MachineSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - in.ProviderConfig.DeepCopyInto(&out.ProviderConfig) + in.ProviderSpec.DeepCopyInto(&out.ProviderSpec) out.Versions = in.Versions if in.ConfigSource != nil { in, out := &in.ConfigSource, &out.ConfigSource @@ -623,6 +695,16 @@ func (in *MachineStatus) DeepCopyInto(out *MachineStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.LastOperation != nil { + in, out := &in.LastOperation, &out.LastOperation + *out = new(LastOperation) + (*in).DeepCopyInto(*out) + } + if in.Phase != nil { + in, out := &in.Phase, &out.Phase + *out = new(string) + **out = **in + } return } @@ -692,7 +774,7 @@ func (in *NetworkRanges) DeepCopy() *NetworkRanges { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProviderConfig) DeepCopyInto(out *ProviderConfig) { +func (in *ProviderSpec) DeepCopyInto(out *ProviderSpec) { *out = *in if in.Value != nil { in, out := &in.Value, &out.Value @@ -701,24 +783,24 @@ func (in *ProviderConfig) DeepCopyInto(out *ProviderConfig) { } if in.ValueFrom != nil { in, out := &in.ValueFrom, &out.ValueFrom - *out = new(ProviderConfigSource) + *out = new(ProviderSpecSource) (*in).DeepCopyInto(*out) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderConfig. -func (in *ProviderConfig) DeepCopy() *ProviderConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderSpec. +func (in *ProviderSpec) DeepCopy() *ProviderSpec { if in == nil { return nil } - out := new(ProviderConfig) + out := new(ProviderSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProviderConfigSource) DeepCopyInto(out *ProviderConfigSource) { +func (in *ProviderSpecSource) DeepCopyInto(out *ProviderSpecSource) { *out = *in if in.MachineClass != nil { in, out := &in.MachineClass, &out.MachineClass @@ -728,12 +810,12 @@ func (in *ProviderConfigSource) DeepCopyInto(out *ProviderConfigSource) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderConfigSource. -func (in *ProviderConfigSource) DeepCopy() *ProviderConfigSource { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderSpecSource. +func (in *ProviderSpecSource) DeepCopy() *ProviderSpecSource { if in == nil { return nil } - out := new(ProviderConfigSource) + out := new(ProviderSpecSource) in.DeepCopyInto(out) return out }