1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 15:47:14 +01:00

Vendor: Remove cluster-api-provider-azure

Removes unused vendor files after removing cluster-api-provider-azure
code from the installer. The MAO still vendors some CAPZ files.
This commit is contained in:
patrickdillon
2021-12-10 10:00:32 -05:00
parent f9725ddd94
commit c6ee1ea777
12 changed files with 1 additions and 1564 deletions

3
go.mod
View File

@@ -101,7 +101,6 @@ require (
k8s.io/klog/v2 v2.9.0
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a
sigs.k8s.io/cluster-api-provider-aws v0.0.0
sigs.k8s.io/cluster-api-provider-azure v0.0.0
sigs.k8s.io/cluster-api-provider-openstack v0.0.0
sigs.k8s.io/controller-tools v0.7.0
)
@@ -390,7 +389,7 @@ replace (
k8s.io/client-go => k8s.io/client-go v0.22.0
k8s.io/kubectl => k8s.io/kubectl v0.21.0-rc.0
sigs.k8s.io/cluster-api-provider-aws => github.com/openshift/cluster-api-provider-aws v0.2.1-0.20210121023454-5ffc5f422a80
sigs.k8s.io/cluster-api-provider-azure => github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20210626224711-5d94c794092f
sigs.k8s.io/cluster-api-provider-azure => github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20210626224711-5d94c794092f // Indirect dependency through MAO from cluster API providers
sigs.k8s.io/cluster-api-provider-openstack => github.com/openshift/cluster-api-provider-openstack v0.0.0-20211111204942-611d320170af
sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.9.0-alpha.1
sigs.k8s.io/controller-tools => sigs.k8s.io/controller-tools v0.3.1-0.20200617211605-651903477185

1
go.sum
View File

@@ -1547,7 +1547,6 @@ github.com/openshift/cluster-api-provider-alibaba v0.0.0-20211123142315-d16daa4e
github.com/openshift/cluster-api-provider-alibaba v0.0.0-20211123142315-d16daa4e6349/go.mod h1:vJHKJg2+CEt1wmawpkFrg1IRlgyeaaGtzz76IM/z2os=
github.com/openshift/cluster-api-provider-aws v0.2.1-0.20210121023454-5ffc5f422a80 h1:fFHoy/1QCLUcfo/NceEM8jGY2Tafl1BmyLa7tReN328=
github.com/openshift/cluster-api-provider-aws v0.2.1-0.20210121023454-5ffc5f422a80/go.mod h1:JV7aXj/LZ8B4MwIQdhGxpTO2PCG8+7UKFd6FaOZCSzA=
github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20210626224711-5d94c794092f h1:rQwvVLPZfM5o0USkVY6mrAyJwzMUkhjn9Wz2D5vX81k=
github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20210626224711-5d94c794092f/go.mod h1:GR+ocB8I+Z7JTSBdO+DMu/diBfH66lRlRpnc1KWysUM=
github.com/openshift/cluster-api-provider-baremetal v0.0.0-20190821174549-a2a477909c1d h1:6+XwaVvSMPHm3nFdZW3g+iXiOHpf0Y2ajY5/Zr66Dt0=
github.com/openshift/cluster-api-provider-baremetal v0.0.0-20190821174549-a2a477909c1d/go.mod h1:S+wtA0Rm2FZ5ccC9zNQXUWUDesR6Jsdn5eb6HjAR+Gs=

4
vendor/modules.txt vendored
View File

@@ -3128,10 +3128,6 @@ k8s.io/utils/trace
## explicit; go 1.15
sigs.k8s.io/cluster-api-provider-aws/pkg/apis
sigs.k8s.io/cluster-api-provider-aws/pkg/apis/awsprovider/v1beta1
# sigs.k8s.io/cluster-api-provider-azure v0.0.0 => github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20210626224711-5d94c794092f
## explicit; go 1.15
sigs.k8s.io/cluster-api-provider-azure/pkg/apis
sigs.k8s.io/cluster-api-provider-azure/pkg/apis/azureprovider/v1beta1
# sigs.k8s.io/cluster-api-provider-openstack v0.0.0 => github.com/openshift/cluster-api-provider-openstack v0.0.0-20211111204942-611d320170af
## explicit; go 1.16
sigs.k8s.io/cluster-api-provider-openstack/pkg/apis

View File

@@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
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.

View File

@@ -1,26 +0,0 @@
/*
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 apis
import (
"sigs.k8s.io/cluster-api-provider-azure/pkg/apis/azureprovider/v1beta1"
)
func init() {
// Register the types with the Scheme so the components can map objects to GroupVersionKinds and back
AddToSchemes = append(AddToSchemes, v1beta1.SchemeBuilder.AddToScheme)
}

View File

@@ -1,33 +0,0 @@
/*
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.
*/
// Generate deepcopy for apis
//go:generate go run ../../vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go -O zz_generated.deepcopy -i ./... -h ../../hack/boilerplate/boilerplate.go.txt
// Package apis contains Kubernetes API groups.
package apis
import (
"k8s.io/apimachinery/pkg/runtime"
)
// AddToSchemes may be used to add all resources defined in the project to a Scheme
var AddToSchemes runtime.SchemeBuilder
// AddToScheme adds all Resources to the Scheme
func AddToScheme(s *runtime.Scheme) error {
return AddToSchemes.AddToScheme(s)
}

View File

@@ -1,111 +0,0 @@
/*
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 v1beta1
import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// Annotation constants
const (
// ClusterIDLabel is the label that a machineset must have to identify the
// cluster to which it belongs.
ClusterIDLabel = "machine.openshift.io/cluster-api-cluster"
)
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// AzureMachineProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field
// for an Azure virtual machine. It is used by the Azure machine actuator to create a single Machine.
// Required parameters such as location that are not specified by this configuration, will be defaulted
// by the actuator.
// TODO: Update type
// +k8s:openapi-gen=true
type AzureMachineProviderSpec struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// UserDataSecret contains a local reference to a secret that contains the
// UserData to apply to the instance
UserDataSecret *corev1.SecretReference `json:"userDataSecret,omitempty"`
// CredentialsSecret is a reference to the secret with Azure credentials.
CredentialsSecret *corev1.SecretReference `json:"credentialsSecret,omitempty"`
Location string `json:"location,omitempty"`
VMSize string `json:"vmSize,omitempty"`
Image Image `json:"image"`
OSDisk OSDisk `json:"osDisk"`
SSHPublicKey string `json:"sshPublicKey,omitempty"`
PublicIP bool `json:"publicIP"`
Tags map[string]string `json:"tags,omitempty"`
// Network Security Group that needs to be attached to the machine's interface.
// No security group will be attached if empty.
SecurityGroup string `json:"securityGroup,omitempty"`
// Application Security Groups that need to be attached to the machine's interface.
// No application security groups will be attached if zero-length.
ApplicationSecurityGroups []string `json:"applicationSecurityGroups,omitempty"`
// Subnet to use for this instance
Subnet string `json:"subnet"`
// PublicLoadBalancer to use for this instance
PublicLoadBalancer string `json:"publicLoadBalancer,omitempty"`
// InternalLoadBalancerName to use for this instance
InternalLoadBalancer string `json:"internalLoadBalancer,omitempty"`
// NatRule to set inbound NAT rule of the load balancer
NatRule *int `json:"natRule,omitempty"`
// ManagedIdentity to set managed identity name
ManagedIdentity string `json:"managedIdentity,omitempty"`
// Vnet to set virtual network name
Vnet string `json:"vnet,omitempty"`
// Availability Zone for the virtual machine.
// If nil, the virtual machine should be deployed to no zone
Zone *string `json:"zone,omitempty"`
NetworkResourceGroup string `json:"networkResourceGroup,omitempty"`
ResourceGroup string `json:"resourceGroup,omitempty"`
// SpotVMOptions allows the ability to specify the Machine should use a Spot VM
SpotVMOptions *SpotVMOptions `json:"spotVMOptions,omitempty"`
// SecurityProfile specifies the Security profile settings for a virtual machine.
// +optional
SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
}
// SpotVMOptions defines the options relevant to running the Machine on Spot VMs
type SpotVMOptions struct {
// MaxPrice defines the maximum price the user is willing to pay for Spot VM instances
MaxPrice *resource.Quantity `json:"maxPrice,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func init() {
SchemeBuilder.Register(&AzureMachineProviderSpec{})
}

View File

@@ -1,72 +0,0 @@
/*
Copyright 2019 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 v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// AzureMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field.
// It contains Azure-specific status information.
// +k8s:openapi-gen=true
type AzureMachineProviderStatus struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// VMID is the ID of the virtual machine created in Azure.
// +optional
VMID *string `json:"vmId,omitempty"`
// VMState is the provisioning state of the Azure virtual machine.
// +optional
VMState *VMState `json:"vmState,omitempty"`
// Conditions is a set of conditions associated with the Machine to indicate
// errors or other status.
// +optional
Conditions []AzureMachineProviderCondition `json:"conditions,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func init() {
SchemeBuilder.Register(&AzureMachineProviderStatus{})
}
// SubnetSpec configures an Azure subnet.
type SubnetSpec struct {
// ID defines a unique identifier to reference this resource.
ID string `json:"id,omitempty"`
// Name defines a name for the subnet resource.
Name string `json:"name"`
// VnetID defines the ID of the virtual network this subnet should be built in.
VnetID string `json:"vnetId"`
// CidrBlock is the CIDR block to be used when the provider creates a managed Vnet.
CidrBlock string `json:"cidrBlock,omitempty"`
// SecurityGroup defines the NSG (network security group) that should be attached to this subnet.
SecurityGroup SecurityGroup `json:"securityGroup"`
// Tags is a collection of tags describing the resource.
// TODO: Uncomment once tagging is implemented.
//Tags tags.Map `json:"tags,omitempty"`
}

View File

@@ -1,23 +0,0 @@
/*
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 v1beta1 contains API Schema definitions for the azureprovider v1beta1 API group
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-azure/pkg/apis/azureprovider
// +k8s:defaulter-gen=TypeMeta
// +groupName=azureproviderconfig.openshift.io
package v1beta1

View File

@@ -1,93 +0,0 @@
/*
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.
*/
// NOTE: Boilerplate only. Ignore this file.
// Package v1beta1 contains API Schema definitions for the azureprovider v1beta1 API group
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-azure/pkg/apis/azureprovider
// +k8s:defaulter-gen=TypeMeta
// +groupName=azureproviderconfig.openshift.io
package v1beta1
import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/json"
"sigs.k8s.io/controller-runtime/pkg/scheme"
"sigs.k8s.io/yaml"
)
var (
// SchemeGroupVersion is group version used to register these objects
SchemeGroupVersion = schema.GroupVersion{Group: "azureproviderconfig.openshift.io", Version: "v1beta1"}
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)
// MachineStatusFromProviderStatus unmarshals a raw extension into an Azure machine type
func MachineStatusFromProviderStatus(extension *runtime.RawExtension) (*AzureMachineProviderStatus, error) {
if extension == nil {
return &AzureMachineProviderStatus{}, nil
}
status := new(AzureMachineProviderStatus)
if err := yaml.Unmarshal(extension.Raw, status); err != nil {
return nil, err
}
return status, nil
}
// EncodeMachineStatus marshals the machine status
func EncodeMachineStatus(status *AzureMachineProviderStatus) (*runtime.RawExtension, error) {
if status == nil {
return &runtime.RawExtension{}, nil
}
var rawBytes []byte
var err error
// TODO: use apimachinery conversion https://godoc.org/k8s.io/apimachinery/pkg/runtime#Convert_runtime_Object_To_runtime_RawExtension
if rawBytes, err = json.Marshal(status); err != nil {
return nil, err
}
return &runtime.RawExtension{
Raw: rawBytes,
}, nil
}
// EncodeMachineSpec marshals the machine provider spec.
func EncodeMachineSpec(spec *AzureMachineProviderSpec) (*runtime.RawExtension, error) {
if spec == nil {
return &runtime.RawExtension{}, nil
}
var rawBytes []byte
var err error
// TODO: use apimachinery conversion https://godoc.org/k8s.io/apimachinery/pkg/runtime#Convert_runtime_Object_To_runtime_RawExtension
if rawBytes, err = json.Marshal(spec); err != nil {
return nil, err
}
return &runtime.RawExtension{
Raw: rawBytes,
}, nil
}

View File

@@ -1,427 +0,0 @@
/*
Copyright 2019 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 v1beta1
import (
"time"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// TODO: Write type tests
// AzureResourceReference is a reference to a specific Azure resource by ID
type AzureResourceReference struct {
// ID of resource
// +optional
ID *string `json:"id,omitempty"`
// TODO: Investigate if we should reference resources in other ways
}
// TODO: Investigate resource filters
// AzureMachineProviderConditionType is a valid value for AzureMachineProviderCondition.Type
type AzureMachineProviderConditionType string
// Valid conditions for an Azure machine instance
const (
// MachineCreated indicates whether the machine has been created or not. If not,
// it should include a reason and message for the failure.
MachineCreated AzureMachineProviderConditionType = "MachineCreated"
)
// AzureMachineProviderCondition is a condition in a AzureMachineProviderStatus
type AzureMachineProviderCondition struct {
// Type is the type of the condition.
Type AzureMachineProviderConditionType `json:"type"`
// Status is the status of the condition.
Status corev1.ConditionStatus `json:"status"`
// LastProbeTime is the last time we probed the condition.
// +optional
LastProbeTime metav1.Time `json:"lastProbeTime"`
// LastTransitionTime is the last time the condition transitioned from one status to another.
// +optional
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
// Reason is a unique, one-word, CamelCase reason for the condition's last transition.
// +optional
Reason string `json:"reason"`
// Message is a human-readable message indicating details about last transition.
// +optional
Message string `json:"message"`
}
const (
// ControlPlane machine label
ControlPlane string = "master"
// Node machine label
Node string = "worker"
// MachineRoleLabel machine label to determine the role
MachineRoleLabel = "machine.openshift.io/cluster-api-machine-role"
)
// Network encapsulates Azure networking resources.
type Network struct {
// SecurityGroups is a map from the role/kind of the security group to its unique name, if any.
SecurityGroups map[SecurityGroupRole]*SecurityGroup `json:"securityGroups,omitempty"`
// APIServerLB is the Kubernetes API server load balancer.
APIServerLB LoadBalancer `json:"apiServerLb,omitempty"`
// APIServerIP is the Kubernetes API server public IP address.
APIServerIP PublicIP `json:"apiServerIp,omitempty"`
}
// TODO: Implement tagging
/*
// Tags defines resource tags.
type Tags map[string]*string
*/
// Subnets is a slice of Subnet.
type Subnets []*SubnetSpec
// TODO
// ToMap returns a map from id to subnet.
func (s Subnets) ToMap() map[string]*SubnetSpec {
res := make(map[string]*SubnetSpec)
for _, x := range s {
res[x.ID] = x
}
return res
}
// SecurityGroupRole defines the unique role of a security group.
type SecurityGroupRole string
var (
// SecurityGroupBastion defines an SSH bastion role
SecurityGroupBastion = SecurityGroupRole("bastion")
// SecurityGroupNode defines a Kubernetes workload node role
SecurityGroupNode = SecurityGroupRole(Node)
// SecurityGroupControlPlane defines a Kubernetes control plane node role
SecurityGroupControlPlane = SecurityGroupRole(ControlPlane)
)
// SecurityGroup defines an Azure security group.
type SecurityGroup struct {
ID string `json:"id"`
Name string `json:"name"`
IngressRules IngressRules `json:"ingressRule"`
// TODO: Uncomment once tagging is implemented.
//Tags *Tags `json:"tags"`
}
/*
// TODO
// String returns a string representation of the security group.
func (s *SecurityGroup) String() string {
return fmt.Sprintf("id=%s/name=%s", s.ID, s.Name)
}
*/
// SecurityGroupProtocol defines the protocol type for a security group rule.
type SecurityGroupProtocol string
var (
// SecurityGroupProtocolAll is a wildcard for all IP protocols
SecurityGroupProtocolAll = SecurityGroupProtocol("*")
// SecurityGroupProtocolTCP represents the TCP protocol in ingress rules
SecurityGroupProtocolTCP = SecurityGroupProtocol("Tcp")
// SecurityGroupProtocolUDP represents the UDP protocol in ingress rules
SecurityGroupProtocolUDP = SecurityGroupProtocol("Udp")
)
// TODO
// IngressRule defines an Azure ingress rule for security groups.
type IngressRule struct {
Description string `json:"description"`
Protocol SecurityGroupProtocol `json:"protocol"`
// SourcePorts - The source port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports.
SourcePorts *string `json:"sourcePorts,omitempty"`
// DestinationPorts - The destination port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports.
DestinationPorts *string `json:"destinationPorts,omitempty"`
// Source - The CIDR or source IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
Source *string `json:"source,omitempty"`
// Destination - The destination address prefix. CIDR or destination IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
Destination *string `json:"destination,omitempty"`
}
// TODO
// String returns a string representation of the ingress rule.
/*
func (i *IngressRule) String() string {
return fmt.Sprintf("protocol=%s/range=[%d-%d]/description=%s", i.Protocol, i.FromPort, i.ToPort, i.Description)
}
*/
// TODO
// IngressRules is a slice of Azure ingress rules for security groups.
type IngressRules []*IngressRule
// TODO
// Difference returns the difference between this slice and the other slice.
/*
func (i IngressRules) Difference(o IngressRules) (out IngressRules) {
for _, x := range i {
found := false
for _, y := range o {
sort.Strings(x.CidrBlocks)
sort.Strings(y.CidrBlocks)
sort.Strings(x.SourceSecurityGroupIDs)
sort.Strings(y.SourceSecurityGroupIDs)
if reflect.DeepEqual(x, y) {
found = true
break
}
}
if !found {
out = append(out, x)
}
}
return
}
*/
// PublicIP defines an Azure public IP address.
// TODO: Remove once load balancer is implemented.
type PublicIP struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
IPAddress string `json:"ipAddress,omitempty"`
DNSName string `json:"dnsName,omitempty"`
}
// TODO
// LoadBalancer defines an Azure load balancer.
type LoadBalancer struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
SKU SKU `json:"sku,omitempty"`
FrontendIPConfig FrontendIPConfig `json:"frontendIpConfig,omitempty"`
BackendPool BackendPool `json:"backendPool,omitempty"`
// TODO: Uncomment once tagging is implemented.
//Tags Tags `json:"tags,omitempty"`
/*
// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
// BackendAddressPools - Collection of backend address pools used by a load balancer
BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
// Probes - Collection of probe objects used in the load balancer
Probes *[]Probe `json:"probes,omitempty"`
// InboundNatRules - Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules.
InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
// InboundNatPools - Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules.
InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
// OutboundRules - The outbound rules.
OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
// ResourceGUID - The resource GUID property of the load balancer resource.
ResourceGUID *string `json:"resourceGuid,omitempty"`
// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
ProvisioningState *string `json:"provisioningState,omitempty"`
*/
}
// LoadBalancerSKU enumerates the values for load balancer sku name.
type SKU string
var (
SKUBasic = SKU("Basic")
SKUStandard = SKU("Standard")
)
type FrontendIPConfig struct {
/*
// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
Name *string `json:"name,omitempty"`
// Etag - A unique read-only string that changes whenever the resource is updated.
Etag *string `json:"etag,omitempty"`
// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
Zones *[]string `json:"zones,omitempty"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
*/
}
type BackendPool struct {
Name string `json:"name,omitempty"`
ID string `json:"id,omitempty"`
}
// TODO
// LoadBalancerProtocol defines listener protocols for a load balancer.
type LoadBalancerProtocol string
// TODO
var (
// LoadBalancerProtocolTCP defines the LB API string representing the TCP protocol
LoadBalancerProtocolTCP = LoadBalancerProtocol("TCP")
// LoadBalancerProtocolSSL defines the LB API string representing the TLS protocol
LoadBalancerProtocolSSL = LoadBalancerProtocol("SSL")
// LoadBalancerProtocolHTTP defines the LB API string representing the HTTP protocol at L7
LoadBalancerProtocolHTTP = LoadBalancerProtocol("HTTP")
// LoadBalancerProtocolHTTPS defines the LB API string representing the HTTP protocol at L7
LoadBalancerProtocolHTTPS = LoadBalancerProtocol("HTTPS")
)
// TODO
// LoadBalancerListener defines an Azure load balancer listener.
type LoadBalancerListener struct {
Protocol LoadBalancerProtocol `json:"protocol"`
Port int64 `json:"port"`
InstanceProtocol LoadBalancerProtocol `json:"instanceProtocol"`
InstancePort int64 `json:"instancePort"`
}
// TODO
// LoadBalancerHealthCheck defines an Azure load balancer health check.
type LoadBalancerHealthCheck struct {
Target string `json:"target"`
Interval time.Duration `json:"interval"`
Timeout time.Duration `json:"timeout"`
HealthyThreshold int64 `json:"healthyThreshold"`
UnhealthyThreshold int64 `json:"unhealthyThreshold"`
}
// VMState describes the state of an Azure virtual machine.
type VMState string
var (
// ProvisioningState related values
// VMStateCreating ...
VMStateCreating = VMState("Creating")
// VMStateDeleting ...
VMStateDeleting = VMState("Deleting")
// VMStateFailed ...
VMStateFailed = VMState("Failed")
// VMStateMigrating ...
VMStateMigrating = VMState("Migrating")
// VMStateSucceeded ...
VMStateSucceeded = VMState("Succeeded")
// VMStateUpdating ...
VMStateUpdating = VMState("Updating")
// PowerState related values
// VMStateStarting ...
VMStateStarting = VMState("Starting")
// VMStateRunning ...
VMStateRunning = VMState("Running")
// VMStateStopping ...
VMStateStopping = VMState("Stopping")
// VMStateStopped ...
VMStateStopped = VMState("Stopped")
// VMStateDeallocating ...
VMStateDeallocating = VMState("Deallocating")
// VMStateDeallocated ...
VMStateDeallocated = VMState("Deallocated")
// VMStateUnknown ...
VMStateUnknown = VMState("Unknown")
)
// VM describes an Azure virtual machine.
type VM struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
// Hardware profile
VMSize string `json:"vmSize,omitempty"`
// Storage profile
Image Image `json:"image,omitempty"`
OSDisk OSDisk `json:"osDisk,omitempty"`
StartupScript string `json:"startupScript,omitempty"`
// State - The provisioning state, which only appears in the response.
State VMState `json:"vmState,omitempty"`
Identity VMIdentity `json:"identity,omitempty"`
// TODO: Uncomment once tagging is implemented.
//Tags Tags `json:"tags,omitempty"`
// HardwareProfile - Specifies the hardware settings for the virtual machine.
//HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
// StorageProfile - Specifies the storage settings for the virtual machine disks.
//StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
// AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine.
//AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
// OsProfile - Specifies the operating system settings for the virtual machine.
//OsProfile *OSProfile `json:"osProfile,omitempty"`
// NetworkProfile - Specifies the network interfaces of the virtual machine.
//NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
//AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
}
// Image is a mirror of azure sdk compute.ImageReference
type Image struct {
// Fields below refer to os images in marketplace
Publisher string `json:"publisher"`
Offer string `json:"offer"`
SKU string `json:"sku"`
Version string `json:"version"`
// ResourceID represents the location of OS Image in azure subscription
ResourceID string `json:"resourceID"`
}
// VMIdentity defines the identity of the virtual machine, if configured.
type VMIdentity string
type OSDisk struct {
OSType string `json:"osType"`
ManagedDisk ManagedDiskParameters `json:"managedDisk"`
DiskSizeGB int32 `json:"diskSizeGB"`
}
type ManagedDiskParameters struct {
StorageAccountType string `json:"storageAccountType"`
DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
}
type DiskEncryptionSetParameters struct {
ID string `json:"id,omitempty"`
}
// SecurityProfile specifies the Security profile settings for a
// virtual machine or virtual machine scale set.
type SecurityProfile struct {
// This field indicates whether Host Encryption should be enabled
// or disabled for a virtual machine or virtual machine scale
// set. Default is disabled.
EncryptionAtHost *bool `json:"encryptionAtHost,omitempty"`
}

View File

@@ -1,571 +0,0 @@
// +build !ignore_autogenerated
/*
Copyright 2021 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.
*/
// Code generated by main. DO NOT EDIT.
package v1beta1
import (
v1 "k8s.io/api/core/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AzureMachineProviderCondition) DeepCopyInto(out *AzureMachineProviderCondition) {
*out = *in
in.LastProbeTime.DeepCopyInto(&out.LastProbeTime)
in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineProviderCondition.
func (in *AzureMachineProviderCondition) DeepCopy() *AzureMachineProviderCondition {
if in == nil {
return nil
}
out := new(AzureMachineProviderCondition)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AzureMachineProviderSpec) DeepCopyInto(out *AzureMachineProviderSpec) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if in.UserDataSecret != nil {
in, out := &in.UserDataSecret, &out.UserDataSecret
*out = new(v1.SecretReference)
**out = **in
}
if in.CredentialsSecret != nil {
in, out := &in.CredentialsSecret, &out.CredentialsSecret
*out = new(v1.SecretReference)
**out = **in
}
out.Image = in.Image
in.OSDisk.DeepCopyInto(&out.OSDisk)
if in.Tags != nil {
in, out := &in.Tags, &out.Tags
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.ApplicationSecurityGroups != nil {
in, out := &in.ApplicationSecurityGroups, &out.ApplicationSecurityGroups
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.NatRule != nil {
in, out := &in.NatRule, &out.NatRule
*out = new(int)
**out = **in
}
if in.Zone != nil {
in, out := &in.Zone, &out.Zone
*out = new(string)
**out = **in
}
if in.SpotVMOptions != nil {
in, out := &in.SpotVMOptions, &out.SpotVMOptions
*out = new(SpotVMOptions)
(*in).DeepCopyInto(*out)
}
if in.SecurityProfile != nil {
in, out := &in.SecurityProfile, &out.SecurityProfile
*out = new(SecurityProfile)
(*in).DeepCopyInto(*out)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineProviderSpec.
func (in *AzureMachineProviderSpec) DeepCopy() *AzureMachineProviderSpec {
if in == nil {
return nil
}
out := new(AzureMachineProviderSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *AzureMachineProviderSpec) 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 *AzureMachineProviderStatus) DeepCopyInto(out *AzureMachineProviderStatus) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if in.VMID != nil {
in, out := &in.VMID, &out.VMID
*out = new(string)
**out = **in
}
if in.VMState != nil {
in, out := &in.VMState, &out.VMState
*out = new(VMState)
**out = **in
}
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]AzureMachineProviderCondition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineProviderStatus.
func (in *AzureMachineProviderStatus) DeepCopy() *AzureMachineProviderStatus {
if in == nil {
return nil
}
out := new(AzureMachineProviderStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *AzureMachineProviderStatus) 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 *AzureResourceReference) DeepCopyInto(out *AzureResourceReference) {
*out = *in
if in.ID != nil {
in, out := &in.ID, &out.ID
*out = new(string)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureResourceReference.
func (in *AzureResourceReference) DeepCopy() *AzureResourceReference {
if in == nil {
return nil
}
out := new(AzureResourceReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *BackendPool) DeepCopyInto(out *BackendPool) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendPool.
func (in *BackendPool) DeepCopy() *BackendPool {
if in == nil {
return nil
}
out := new(BackendPool)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DiskEncryptionSetParameters) DeepCopyInto(out *DiskEncryptionSetParameters) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskEncryptionSetParameters.
func (in *DiskEncryptionSetParameters) DeepCopy() *DiskEncryptionSetParameters {
if in == nil {
return nil
}
out := new(DiskEncryptionSetParameters)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *FrontendIPConfig) DeepCopyInto(out *FrontendIPConfig) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrontendIPConfig.
func (in *FrontendIPConfig) DeepCopy() *FrontendIPConfig {
if in == nil {
return nil
}
out := new(FrontendIPConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Image) DeepCopyInto(out *Image) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image.
func (in *Image) DeepCopy() *Image {
if in == nil {
return nil
}
out := new(Image)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IngressRule) DeepCopyInto(out *IngressRule) {
*out = *in
if in.SourcePorts != nil {
in, out := &in.SourcePorts, &out.SourcePorts
*out = new(string)
**out = **in
}
if in.DestinationPorts != nil {
in, out := &in.DestinationPorts, &out.DestinationPorts
*out = new(string)
**out = **in
}
if in.Source != nil {
in, out := &in.Source, &out.Source
*out = new(string)
**out = **in
}
if in.Destination != nil {
in, out := &in.Destination, &out.Destination
*out = new(string)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressRule.
func (in *IngressRule) DeepCopy() *IngressRule {
if in == nil {
return nil
}
out := new(IngressRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in IngressRules) DeepCopyInto(out *IngressRules) {
{
in := &in
*out = make(IngressRules, len(*in))
for i := range *in {
if (*in)[i] != nil {
in, out := &(*in)[i], &(*out)[i]
*out = new(IngressRule)
(*in).DeepCopyInto(*out)
}
}
return
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressRules.
func (in IngressRules) DeepCopy() IngressRules {
if in == nil {
return nil
}
out := new(IngressRules)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LoadBalancer) DeepCopyInto(out *LoadBalancer) {
*out = *in
out.FrontendIPConfig = in.FrontendIPConfig
out.BackendPool = in.BackendPool
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancer.
func (in *LoadBalancer) DeepCopy() *LoadBalancer {
if in == nil {
return nil
}
out := new(LoadBalancer)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LoadBalancerHealthCheck) DeepCopyInto(out *LoadBalancerHealthCheck) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerHealthCheck.
func (in *LoadBalancerHealthCheck) DeepCopy() *LoadBalancerHealthCheck {
if in == nil {
return nil
}
out := new(LoadBalancerHealthCheck)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LoadBalancerListener) DeepCopyInto(out *LoadBalancerListener) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerListener.
func (in *LoadBalancerListener) DeepCopy() *LoadBalancerListener {
if in == nil {
return nil
}
out := new(LoadBalancerListener)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ManagedDiskParameters) DeepCopyInto(out *ManagedDiskParameters) {
*out = *in
if in.DiskEncryptionSet != nil {
in, out := &in.DiskEncryptionSet, &out.DiskEncryptionSet
*out = new(DiskEncryptionSetParameters)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedDiskParameters.
func (in *ManagedDiskParameters) DeepCopy() *ManagedDiskParameters {
if in == nil {
return nil
}
out := new(ManagedDiskParameters)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Network) DeepCopyInto(out *Network) {
*out = *in
if in.SecurityGroups != nil {
in, out := &in.SecurityGroups, &out.SecurityGroups
*out = make(map[SecurityGroupRole]*SecurityGroup, len(*in))
for key, val := range *in {
var outVal *SecurityGroup
if val == nil {
(*out)[key] = nil
} else {
in, out := &val, &outVal
*out = new(SecurityGroup)
(*in).DeepCopyInto(*out)
}
(*out)[key] = outVal
}
}
out.APIServerLB = in.APIServerLB
out.APIServerIP = in.APIServerIP
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network.
func (in *Network) DeepCopy() *Network {
if in == nil {
return nil
}
out := new(Network)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OSDisk) DeepCopyInto(out *OSDisk) {
*out = *in
in.ManagedDisk.DeepCopyInto(&out.ManagedDisk)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OSDisk.
func (in *OSDisk) DeepCopy() *OSDisk {
if in == nil {
return nil
}
out := new(OSDisk)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PublicIP) DeepCopyInto(out *PublicIP) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublicIP.
func (in *PublicIP) DeepCopy() *PublicIP {
if in == nil {
return nil
}
out := new(PublicIP)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SecurityGroup) DeepCopyInto(out *SecurityGroup) {
*out = *in
if in.IngressRules != nil {
in, out := &in.IngressRules, &out.IngressRules
*out = make(IngressRules, len(*in))
for i := range *in {
if (*in)[i] != nil {
in, out := &(*in)[i], &(*out)[i]
*out = new(IngressRule)
(*in).DeepCopyInto(*out)
}
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroup.
func (in *SecurityGroup) DeepCopy() *SecurityGroup {
if in == nil {
return nil
}
out := new(SecurityGroup)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SecurityProfile) DeepCopyInto(out *SecurityProfile) {
*out = *in
if in.EncryptionAtHost != nil {
in, out := &in.EncryptionAtHost, &out.EncryptionAtHost
*out = new(bool)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityProfile.
func (in *SecurityProfile) DeepCopy() *SecurityProfile {
if in == nil {
return nil
}
out := new(SecurityProfile)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SpotVMOptions) DeepCopyInto(out *SpotVMOptions) {
*out = *in
if in.MaxPrice != nil {
in, out := &in.MaxPrice, &out.MaxPrice
x := (*in).DeepCopy()
*out = &x
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpotVMOptions.
func (in *SpotVMOptions) DeepCopy() *SpotVMOptions {
if in == nil {
return nil
}
out := new(SpotVMOptions)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SubnetSpec) DeepCopyInto(out *SubnetSpec) {
*out = *in
in.SecurityGroup.DeepCopyInto(&out.SecurityGroup)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetSpec.
func (in *SubnetSpec) DeepCopy() *SubnetSpec {
if in == nil {
return nil
}
out := new(SubnetSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in Subnets) DeepCopyInto(out *Subnets) {
{
in := &in
*out = make(Subnets, len(*in))
for i := range *in {
if (*in)[i] != nil {
in, out := &(*in)[i], &(*out)[i]
*out = new(SubnetSpec)
(*in).DeepCopyInto(*out)
}
}
return
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subnets.
func (in Subnets) DeepCopy() Subnets {
if in == nil {
return nil
}
out := new(Subnets)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VM) DeepCopyInto(out *VM) {
*out = *in
out.Image = in.Image
in.OSDisk.DeepCopyInto(&out.OSDisk)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VM.
func (in *VM) DeepCopy() *VM {
if in == nil {
return nil
}
out := new(VM)
in.DeepCopyInto(out)
return out
}