From 90a80ea58a595afc7cb01ccafedabdf0c0329211 Mon Sep 17 00:00:00 2001 From: Chris Gunn Date: Wed, 31 Mar 2021 12:09:08 -0700 Subject: [PATCH 01/16] bare metal --- Makefile | 15 +- .../azurestackhciloadbalancer_types.go | 6 +- api/v1alpha3/azurestackhcimachine_types.go | 3 + .../azurestackhcivirtualmachine_types.go | 9 + api/v1alpha3/types.go | 12 + cloud/converters/vm.go | 14 +- cloud/scope/scopeinterface.go | 1 + cloud/scope/virtualmachine.go | 5 + cloud/services/virtualmachines/service.go | 18 +- .../virtualmachines/virtualmachines.go | 242 ++++++++++++++++-- ...luster.x-k8s.io_azurestackhciclusters.yaml | 6 +- ...r.x-k8s.io_azurestackhciloadbalancers.yaml | 6 +- ...luster.x-k8s.io_azurestackhcimachines.yaml | 6 +- ...-k8s.io_azurestackhcimachinetemplates.yaml | 6 +- ...x-k8s.io_azurestackhcivirtualmachines.yaml | 11 +- .../azurestackhciloadbalancer_controller.go | 1 + .../azurestackhcimachine_controller.go | 1 + .../azurestackhcivirtualmachine_controller.go | 1 + .../azurestackhcivirtualmachine_reconciler.go | 32 ++- dev/.gitignore | 1 + dev/kustomization.yaml | 10 + dev/manager_image_patch_template.yaml | 3 + go.mod | 8 +- go.sum | 29 +++ hack/tools/go.mod | 2 +- hack/tools/go.sum | 2 + templates/flavors/base/cluster-template.yaml | 6 +- templates/flavors/mgmt/mgmt-machine.yaml | 1 + 28 files changed, 398 insertions(+), 59 deletions(-) create mode 100644 dev/.gitignore create mode 100644 dev/kustomization.yaml create mode 100644 dev/manager_image_patch_template.yaml diff --git a/Makefile b/Makefile index c32d122e..5e44a210 100644 --- a/Makefile +++ b/Makefile @@ -212,10 +212,13 @@ docker-login: ## Login docker to a private registry @if [ -z "${DOCKER_PASSWORD}" ]; then echo "DOCKER_PASSWORD is not set"; exit 1; fi docker login $(STAGING_REGISTRY) -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD} -.PHONY: docker-build -docker-build: manager ## Build the docker image for controller-manager +.PHONY: docker-build-img +docker-build-img: manager #docker build --pull --build-arg ARCH=$(ARCH) . -t $(CONTROLLER_IMG)-$(ARCH):$(TAG) docker build --pull --build-arg ARCH=$(ARCH) . -t $(CONTROLLER_IMG):$(TAG) + +.PHONY: docker-build +docker-build: docker-build-img ## Build the docker image for controller-manager #MANIFEST_IMG=$(CONTROLLER_IMG)-$(ARCH) MANIFEST_TAG=$(TAG) $(MAKE) set-manifest-image MANIFEST_IMG=$(CONTROLLER_IMG) MANIFEST_TAG=$(TAG) $(MAKE) set-manifest-image $(MAKE) set-manifest-pull-policy @@ -346,6 +349,14 @@ create-cluster: .PHONY: deployment deployment: dev-release create-cluster ## Build and deploy caph in a kind management cluster. +# Build CAPH K8s definitions for dev purposes. +# Useful when a custom $REGISTRY URL has been set. (For example, when using a local docker container registry.) +.PHONY: dev-manifests +dev-manifests: $(RELEASE_DIR) + cp ./dev/manager_image_patch_template.yaml ./dev/manager_image_patch.yaml + sed -i'' -e 's@value: .*@value: '"${CONTROLLER_IMG}:$(TAG)"'@' ./dev/manager_image_patch.yaml + kustomize build dev > $(RELEASE_DIR)/infrastructure-components.yaml + ## -------------------------------------- ## Kind ## -------------------------------------- diff --git a/api/v1alpha3/azurestackhciloadbalancer_types.go b/api/v1alpha3/azurestackhciloadbalancer_types.go index 282c9c7e..89b7f733 100644 --- a/api/v1alpha3/azurestackhciloadbalancer_types.go +++ b/api/v1alpha3/azurestackhciloadbalancer_types.go @@ -30,7 +30,11 @@ const ( type AzureStackHCILoadBalancerSpec struct { SSHPublicKey string `json:"sshPublicKey"` Image Image `json:"image"` - VMSize string `json:"vmSize"` + + // +optional + HostType HostType `json:"hostType,omitempty"` + + VMSize string `json:"vmSize"` } type AzureStackHCILoadBalancerStatus struct { diff --git a/api/v1alpha3/azurestackhcimachine_types.go b/api/v1alpha3/azurestackhcimachine_types.go index a3f94706..1b422e1b 100644 --- a/api/v1alpha3/azurestackhcimachine_types.go +++ b/api/v1alpha3/azurestackhcimachine_types.go @@ -35,6 +35,9 @@ type AzureStackHCIMachineSpec struct { // +optional ProviderID *string `json:"providerID,omitempty"` + // +optional + HostType HostType `json:"hostType,omitempty"` + VMSize string `json:"vmSize"` AvailabilityZone AvailabilityZone `json:"availabilityZone,omitempty"` diff --git a/api/v1alpha3/azurestackhcivirtualmachine_types.go b/api/v1alpha3/azurestackhcivirtualmachine_types.go index 6efabcb6..581b523f 100644 --- a/api/v1alpha3/azurestackhcivirtualmachine_types.go +++ b/api/v1alpha3/azurestackhcivirtualmachine_types.go @@ -31,6 +31,9 @@ const ( // AzureStackHCIVirtualMachineSpec defines the desired state of AzureStackHCIVirtualMachine type AzureStackHCIVirtualMachineSpec struct { + // +optional + HostType HostType `json:"hostType,omitempty"` + VMSize string `json:"vmSize"` AvailabilityZone AvailabilityZone `json:"availabilityZone,omitempty"` Image Image `json:"image"` @@ -66,6 +69,12 @@ type AzureStackHCIVirtualMachineStatus struct { // +optional FailureMessage *string `json:"failureMessage,omitempty"` + + // CloudResourceName is the name resource used by the machine. + // For VMs, this will be the same as Name. For bare-metal machines, it will be the name + // of the host. + // +optional + CloudResourceName string `json:"cloudResourceName,omitempty"` } // +kubebuilder:object:root=true diff --git a/api/v1alpha3/types.go b/api/v1alpha3/types.go index f08d01ca..b10e6233 100644 --- a/api/v1alpha3/types.go +++ b/api/v1alpha3/types.go @@ -212,3 +212,15 @@ const ( ValueReady = "true" AnnotationControlPlaneReady = "azurestackhci.cluster.sigs.k8s.io/control-plane-ready" ) + +// HostType specifies what type of machine a node should be deployed on. +type HostType string + +const ( + // HostTypeVM specifies that the node should be deployed on a virtual machine. + // Default value. + HostTypeVM = HostType("vm") + + // HostTypeBareMetal specifies that the node should be deployed on a bare metal machine. + HostTypeBareMetal = HostType("baremetal") +) diff --git a/cloud/converters/vm.go b/cloud/converters/vm.go index 4af8b255..cbb4482b 100644 --- a/cloud/converters/vm.go +++ b/cloud/converters/vm.go @@ -23,8 +23,18 @@ import ( "github.com/microsoft/moc-sdk-for-go/services/compute" ) -// SDKToVM converts an SDK VirtualMachine to the provider VM type. -func SDKToVM(v compute.VirtualMachine) (*infrav1.VM, error) { +// VMConvertToCAPH converts an SDK VirtualMachine to the provider VM type. +func VMConvertToCAPH(v compute.VirtualMachine) (*infrav1.VM, error) { + vm := &infrav1.VM{ + ID: to.String(v.ID), + Name: to.String(v.Name), + State: infrav1.VMStateSucceeded, // Hard-coded for now until we expose provisioning state + } + return vm, nil +} + +// BareMetalMachineConvertToCAPH converts an SDK BareMetalMachine to the provider VM type. +func BareMetalMachineConvertToCAPH(v compute.BareMetalMachine) (*infrav1.VM, error) { vm := &infrav1.VM{ ID: to.String(v.ID), Name: to.String(v.Name), diff --git a/cloud/scope/scopeinterface.go b/cloud/scope/scopeinterface.go index 3dea8ac8..48bf0c86 100644 --- a/cloud/scope/scopeinterface.go +++ b/cloud/scope/scopeinterface.go @@ -26,4 +26,5 @@ type ScopeInterface interface { GetResourceGroup() string GetCloudAgentFqdn() string GetAuthorizer() auth.Authorizer + Location() string } diff --git a/cloud/scope/virtualmachine.go b/cloud/scope/virtualmachine.go index 080b7503..487ff5b4 100644 --- a/cloud/scope/virtualmachine.go +++ b/cloud/scope/virtualmachine.go @@ -177,6 +177,11 @@ func (m *VirtualMachineScope) SetAnnotation(key, value string) { m.AzureStackHCIVirtualMachine.Annotations[key] = value } +// SetCloudResourceName sets the AzureStackHCIVirtualMachine resource name. +func (m *VirtualMachineScope) SetCloudResourceName(resourceName string) { + m.AzureStackHCIVirtualMachine.Status.CloudResourceName = resourceName +} + // PatchObject persists the virtual machine spec and status. func (m *VirtualMachineScope) PatchObject() error { return m.patchHelper.Patch(context.TODO(), m.AzureStackHCIVirtualMachine) diff --git a/cloud/services/virtualmachines/service.go b/cloud/services/virtualmachines/service.go index b4017d17..6121de5d 100644 --- a/cloud/services/virtualmachines/service.go +++ b/cloud/services/virtualmachines/service.go @@ -20,16 +20,18 @@ package virtualmachines import ( azurestackhci "github.com/microsoft/cluster-api-provider-azurestackhci/cloud" "github.com/microsoft/cluster-api-provider-azurestackhci/cloud/scope" - "github.com/microsoft/moc/pkg/auth" + "github.com/microsoft/moc-sdk-for-go/services/compute/baremetalmachine" "github.com/microsoft/moc-sdk-for-go/services/compute/virtualmachine" + "github.com/microsoft/moc/pkg/auth" ) var _ azurestackhci.Service = (*Service)(nil) // Service provides operations on virtual machines. type Service struct { - Client virtualmachine.VirtualMachineClient - Scope scope.ScopeInterface + VMClient virtualmachine.VirtualMachineClient + BareMetalClient baremetalmachine.BareMetalMachineClient + Scope scope.ScopeInterface } // getVirtualMachinesClient creates a new virtual machines client. @@ -38,10 +40,16 @@ func getVirtualMachinesClient(cloudAgentFqdn string, authorizer auth.Authorizer) return *vmClient } +func getBareMetalMachinesClient(cloudAgentFqdn string, authorizer auth.Authorizer) baremetalmachine.BareMetalMachineClient { + bareMetalClient, _ := baremetalmachine.NewBareMetalMachineClient(cloudAgentFqdn, authorizer) + return *bareMetalClient +} + // NewService creates a new virtual machines service. func NewService(scope scope.ScopeInterface) *Service { return &Service{ - Client: getVirtualMachinesClient(scope.GetCloudAgentFqdn(), scope.GetAuthorizer()), - Scope: scope, + VMClient: getVirtualMachinesClient(scope.GetCloudAgentFqdn(), scope.GetAuthorizer()), + BareMetalClient: getBareMetalMachinesClient(scope.GetCloudAgentFqdn(), scope.GetAuthorizer()), + Scope: scope, } } diff --git a/cloud/services/virtualmachines/virtualmachines.go b/cloud/services/virtualmachines/virtualmachines.go index b3c45777..2b8f4aae 100644 --- a/cloud/services/virtualmachines/virtualmachines.go +++ b/cloud/services/virtualmachines/virtualmachines.go @@ -31,6 +31,7 @@ import ( "github.com/microsoft/cluster-api-provider-azurestackhci/cloud/services/networkinterfaces" "github.com/microsoft/moc-sdk-for-go/services/compute" "github.com/microsoft/moc-sdk-for-go/services/network" + mocerrors "github.com/microsoft/moc/pkg/errors" "github.com/pkg/errors" "golang.org/x/crypto/ssh" "k8s.io/klog" @@ -38,33 +39,55 @@ import ( // Spec input specification for Get/CreateOrUpdate/Delete calls type Spec struct { - Name string - NICName string - SSHKeyData string - Size string - Zone string - Image infrav1.Image - OSDisk infrav1.OSDisk - CustomData string - VMType compute.VMType + Name string + NICName string + SSHKeyData string + Size string + Zone string + Image infrav1.Image + OSDisk infrav1.OSDisk + CustomData string + VMType compute.VMType + HostType infrav1.HostType + CloudResourceName string } // Get provides information about a virtual machine. func (s *Service) Get(ctx context.Context, spec interface{}) (interface{}, error) { + var err error vmSpec, ok := spec.(*Spec) if !ok { - return compute.VirtualMachine{}, errors.New("invalid vm specification") + return nil, errors.New("invalid vm specification") } - vm, err := s.Client.Get(ctx, s.Scope.GetResourceGroup(), vmSpec.Name) - if err != nil { - return nil, err - } - if vm == nil || len(*vm) == 0 { - return nil, errors.Wrapf(err, "vm %s not found", vmSpec.Name) - } + switch vmSpec.HostType { + case infrav1.HostTypeBareMetal: + var baremetalmachine *[]compute.BareMetalMachine + + if vmSpec.CloudResourceName != "" { + baremetalmachine, err = s.BareMetalClient.Get(ctx, s.Scope.Location(), vmSpec.CloudResourceName) + if err != nil { + return nil, err + } + } + + if baremetalmachine == nil || len(*baremetalmachine) == 0 { + return nil, errors.Errorf("bare-metal machine %s (%s) not found", vmSpec.Name, vmSpec.CloudResourceName) + } + + return converters.BareMetalMachineConvertToCAPH((*baremetalmachine)[0]) + + default: + vm, err := s.VMClient.Get(ctx, s.Scope.GetResourceGroup(), vmSpec.Name) + if err != nil { + return nil, err + } + if vm == nil || len(*vm) == 0 { + return nil, errors.Errorf("vm %s not found", vmSpec.Name) + } - return converters.SDKToVM((*vm)[0]) + return converters.VMConvertToCAPH((*vm)[0]) + } } // Reconcile gets/creates/updates a virtual machine. @@ -166,27 +189,138 @@ func (s *Service) Reconcile(ctx context.Context, spec interface{}) error { } } - _, err = s.Client.CreateOrUpdate( - ctx, - s.Scope.GetResourceGroup(), - vmSpec.Name, - &virtualMachine) - if err != nil { - return errors.Wrapf(err, "cannot create vm") - } + switch vmSpec.HostType { + case infrav1.HostTypeBareMetal: + baremetalMachine, err := s.createOrUpdateBareMetal( + ctx, + &virtualMachine) + if err != nil { + return errors.Wrapf(err, "cannot create bare-metal machine") + } + // Pass up the name of the the bare-metal machine host. + vmSpec.CloudResourceName = *baremetalMachine.Name + + default: + _, err = s.VMClient.CreateOrUpdate( + ctx, + s.Scope.GetResourceGroup(), + vmSpec.Name, + &virtualMachine) + if err != nil { + return errors.Wrapf(err, "cannot create vm") + } + } klog.V(2).Infof("successfully created vm %s ", vmSpec.Name) return err } +func (s *Service) createOrUpdateBareMetal(ctx context.Context, virtualMachine *compute.VirtualMachine) (*compute.BareMetalMachine, error) { + bareMetalMachineCount := 0 + + for unusedFound := true; unusedFound; { + unusedFound = false + + // Get the complete list of bare-metal machines. + bareMetalMachineList, err := s.BareMetalClient.Get(ctx, s.Scope.Location(), "") + if err != nil { + return nil, err + } + + bareMetalMachineCount = len(*bareMetalMachineList) + + // Go through list and try to find an unused machine. + for _, bareMetalMachine := range *bareMetalMachineList { + if isBareMetalMachineInUse(&bareMetalMachine) { + // Machine is already in use. Keep searching. + continue + } + + unusedFound = true + + // Apply the OS image to the bare-metal machine. + bareMetalMachine.BareMetalMachineProperties = &compute.BareMetalMachineProperties{ + StorageProfile: &compute.BareMetalMachineStorageProfile{ + ImageReference: &compute.BareMetalMachineImageReference{ + ID: virtualMachine.VirtualMachineProperties.StorageProfile.ImageReference.ID, + Name: virtualMachine.VirtualMachineProperties.StorageProfile.ImageReference.Name, + }, + Disks: nil, + }, + OsProfile: &compute.BareMetalMachineOSProfile{ + ComputerName: virtualMachine.VirtualMachineProperties.OsProfile.ComputerName, + AdminUsername: virtualMachine.VirtualMachineProperties.OsProfile.AdminUsername, + AdminPassword: virtualMachine.VirtualMachineProperties.OsProfile.AdminPassword, + CustomData: virtualMachine.VirtualMachineProperties.OsProfile.CustomData, + LinuxConfiguration: virtualMachine.VirtualMachineProperties.OsProfile.LinuxConfiguration, + }, + NetworkProfile: &compute.BareMetalMachineNetworkProfile{ + NetworkInterfaces: vmNetworkInterfacesToBareMetal(virtualMachine.VirtualMachineProperties.NetworkProfile.NetworkInterfaces), + }, + SecurityProfile: virtualMachine.VirtualMachineProperties.SecurityProfile, + Host: virtualMachine.VirtualMachineProperties.Host, + ProvisioningState: virtualMachine.VirtualMachineProperties.ProvisioningState, + Statuses: virtualMachine.VirtualMachineProperties.Statuses, + } + + // Try to apply the update. + _, err := s.BareMetalClient.CreateOrUpdate(ctx, s.Scope.Location(), *bareMetalMachine.Name, &bareMetalMachine) + if mocerrors.IsInvalidVersion(err) { + // Machine was updated by another entity. In all likelihood, the other entity claimed the machine. + // So, keep searching. + continue + } else if err != nil { + return nil, err + } + + // Success! + return &bareMetalMachine, nil + } + } + + return nil, errors.Wrapf(mocerrors.OutOfCapacity, "No free bare-metal nodes. Total nodes [%d]", bareMetalMachineCount) +} + +func isBareMetalMachineInUse(bareMetalMachine *compute.BareMetalMachine) bool { + // Check if an OS image has been set. + return bareMetalMachine.BareMetalMachineProperties != nil && + bareMetalMachine.BareMetalMachineProperties.StorageProfile != nil && + bareMetalMachine.BareMetalMachineProperties.StorageProfile.ImageReference != nil && + bareMetalMachine.BareMetalMachineProperties.StorageProfile.ImageReference.Name != nil && + *bareMetalMachine.BareMetalMachineProperties.StorageProfile.ImageReference.Name != "" +} + +func vmNetworkInterfacesToBareMetal(interfaces *[]compute.NetworkInterfaceReference) *[]compute.BareMetalMachineNetworkInterface { + if interfaces == nil { + return nil + } + result := []compute.BareMetalMachineNetworkInterface(nil) + for _, networkInterface := range *interfaces { + result = append(result, compute.BareMetalMachineNetworkInterface{ + Name: networkInterface.ID, + }) + } + return &result +} + // Delete deletes the virtual machine with the provided name. func (s *Service) Delete(ctx context.Context, spec interface{}) error { vmSpec, ok := spec.(*Spec) if !ok { return errors.New("invalid vm Specification") } - klog.V(2).Infof("deleting vm %s ", vmSpec.Name) - err := s.Client.Delete(ctx, s.Scope.GetResourceGroup(), vmSpec.Name) + + var err error + switch vmSpec.HostType { + case infrav1.HostTypeBareMetal: + klog.V(2).Infof("deleting bare-metal machine %s ", vmSpec.Name) + err = s.clearBareMetalMachine(ctx, vmSpec) + + default: + klog.V(2).Infof("deleting vm %s ", vmSpec.Name) + err = s.VMClient.Delete(ctx, s.Scope.GetResourceGroup(), vmSpec.Name) + } + if err != nil && azurestackhci.ResourceNotFound(err) { // already deleted return nil @@ -199,6 +333,58 @@ func (s *Service) Delete(ctx context.Context, spec interface{}) error { return err } +func (s *Service) clearBareMetalMachine(ctx context.Context, vmSpec *Spec) error { + if vmSpec.CloudResourceName == "" { + // Machine has not been deployed onto a bare-metal host. + return nil + } + + bareMetalMachineList, err := s.BareMetalClient.Get(ctx, s.Scope.Location(), vmSpec.CloudResourceName) + if err != nil { + return err + } + + if bareMetalMachineList == nil || len(*bareMetalMachineList) < 1 { + // Bare metal host doesn't exist anymore. So, nothing to do. + klog.V(2).Infof("bare-metal host no longer exists %s (%s)", vmSpec.Name, vmSpec.CloudResourceName) + return nil + } + + bareMetalMachine := (*bareMetalMachineList)[0] + + // The number of updates to attempt before giving up. + // Note that there is also an update loop on the K8s controller as well that has an exponential time backoff. + // So, this doesn't need to be a large value. + const updateRetries = 3 + + // Try to apply the update. + for i := 0; i < updateRetries; i++ { + bareMetalMachine.BareMetalMachineProperties = &compute.BareMetalMachineProperties{ + StorageProfile: nil, + OsProfile: nil, + NetworkProfile: nil, + SecurityProfile: nil, + Host: nil, + ProvisioningState: nil, + Statuses: nil, + } + + _, err := s.BareMetalClient.CreateOrUpdate(ctx, s.Scope.Location(), *bareMetalMachine.Name, &bareMetalMachine) + if mocerrors.IsInvalidVersion(err) { + // Machine was updated by another entity. So, try again. + continue + } + + if err != nil { + return err + } + + break + } + + return nil +} + // generateStorageProfile generates a pointer to a compute.StorageProfile which can utilized for VM creation. func generateStorageProfile(vmSpec Spec) (*compute.StorageProfile, error) { osDisk := &compute.OSDisk{ diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciclusters.yaml index 62f5ba0a..bc675846 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciclusters.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.6 + controller-gen.kubebuilder.io/version: v0.2.9 creationTimestamp: null name: azurestackhciclusters.infrastructure.cluster.x-k8s.io spec: @@ -43,6 +43,10 @@ spec: description: AzureStackHCILoadBalancer is used to declare the AzureStackHCILoadBalancerSpec if a LoadBalancer is desired for the AzureStackHCICluster. properties: + hostType: + description: HostType specifies what type of machine a node should + be deployed on. + type: string image: description: 'Image defines information about the image to use for VM creation. There are three ways to specify an image: by diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciloadbalancers.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciloadbalancers.yaml index 05b5d737..2c51cb76 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciloadbalancers.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciloadbalancers.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.6 + controller-gen.kubebuilder.io/version: v0.2.9 creationTimestamp: null name: azurestackhciloadbalancers.infrastructure.cluster.x-k8s.io spec: @@ -38,6 +38,10 @@ spec: type: object spec: properties: + hostType: + description: HostType specifies what type of machine a node should + be deployed on. + type: string image: description: 'Image defines information about the image to use for VM creation. There are three ways to specify an image: by ID, by diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachines.yaml index 7c3fc9c5..8325ee9e 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachines.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.6 + controller-gen.kubebuilder.io/version: v0.2.9 creationTimestamp: null name: azurestackhcimachines.infrastructure.cluster.x-k8s.io spec: @@ -50,6 +50,10 @@ spec: id: type: string type: object + hostType: + description: HostType specifies what type of machine a node should + be deployed on. + type: string image: description: 'Image defines information about the image to use for VM creation. There are three ways to specify an image: by ID, by diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachinetemplates.yaml index 5412282f..63d90d0a 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachinetemplates.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.6 + controller-gen.kubebuilder.io/version: v0.2.9 creationTimestamp: null name: azurestackhcimachinetemplates.infrastructure.cluster.x-k8s.io spec: @@ -59,6 +59,10 @@ spec: id: type: string type: object + hostType: + description: HostType specifies what type of machine a node + should be deployed on. + type: string image: description: 'Image defines information about the image to use for VM creation. There are three ways to specify an diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcivirtualmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcivirtualmachines.yaml index 0658db07..bd2a9108 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcivirtualmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcivirtualmachines.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.6 + controller-gen.kubebuilder.io/version: v0.2.9 creationTimestamp: null name: azurestackhcivirtualmachines.infrastructure.cluster.x-k8s.io spec: @@ -55,6 +55,10 @@ spec: type: string clusterName: type: string + hostType: + description: HostType specifies what type of machine a node should + be deployed on. + type: string identity: description: VMIdentity defines the identity of the virtual machine, if configured. @@ -164,6 +168,11 @@ spec: - type type: object type: array + cloudResourceName: + description: CloudResourceName is the name resource used by the machine. + For VMs, this will be the same as Name. For bare-metal machines, + it will be the name of the host. + type: string failureMessage: type: string failureReason: diff --git a/controllers/azurestackhciloadbalancer_controller.go b/controllers/azurestackhciloadbalancer_controller.go index ccb88599..f5f71a33 100644 --- a/controllers/azurestackhciloadbalancer_controller.go +++ b/controllers/azurestackhciloadbalancer_controller.go @@ -230,6 +230,7 @@ func (r *AzureStackHCILoadBalancerReconciler) reconcileNormalVirtualMachine(load vm.Spec.SubnetName = azurestackhci.GenerateNodeSubnetName(clusterScope.Name()) bootstrapdata := "" vm.Spec.BootstrapData = &bootstrapdata + vm.Spec.HostType = loadBalancerScope.AzureStackHCILoadBalancer.Spec.HostType vm.Spec.VMSize = loadBalancerScope.AzureStackHCILoadBalancer.Spec.VMSize vm.Spec.Location = clusterScope.Location() vm.Spec.SSHPublicKey = loadBalancerScope.AzureStackHCILoadBalancer.Spec.SSHPublicKey diff --git a/controllers/azurestackhcimachine_controller.go b/controllers/azurestackhcimachine_controller.go index ca3d9111..9b1c2e71 100644 --- a/controllers/azurestackhcimachine_controller.go +++ b/controllers/azurestackhcimachine_controller.go @@ -294,6 +294,7 @@ func (r *AzureStackHCIMachineReconciler) reconcileVirtualMachineNormal(machineSc } image.DeepCopyInto(&vm.Spec.Image) + vm.Spec.HostType = machineScope.AzureStackHCIMachine.Spec.HostType vm.Spec.VMSize = machineScope.AzureStackHCIMachine.Spec.VMSize machineScope.AzureStackHCIMachine.Spec.AvailabilityZone.DeepCopyInto(&vm.Spec.AvailabilityZone) machineScope.AzureStackHCIMachine.Spec.OSDisk.DeepCopyInto(&vm.Spec.OSDisk) diff --git a/controllers/azurestackhcivirtualmachine_controller.go b/controllers/azurestackhcivirtualmachine_controller.go index eb5bdb32..7d07291b 100644 --- a/controllers/azurestackhcivirtualmachine_controller.go +++ b/controllers/azurestackhcivirtualmachine_controller.go @@ -145,6 +145,7 @@ func (r *AzureStackHCIVirtualMachineReconciler) reconcileNormal(ctx context.Cont // Proceed to reconcile the AzureStackHCIVirtualMachine state. virtualMachineScope.SetVMState(vm.State) + virtualMachineScope.SetCloudResourceName(vm.Name) switch vm.State { case infrav1.VMStateSucceeded: diff --git a/controllers/azurestackhcivirtualmachine_reconciler.go b/controllers/azurestackhcivirtualmachine_reconciler.go index 0624f66e..7b62c291 100644 --- a/controllers/azurestackhcivirtualmachine_reconciler.go +++ b/controllers/azurestackhcivirtualmachine_reconciler.go @@ -72,7 +72,9 @@ func (s *azureStackHCIVirtualMachineService) Create() (*infrav1.VM, error) { // Delete reconciles all the services in pre determined order func (s *azureStackHCIVirtualMachineService) Delete() error { vmSpec := &virtualmachines.Spec{ - Name: s.vmScope.Name(), + Name: s.vmScope.Name(), + HostType: s.vmScope.AzureStackHCIVirtualMachine.Spec.HostType, + CloudResourceName: s.vmScope.AzureStackHCIVirtualMachine.Status.CloudResourceName, } err := s.virtualMachinesSvc.Delete(s.vmScope.Context, vmSpec) @@ -105,7 +107,9 @@ func (s *azureStackHCIVirtualMachineService) Delete() error { func (s *azureStackHCIVirtualMachineService) VMIfExists() (*infrav1.VM, error) { vmSpec := &virtualmachines.Spec{ - Name: s.vmScope.Name(), + Name: s.vmScope.Name(), + HostType: s.vmScope.AzureStackHCIVirtualMachine.Spec.HostType, + CloudResourceName: s.vmScope.AzureStackHCIVirtualMachine.Status.CloudResourceName, } vmInterface, err := s.virtualMachinesSvc.Get(s.vmScope.Context, vmSpec) @@ -170,7 +174,9 @@ func (s *azureStackHCIVirtualMachineService) createVirtualMachine(nicName string } vmSpec := &virtualmachines.Spec{ - Name: s.vmScope.Name(), + Name: s.vmScope.Name(), + HostType: s.vmScope.AzureStackHCIVirtualMachine.Spec.HostType, + CloudResourceName: s.vmScope.AzureStackHCIVirtualMachine.Status.CloudResourceName, } vmInterface, err := s.virtualMachinesSvc.Get(s.vmScope.Context, vmSpec) @@ -203,15 +209,17 @@ func (s *azureStackHCIVirtualMachineService) createVirtualMachine(nicName string s.vmScope.Info("VM type is:", "vmType", vmType) vmSpec = &virtualmachines.Spec{ - Name: s.vmScope.Name(), - NICName: nicName, - SSHKeyData: string(decoded), - Size: s.vmScope.AzureStackHCIVirtualMachine.Spec.VMSize, - OSDisk: s.vmScope.AzureStackHCIVirtualMachine.Spec.OSDisk, - Image: s.vmScope.AzureStackHCIVirtualMachine.Spec.Image, - CustomData: *s.vmScope.AzureStackHCIVirtualMachine.Spec.BootstrapData, - Zone: vmZone, - VMType: vmType, + Name: s.vmScope.Name(), + NICName: nicName, + SSHKeyData: string(decoded), + Size: s.vmScope.AzureStackHCIVirtualMachine.Spec.VMSize, + OSDisk: s.vmScope.AzureStackHCIVirtualMachine.Spec.OSDisk, + Image: s.vmScope.AzureStackHCIVirtualMachine.Spec.Image, + CustomData: *s.vmScope.AzureStackHCIVirtualMachine.Spec.BootstrapData, + Zone: vmZone, + VMType: vmType, + HostType: s.vmScope.AzureStackHCIVirtualMachine.Spec.HostType, + CloudResourceName: s.vmScope.AzureStackHCIVirtualMachine.Status.CloudResourceName, } err = s.virtualMachinesSvc.Reconcile(s.vmScope.Context, vmSpec) diff --git a/dev/.gitignore b/dev/.gitignore new file mode 100644 index 00000000..47a8e4da --- /dev/null +++ b/dev/.gitignore @@ -0,0 +1 @@ +/manager_image_patch.yaml diff --git a/dev/kustomization.yaml b/dev/kustomization.yaml new file mode 100644 index 00000000..f6134634 --- /dev/null +++ b/dev/kustomization.yaml @@ -0,0 +1,10 @@ +bases: + - ../config + +patchesJson6902: + - target: + group: apps + version: v1 + kind: Deployment + name: controller-manager + path: manager_image_patch.yaml diff --git a/dev/manager_image_patch_template.yaml b/dev/manager_image_patch_template.yaml new file mode 100644 index 00000000..a72eae0b --- /dev/null +++ b/dev/manager_image_patch_template.yaml @@ -0,0 +1,3 @@ +- op: replace + path: "/spec/template/spec/containers/0/image" + value: diff --git a/go.mod b/go.mod index 7a65066f..6cc1f41a 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/Azure/go-autorest/autorest/to v0.3.0 github.com/blang/semver v3.5.1+incompatible github.com/go-logr/logr v0.1.0 - github.com/microsoft/moc v0.10.1-alpha.4 + github.com/microsoft/moc v0.10.7-alpha.5 github.com/microsoft/moc-sdk-for-go v0.10.1-alpha.1 github.com/pkg/errors v0.9.1 github.com/spf13/pflag v1.0.5 @@ -23,4 +23,8 @@ require ( sigs.k8s.io/controller-runtime v0.5.2 ) -replace github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.4.0+incompatible +replace ( + github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.4.0+incompatible + github.com/microsoft/moc => ../moc + github.com/microsoft/moc-sdk-for-go => ../moc-sdk-for-go +) diff --git a/go.sum b/go.sum index 6b8eb007..20d59c0f 100644 --- a/go.sum +++ b/go.sum @@ -177,6 +177,13 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1 h1:ZFgWrT+bLgsYPirOnRfKLYJLvssAegOj/hgyMFdJZe0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -185,6 +192,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= @@ -455,6 +464,8 @@ golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 h1:b0LrWgu8+q7z4J+0Y3Umo5q1dL7NXBkKBWkaVkAq17E= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -490,12 +501,19 @@ golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a h1:i47hUS795cOydZI4AwJQCKXOr4BvxzvikwDoDtHhP2Y= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210317225723-c4fcb01b228e h1:XNp2Flc/1eWQGk5BLzqTAN7fQIwIbfyVTuVxXxZh73M= +golang.org/x/sys v0.0.0-20210317225723-c4fcb01b228e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -534,6 +552,8 @@ google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -542,6 +562,15 @@ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/hack/tools/go.mod b/hack/tools/go.mod index e784f769..9d985456 100644 --- a/hack/tools/go.mod +++ b/hack/tools/go.mod @@ -21,7 +21,7 @@ require ( golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect k8s.io/code-generator v0.18.0-alpha.2.0.20200130061103-7dfd5e9157ef sigs.k8s.io/cluster-api/hack/tools v0.0.0-20200319204836-a97903fa1e7e - sigs.k8s.io/controller-tools v0.2.6 + sigs.k8s.io/controller-tools v0.2.9 sigs.k8s.io/kustomize/kustomize/v3 v3.5.4 sigs.k8s.io/testing_frameworks v0.1.2 ) diff --git a/hack/tools/go.sum b/hack/tools/go.sum index 8441d115..35b4cb83 100644 --- a/hack/tools/go.sum +++ b/hack/tools/go.sum @@ -831,6 +831,8 @@ sigs.k8s.io/cluster-api/hack/tools v0.0.0-20200319204836-a97903fa1e7e h1:fTrmXG0 sigs.k8s.io/cluster-api/hack/tools v0.0.0-20200319204836-a97903fa1e7e/go.mod h1:8aibHfbqxNthBN4KKnk8UV9xTHKB3TE5nzxeNkH9xrU= sigs.k8s.io/controller-tools v0.2.6 h1:4Fo36alFw5+Fffz7HhNd2EFBFvckqVkb4ePnIj0uLUc= sigs.k8s.io/controller-tools v0.2.6/go.mod h1:9VKHPszmf2DHz/QmHkcfZoewO6BL7pPs9uAiBVsaJSE= +sigs.k8s.io/controller-tools v0.2.9 h1:DEZuCFWANX2zlZVMlf/XmhSq0HzmGCZ/GTdPJig62ig= +sigs.k8s.io/controller-tools v0.2.9/go.mod h1:ArP7w60JQKkZf7UU2oWTVnEhoNGA+sOMyuSuS+JFNDQ= sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20200226075303-ed8438ec10a4/go.mod h1:nyAxPBUS04gN3IRuEQ0elG4mVeto/d/qQRsW2PsyAy4= sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= diff --git a/templates/flavors/base/cluster-template.yaml b/templates/flavors/base/cluster-template.yaml index 3fc71ef7..24574d5b 100644 --- a/templates/flavors/base/cluster-template.yaml +++ b/templates/flavors/base/cluster-template.yaml @@ -10,6 +10,7 @@ spec: osType: "Linux" location: "westus" vmSize: ${AZURESTACKHCI_WORKER_MACHINE_TYPE} + hostType: ${AZURESTACKHCI_WORKER_HOST_TYPE:-""} sshPublicKey: ${AZURESTACKHCI_SSH_PUBLIC_KEY:=""} --- kind: AzureStackHCIMachineTemplate @@ -23,6 +24,7 @@ spec: osType: "Linux" location: "westus" vmSize: ${AZURESTACKHCI_CONTROL_PLANE_MACHINE_TYPE} + hostType: ${AZURESTACKHCI_CONTROL_PLANE_HOST_TYPE:-""} sshPublicKey: ${AZURESTACKHCI_SSH_PUBLIC_KEY:=""} --- apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 @@ -55,6 +57,7 @@ spec: version: "latest" location: "westus" vmSize: ${AZURESTACKHCI_WINDOWS_WORKER_MACHINE_TYPE} + hostType: ${AZURESTACKHCI_WINDOWS_WORKER_HOST_TYPE:-""} sshPublicKey: ${AZURESTACKHCI_SSH_PUBLIC_KEY:=""} --- apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 @@ -255,7 +258,8 @@ spec: image: osType: "Linux" sshPublicKey: ${AZURESTACKHCI_SSH_PUBLIC_KEY:=""} - vmSize: "${AZURESTACKHCI_LOAD_BALANCER_MACHINE_TYPE}" + vmSize: ${AZURESTACKHCI_LOAD_BALANCER_MACHINE_TYPE} + hostType: ${AZURESTACKHCI_LOAD_BALANCER_HOST_TYPE:-""} version: "${KUBERNETES_VERSION}" --- kind: KubeadmControlPlane diff --git a/templates/flavors/mgmt/mgmt-machine.yaml b/templates/flavors/mgmt/mgmt-machine.yaml index c4b96c81..1964e55c 100644 --- a/templates/flavors/mgmt/mgmt-machine.yaml +++ b/templates/flavors/mgmt/mgmt-machine.yaml @@ -34,6 +34,7 @@ spec: providerID: moc://${CLUSTER_NAME}-control-plane-0 sshPublicKey: ${AZURESTACKHCI_SSH_PUBLIC_KEY:=""} vmSize: ${AZURESTACKHCI_CONTROL_PLANE_MACHINE_TYPE} + hostType: ${AZURESTACKHCI_CONTROL_PLANE_HOST_TYPE:-""} --- apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 kind: KubeadmConfig From 8dec1f78046a9a03bf15455fb6297c2e8d3c59f0 Mon Sep 17 00:00:00 2001 From: George Mileka Date: Thu, 1 Apr 2021 21:32:00 +0000 Subject: [PATCH 02/16] Added aksiot.md. --- aksiot.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 aksiot.md diff --git a/aksiot.md b/aksiot.md new file mode 100644 index 00000000..f23596b1 --- /dev/null +++ b/aksiot.md @@ -0,0 +1,3 @@ +# AksIoT + +[place holder] From 25b7e2536d5d7a9712c5e9ac50cb33731912633e Mon Sep 17 00:00:00 2001 From: Chris Gunn Date: Wed, 7 Apr 2021 13:01:24 -0700 Subject: [PATCH 03/16] Bug fixes --- cloud/services/virtualmachines/virtualmachines.go | 7 +++---- go.sum | 8 ++++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/cloud/services/virtualmachines/virtualmachines.go b/cloud/services/virtualmachines/virtualmachines.go index 2b8f4aae..4c7b68ed 100644 --- a/cloud/services/virtualmachines/virtualmachines.go +++ b/cloud/services/virtualmachines/virtualmachines.go @@ -284,10 +284,9 @@ func (s *Service) createOrUpdateBareMetal(ctx context.Context, virtualMachine *c func isBareMetalMachineInUse(bareMetalMachine *compute.BareMetalMachine) bool { // Check if an OS image has been set. return bareMetalMachine.BareMetalMachineProperties != nil && - bareMetalMachine.BareMetalMachineProperties.StorageProfile != nil && - bareMetalMachine.BareMetalMachineProperties.StorageProfile.ImageReference != nil && - bareMetalMachine.BareMetalMachineProperties.StorageProfile.ImageReference.Name != nil && - *bareMetalMachine.BareMetalMachineProperties.StorageProfile.ImageReference.Name != "" + bareMetalMachine.BareMetalMachineProperties.OsProfile != nil && + bareMetalMachine.BareMetalMachineProperties.OsProfile.CustomData != nil && + *bareMetalMachine.BareMetalMachineProperties.OsProfile.CustomData != "" } func vmNetworkInterfacesToBareMetal(interfaces *[]compute.NetworkInterfaceReference) *[]compute.BareMetalMachineNetworkInterface { diff --git a/go.sum b/go.sum index 20d59c0f..845353f2 100644 --- a/go.sum +++ b/go.sum @@ -466,6 +466,8 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 h1:b0LrWgu8+q7z4J+0Y3Umo5q1dL7NXBkKBWkaVkAq17E= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c h1:KHUzaHIpjWVlVVNh65G3hhuj3KB1HnjY6Cq5cTvRQT8= +golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -505,6 +507,9 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210317225723-c4fcb01b228e h1:XNp2Flc/1eWQGk5BLzqTAN7fQIwIbfyVTuVxXxZh73M= golang.org/x/sys v0.0.0-20210317225723-c4fcb01b228e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210402192133-700132347e07 h1:4k6HsQjxj6hVMsI2Vf0yKlzt5lXxZsMW1q0zaq2k8zY= +golang.org/x/sys v0.0.0-20210402192133-700132347e07/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -514,6 +519,8 @@ golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -537,6 +544,7 @@ golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= From b8a836cc9308ecfbdfcc9a689389c5b4685927f8 Mon Sep 17 00:00:00 2001 From: Roaa Sakr Date: Thu, 15 Apr 2021 02:34:29 -0700 Subject: [PATCH 04/16] Fix merge conflicts and integrate with latest moc bm entity --- .../virtualmachines/virtualmachines.go | 191 +++++------------- ...x-k8s.io_azurestackhcivirtualmachines.yaml | 5 - .../azurestackhcivirtualmachine_reconciler.go | 36 ++-- go.mod | 7 +- go.sum | 2 + 5 files changed, 65 insertions(+), 176 deletions(-) diff --git a/cloud/services/virtualmachines/virtualmachines.go b/cloud/services/virtualmachines/virtualmachines.go index 8e2ce7ec..47df1f3d 100644 --- a/cloud/services/virtualmachines/virtualmachines.go +++ b/cloud/services/virtualmachines/virtualmachines.go @@ -33,7 +33,6 @@ import ( "github.com/microsoft/cluster-api-provider-azurestackhci/cloud/services/networkinterfaces" "github.com/microsoft/moc-sdk-for-go/services/compute" "github.com/microsoft/moc-sdk-for-go/services/network" - mocerrors "github.com/microsoft/moc/pkg/errors" "github.com/pkg/errors" "golang.org/x/crypto/ssh" "k8s.io/klog" @@ -51,17 +50,16 @@ var ( // Spec input specification for Get/CreateOrUpdate/Delete calls type Spec struct { - Name string - NICName string - SSHKeyData string - Size string - Zone string - Image infrav1.Image - OSDisk infrav1.OSDisk - CustomData string - VMType compute.VMType - HostType infrav1.HostType - CloudResourceName string + Name string + NICName string + SSHKeyData string + Size string + Zone string + Image infrav1.Image + OSDisk infrav1.OSDisk + CustomData string + VMType compute.VMType + HostType infrav1.HostType } // Get provides information about a virtual machine. @@ -76,15 +74,13 @@ func (s *Service) Get(ctx context.Context, spec interface{}) (interface{}, error case infrav1.HostTypeBareMetal: var baremetalmachine *[]compute.BareMetalMachine - if vmSpec.CloudResourceName != "" { - baremetalmachine, err = s.BareMetalClient.Get(ctx, s.Scope.Location(), vmSpec.CloudResourceName) - if err != nil { - return nil, err - } + baremetalmachine, err = s.BareMetalClient.Get(ctx, s.Scope.Location(), vmSpec.Name) + if err != nil { + return nil, err } if baremetalmachine == nil || len(*baremetalmachine) == 0 { - return nil, errors.Errorf("bare-metal machine %s (%s) not found", vmSpec.Name, vmSpec.CloudResourceName) + return nil, errors.Errorf("bare-metal machine %s not found", vmSpec.Name) } return converters.BareMetalMachineConvertToCAPH((*baremetalmachine)[0]) @@ -205,16 +201,13 @@ func (s *Service) Reconcile(ctx context.Context, spec interface{}) error { switch vmSpec.HostType { case infrav1.HostTypeBareMetal: - baremetalMachine, err := s.createOrUpdateBareMetal( + _, err := s.createOrUpdateBareMetal( ctx, &virtualMachine) if err != nil { return errors.Wrapf(err, "cannot create bare-metal machine") } - // Pass up the name of the the bare-metal machine host. - vmSpec.CloudResourceName = *baremetalMachine.Name - default: _, err = s.VMClient.CreateOrUpdate( ctx, @@ -230,90 +223,39 @@ func (s *Service) Reconcile(ctx context.Context, spec interface{}) error { } func (s *Service) createOrUpdateBareMetal(ctx context.Context, virtualMachine *compute.VirtualMachine) (*compute.BareMetalMachine, error) { - bareMetalMachineCount := 0 - - for unusedFound := true; unusedFound; { - unusedFound = false - - // Get the complete list of bare-metal machines. - bareMetalMachineList, err := s.BareMetalClient.Get(ctx, s.Scope.Location(), "") - if err != nil { - return nil, err - } - - bareMetalMachineCount = len(*bareMetalMachineList) - - // Go through list and try to find an unused machine. - for _, bareMetalMachine := range *bareMetalMachineList { - if isBareMetalMachineInUse(&bareMetalMachine) { - // Machine is already in use. Keep searching. - continue - } - - unusedFound = true - - // Apply the OS image to the bare-metal machine. - bareMetalMachine.BareMetalMachineProperties = &compute.BareMetalMachineProperties{ - StorageProfile: &compute.BareMetalMachineStorageProfile{ - ImageReference: &compute.BareMetalMachineImageReference{ - ID: virtualMachine.VirtualMachineProperties.StorageProfile.ImageReference.ID, - Name: virtualMachine.VirtualMachineProperties.StorageProfile.ImageReference.Name, - }, - Disks: nil, - }, - OsProfile: &compute.BareMetalMachineOSProfile{ - ComputerName: virtualMachine.VirtualMachineProperties.OsProfile.ComputerName, - AdminUsername: virtualMachine.VirtualMachineProperties.OsProfile.AdminUsername, - AdminPassword: virtualMachine.VirtualMachineProperties.OsProfile.AdminPassword, - CustomData: virtualMachine.VirtualMachineProperties.OsProfile.CustomData, - LinuxConfiguration: virtualMachine.VirtualMachineProperties.OsProfile.LinuxConfiguration, - }, - NetworkProfile: &compute.BareMetalMachineNetworkProfile{ - NetworkInterfaces: vmNetworkInterfacesToBareMetal(virtualMachine.VirtualMachineProperties.NetworkProfile.NetworkInterfaces), - }, - SecurityProfile: virtualMachine.VirtualMachineProperties.SecurityProfile, - Host: virtualMachine.VirtualMachineProperties.Host, - ProvisioningState: virtualMachine.VirtualMachineProperties.ProvisioningState, - Statuses: virtualMachine.VirtualMachineProperties.Statuses, - } - - // Try to apply the update. - _, err := s.BareMetalClient.CreateOrUpdate(ctx, s.Scope.Location(), *bareMetalMachine.Name, &bareMetalMachine) - if mocerrors.IsInvalidVersion(err) { - // Machine was updated by another entity. In all likelihood, the other entity claimed the machine. - // So, keep searching. - continue - } else if err != nil { - return nil, err - } - - // Success! - return &bareMetalMachine, nil - } + // Create a new baremetal machine + bareMetalMachine := &compute.BareMetalMachine{ + Name: virtualMachine.Name, } - return nil, errors.Wrapf(mocerrors.OutOfCapacity, "No free bare-metal nodes. Total nodes [%d]", bareMetalMachineCount) -} + bareMetalMachine.BareMetalMachineProperties = &compute.BareMetalMachineProperties{ + StorageProfile: &compute.BareMetalMachineStorageProfile{ + ImageReference: &compute.BareMetalMachineImageReference{ + ID: virtualMachine.VirtualMachineProperties.StorageProfile.ImageReference.ID, + Name: virtualMachine.VirtualMachineProperties.StorageProfile.ImageReference.Name, + }, + }, + OsProfile: &compute.BareMetalMachineOSProfile{ + ComputerName: virtualMachine.VirtualMachineProperties.OsProfile.ComputerName, + AdminUsername: virtualMachine.VirtualMachineProperties.OsProfile.AdminUsername, + AdminPassword: virtualMachine.VirtualMachineProperties.OsProfile.AdminPassword, + CustomData: virtualMachine.VirtualMachineProperties.OsProfile.CustomData, + LinuxConfiguration: virtualMachine.VirtualMachineProperties.OsProfile.LinuxConfiguration, + }, + SecurityProfile: virtualMachine.VirtualMachineProperties.SecurityProfile, + ProvisioningState: virtualMachine.VirtualMachineProperties.ProvisioningState, + Statuses: virtualMachine.VirtualMachineProperties.Statuses, + } -func isBareMetalMachineInUse(bareMetalMachine *compute.BareMetalMachine) bool { - // Check if an OS image has been set. - return bareMetalMachine.BareMetalMachineProperties != nil && - bareMetalMachine.BareMetalMachineProperties.OsProfile != nil && - bareMetalMachine.BareMetalMachineProperties.OsProfile.CustomData != nil && - *bareMetalMachine.BareMetalMachineProperties.OsProfile.CustomData != "" -} + // Try to apply the update. + _, err := s.BareMetalClient.CreateOrUpdate(ctx, s.Scope.GetResourceGroup(), *bareMetalMachine.Name, bareMetalMachine) -func vmNetworkInterfacesToBareMetal(interfaces *[]compute.NetworkInterfaceReference) *[]compute.BareMetalMachineNetworkInterface { - if interfaces == nil { - return nil - } - result := []compute.BareMetalMachineNetworkInterface(nil) - for _, networkInterface := range *interfaces { - result = append(result, compute.BareMetalMachineNetworkInterface{ - Name: networkInterface.ID, - }) + if err != nil { + return nil, errors.Wrap(err, "Failed to create baremetal machine.") } - return &result + + klog.V(2).Infof("Successfully created baremetal machine %s ", bareMetalMachine.Name) + return bareMetalMachine, nil } // Delete deletes the virtual machine with the provided name. @@ -347,52 +289,9 @@ func (s *Service) Delete(ctx context.Context, spec interface{}) error { } func (s *Service) clearBareMetalMachine(ctx context.Context, vmSpec *Spec) error { - if vmSpec.CloudResourceName == "" { - // Machine has not been deployed onto a bare-metal host. - return nil - } - - bareMetalMachineList, err := s.BareMetalClient.Get(ctx, s.Scope.Location(), vmSpec.CloudResourceName) + err := s.BareMetalClient.Delete(ctx, s.Scope.GetResourceGroup(), vmSpec.Name) if err != nil { - return err - } - - if bareMetalMachineList == nil || len(*bareMetalMachineList) < 1 { - // Bare metal host doesn't exist anymore. So, nothing to do. - klog.V(2).Infof("bare-metal host no longer exists %s (%s)", vmSpec.Name, vmSpec.CloudResourceName) - return nil - } - - bareMetalMachine := (*bareMetalMachineList)[0] - - // The number of updates to attempt before giving up. - // Note that there is also an update loop on the K8s controller as well that has an exponential time backoff. - // So, this doesn't need to be a large value. - const updateRetries = 3 - - // Try to apply the update. - for i := 0; i < updateRetries; i++ { - bareMetalMachine.BareMetalMachineProperties = &compute.BareMetalMachineProperties{ - StorageProfile: nil, - OsProfile: nil, - NetworkProfile: nil, - SecurityProfile: nil, - Host: nil, - ProvisioningState: nil, - Statuses: nil, - } - - _, err := s.BareMetalClient.CreateOrUpdate(ctx, s.Scope.Location(), *bareMetalMachine.Name, &bareMetalMachine) - if mocerrors.IsInvalidVersion(err) { - // Machine was updated by another entity. So, try again. - continue - } - - if err != nil { - return err - } - - break + return errors.Wrapf(err, "Failed to delete baremetal machine") } return nil diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcivirtualmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcivirtualmachines.yaml index ff24b9d4..2220624f 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcivirtualmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcivirtualmachines.yaml @@ -197,11 +197,6 @@ spec: - type type: object type: array - cloudResourceName: - description: CloudResourceName is the name resource used by the machine. - For VMs, this will be the same as Name. For bare-metal machines, - it will be the name of the host. - type: string failureMessage: type: string failureReason: diff --git a/controllers/azurestackhcivirtualmachine_reconciler.go b/controllers/azurestackhcivirtualmachine_reconciler.go index 7b62c291..9f858deb 100644 --- a/controllers/azurestackhcivirtualmachine_reconciler.go +++ b/controllers/azurestackhcivirtualmachine_reconciler.go @@ -72,9 +72,8 @@ func (s *azureStackHCIVirtualMachineService) Create() (*infrav1.VM, error) { // Delete reconciles all the services in pre determined order func (s *azureStackHCIVirtualMachineService) Delete() error { vmSpec := &virtualmachines.Spec{ - Name: s.vmScope.Name(), - HostType: s.vmScope.AzureStackHCIVirtualMachine.Spec.HostType, - CloudResourceName: s.vmScope.AzureStackHCIVirtualMachine.Status.CloudResourceName, + Name: s.vmScope.Name(), + HostType: s.vmScope.AzureStackHCIVirtualMachine.Spec.HostType, } err := s.virtualMachinesSvc.Delete(s.vmScope.Context, vmSpec) @@ -107,9 +106,8 @@ func (s *azureStackHCIVirtualMachineService) Delete() error { func (s *azureStackHCIVirtualMachineService) VMIfExists() (*infrav1.VM, error) { vmSpec := &virtualmachines.Spec{ - Name: s.vmScope.Name(), - HostType: s.vmScope.AzureStackHCIVirtualMachine.Spec.HostType, - CloudResourceName: s.vmScope.AzureStackHCIVirtualMachine.Status.CloudResourceName, + Name: s.vmScope.Name(), + HostType: s.vmScope.AzureStackHCIVirtualMachine.Spec.HostType, } vmInterface, err := s.virtualMachinesSvc.Get(s.vmScope.Context, vmSpec) @@ -174,9 +172,8 @@ func (s *azureStackHCIVirtualMachineService) createVirtualMachine(nicName string } vmSpec := &virtualmachines.Spec{ - Name: s.vmScope.Name(), - HostType: s.vmScope.AzureStackHCIVirtualMachine.Spec.HostType, - CloudResourceName: s.vmScope.AzureStackHCIVirtualMachine.Status.CloudResourceName, + Name: s.vmScope.Name(), + HostType: s.vmScope.AzureStackHCIVirtualMachine.Spec.HostType, } vmInterface, err := s.virtualMachinesSvc.Get(s.vmScope.Context, vmSpec) @@ -209,17 +206,16 @@ func (s *azureStackHCIVirtualMachineService) createVirtualMachine(nicName string s.vmScope.Info("VM type is:", "vmType", vmType) vmSpec = &virtualmachines.Spec{ - Name: s.vmScope.Name(), - NICName: nicName, - SSHKeyData: string(decoded), - Size: s.vmScope.AzureStackHCIVirtualMachine.Spec.VMSize, - OSDisk: s.vmScope.AzureStackHCIVirtualMachine.Spec.OSDisk, - Image: s.vmScope.AzureStackHCIVirtualMachine.Spec.Image, - CustomData: *s.vmScope.AzureStackHCIVirtualMachine.Spec.BootstrapData, - Zone: vmZone, - VMType: vmType, - HostType: s.vmScope.AzureStackHCIVirtualMachine.Spec.HostType, - CloudResourceName: s.vmScope.AzureStackHCIVirtualMachine.Status.CloudResourceName, + Name: s.vmScope.Name(), + NICName: nicName, + SSHKeyData: string(decoded), + Size: s.vmScope.AzureStackHCIVirtualMachine.Spec.VMSize, + OSDisk: s.vmScope.AzureStackHCIVirtualMachine.Spec.OSDisk, + Image: s.vmScope.AzureStackHCIVirtualMachine.Spec.Image, + CustomData: *s.vmScope.AzureStackHCIVirtualMachine.Spec.BootstrapData, + Zone: vmZone, + VMType: vmType, + HostType: s.vmScope.AzureStackHCIVirtualMachine.Spec.HostType, } err = s.virtualMachinesSvc.Reconcile(s.vmScope.Context, vmSpec) diff --git a/go.mod b/go.mod index 1142a14f..fbc66187 100644 --- a/go.mod +++ b/go.mod @@ -7,14 +7,11 @@ require ( github.com/Azure/go-autorest/autorest/to v0.3.0 github.com/blang/semver v3.5.1+incompatible github.com/go-logr/logr v0.1.0 - github.com/microsoft/moc v0.10.8-alpha.16 - github.com/microsoft/moc-sdk-for-go v0.10.8 + github.com/microsoft/moc v0.10.8-alpha.12.0.20210413063441-d8fc6838c4b1 + github.com/microsoft/moc-sdk-for-go v0.10.8-alpha.8.0.20210413164523-0b990b432c46 github.com/pkg/errors v0.9.1 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 - golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1 // indirect - golang.org/x/sys v0.0.0-20210412220455-f1c623a9e750 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/grpc v1.27.1 k8s.io/api v0.17.9 k8s.io/apimachinery v0.17.9 diff --git a/go.sum b/go.sum index cc8ee47a..eb0d201e 100644 --- a/go.sum +++ b/go.sum @@ -313,6 +313,8 @@ github.com/microsoft/moc-sdk-for-go v0.10.6-alpha.2 h1:+WU7eKJfQn2aeIOooRJ1Lao4i github.com/microsoft/moc-sdk-for-go v0.10.6-alpha.2/go.mod h1:+0tW+HUW2T4NYqbww2sbxD8vxRXSqJb49emOJZLFrCA= github.com/microsoft/moc-sdk-for-go v0.10.6-alpha.7 h1:Yv5WLjL8LBrofAqvdLbHZqXQb2rY+Q7N+98/HPB2Ddo= github.com/microsoft/moc-sdk-for-go v0.10.6-alpha.7/go.mod h1:cUhelJyVi1uq9lhLSY+oVvg0RHr3NUpL3mfM4ccUZSQ= +github.com/microsoft/moc-sdk-for-go v0.10.8-alpha.8.0.20210413164523-0b990b432c46 h1:5SlGXeoZwPpWvP71Zes2npDTKDEz5dqAFoTCni2crQA= +github.com/microsoft/moc-sdk-for-go v0.10.8-alpha.8.0.20210413164523-0b990b432c46/go.mod h1:sMH+9BdNOQzs0n9aVILkBBbfZR0yru19WMlNJ6j+ESs= github.com/microsoft/moc-sdk-for-go v0.10.8 h1:RIRYwwKMsTCsWtpjDx5its7MSMtfn+YxDLzs4affUes= github.com/microsoft/moc-sdk-for-go v0.10.8/go.mod h1:Y6G0lF+rUkg9QwuBSdT/wzXbPdBsMhqIvdIr5SpjW8Q= github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= From e0db96ecf634c2edb6a4f3e5361d01f75e514b95 Mon Sep 17 00:00:00 2001 From: Roaa Sakr Date: Thu, 15 Apr 2021 05:36:59 -0700 Subject: [PATCH 05/16] Loadbalancer workaround --- cloud/scope/cluster.go | 4 +++- controllers/azurestackhcicluster_controller.go | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cloud/scope/cluster.go b/cloud/scope/cluster.go index adcc235d..2ae9f9e2 100644 --- a/cloud/scope/cluster.go +++ b/cloud/scope/cluster.go @@ -192,7 +192,9 @@ func (s *ClusterScope) APIServerPort() int32 { } func (s *ClusterScope) AzureStackHCILoadBalancer() *infrav1.AzureStackHCILoadBalancerSpec { - return s.AzureStackHCICluster.Spec.AzureStackHCILoadBalancer + // Disable the load balancer for baremetal machine scenarios + // return s.AzureStackHCICluster.Spec.AzureStackHCILoadBalancer + return nil } // GetNamespaceOrDefault returns the default namespace if given empty diff --git a/controllers/azurestackhcicluster_controller.go b/controllers/azurestackhcicluster_controller.go index 11ccc5c7..ee44f9c8 100644 --- a/controllers/azurestackhcicluster_controller.go +++ b/controllers/azurestackhcicluster_controller.go @@ -146,6 +146,14 @@ func (r *AzureStackHCIClusterReconciler) reconcileNormal(clusterScope *scope.Clu return reconcile.Result{Requeue: true, RequeueAfter: time.Second * 20}, nil } + if clusterScope.AzureStackHCICluster.Name != "clustergroup-management" { + // Set APIEndpoints so the Cluster API Cluster Controller can pull them + clusterScope.AzureStackHCICluster.Spec.ControlPlaneEndpoint = clusterv1.APIEndpoint{ + Host: "10.137.185.128", // TODO update + Port: clusterScope.APIServerPort(), + } + } + // No errors, so mark us ready so the Cluster API Cluster Controller can pull it azureStackHCICluster.Status.Ready = true conditions.MarkTrue(azureStackHCICluster, infrav1.NetworkInfrastructureReadyCondition) From def897d737f99964b2c3f1b466327f8d0cca8402 Mon Sep 17 00:00:00 2001 From: Roaa Sakr Date: Mon, 19 Apr 2021 13:44:47 -0700 Subject: [PATCH 06/16] remove missed CloudResourceName --- api/v1alpha3/azurestackhcivirtualmachine_types.go | 6 ------ cloud/scope/virtualmachine.go | 5 ----- controllers/azurestackhcicluster_controller.go | 9 +-------- controllers/azurestackhcivirtualmachine_controller.go | 1 - 4 files changed, 1 insertion(+), 20 deletions(-) diff --git a/api/v1alpha3/azurestackhcivirtualmachine_types.go b/api/v1alpha3/azurestackhcivirtualmachine_types.go index ee8fb27f..7bc93519 100644 --- a/api/v1alpha3/azurestackhcivirtualmachine_types.go +++ b/api/v1alpha3/azurestackhcivirtualmachine_types.go @@ -74,12 +74,6 @@ type AzureStackHCIVirtualMachineStatus struct { // Conditions defines current service state of the AzureStackHCIVirtualMachine. // +optional Conditions clusterv1.Conditions `json:"conditions,omitempty"` - - // CloudResourceName is the name resource used by the machine. - // For VMs, this will be the same as Name. For bare-metal machines, it will be the name - // of the host. - // +optional - CloudResourceName string `json:"cloudResourceName,omitempty"` } // +kubebuilder:object:root=true diff --git a/cloud/scope/virtualmachine.go b/cloud/scope/virtualmachine.go index a92193f6..3aedbbfe 100644 --- a/cloud/scope/virtualmachine.go +++ b/cloud/scope/virtualmachine.go @@ -179,11 +179,6 @@ func (m *VirtualMachineScope) SetAnnotation(key, value string) { m.AzureStackHCIVirtualMachine.Annotations[key] = value } -// SetCloudResourceName sets the AzureStackHCIVirtualMachine resource name. -func (m *VirtualMachineScope) SetCloudResourceName(resourceName string) { - m.AzureStackHCIVirtualMachine.Status.CloudResourceName = resourceName -} - // PatchObject persists the virtual machine spec and status. func (m *VirtualMachineScope) PatchObject() error { conditions.SetSummary(m.AzureStackHCIVirtualMachine, diff --git a/controllers/azurestackhcicluster_controller.go b/controllers/azurestackhcicluster_controller.go index ee44f9c8..12462cb3 100644 --- a/controllers/azurestackhcicluster_controller.go +++ b/controllers/azurestackhcicluster_controller.go @@ -146,14 +146,6 @@ func (r *AzureStackHCIClusterReconciler) reconcileNormal(clusterScope *scope.Clu return reconcile.Result{Requeue: true, RequeueAfter: time.Second * 20}, nil } - if clusterScope.AzureStackHCICluster.Name != "clustergroup-management" { - // Set APIEndpoints so the Cluster API Cluster Controller can pull them - clusterScope.AzureStackHCICluster.Spec.ControlPlaneEndpoint = clusterv1.APIEndpoint{ - Host: "10.137.185.128", // TODO update - Port: clusterScope.APIServerPort(), - } - } - // No errors, so mark us ready so the Cluster API Cluster Controller can pull it azureStackHCICluster.Status.Ready = true conditions.MarkTrue(azureStackHCICluster, infrav1.NetworkInfrastructureReadyCondition) @@ -229,6 +221,7 @@ func (r *AzureStackHCIClusterReconciler) reconcileDelete(clusterScope *scope.Clu } func (r *AzureStackHCIClusterReconciler) reconcileAzureStackHCILoadBalancer(clusterScope *scope.ClusterScope) (bool, error) { + // TODO: set ControlPlaneEndpoint in case there's no load balancer assigned if clusterScope.AzureStackHCILoadBalancer() == nil { clusterScope.Info("Skipping load balancer reconciliation since AzureStackHCICluster.Spec.AzureStackHCILoadBalancer is nil") return true, nil diff --git a/controllers/azurestackhcivirtualmachine_controller.go b/controllers/azurestackhcivirtualmachine_controller.go index 28b169e4..39cb3000 100644 --- a/controllers/azurestackhcivirtualmachine_controller.go +++ b/controllers/azurestackhcivirtualmachine_controller.go @@ -148,7 +148,6 @@ func (r *AzureStackHCIVirtualMachineReconciler) reconcileNormal(virtualMachineSc // Proceed to reconcile the AzureStackHCIVirtualMachine state. virtualMachineScope.SetVMState(vm.State) - virtualMachineScope.SetCloudResourceName(vm.Name) switch vm.State { case infrav1.VMStateSucceeded: From 61a0882319203cc66f80d157512b10f8ea0401ea Mon Sep 17 00:00:00 2001 From: Roaa Sakr Date: Tue, 20 Apr 2021 10:20:56 -0700 Subject: [PATCH 07/16] cleanup --- .../services/virtualmachines/virtualmachines.go | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/cloud/services/virtualmachines/virtualmachines.go b/cloud/services/virtualmachines/virtualmachines.go index 47df1f3d..542aef3e 100644 --- a/cloud/services/virtualmachines/virtualmachines.go +++ b/cloud/services/virtualmachines/virtualmachines.go @@ -269,8 +269,7 @@ func (s *Service) Delete(ctx context.Context, spec interface{}) error { switch vmSpec.HostType { case infrav1.HostTypeBareMetal: klog.V(2).Infof("deleting bare-metal machine %s ", vmSpec.Name) - err = s.clearBareMetalMachine(ctx, vmSpec) - + err = s.BareMetalClient.Delete(ctx, s.Scope.GetResourceGroup(), vmSpec.Name) default: klog.V(2).Infof("deleting vm %s ", vmSpec.Name) err = s.VMClient.Delete(ctx, s.Scope.GetResourceGroup(), vmSpec.Name) @@ -281,22 +280,13 @@ func (s *Service) Delete(ctx context.Context, spec interface{}) error { return nil } if err != nil { - return errors.Wrapf(err, "failed to delete vm %s in resource group %s", vmSpec.Name, s.Scope.GetResourceGroup()) + return errors.Wrapf(err, "failed to delete %s %s in resource group %s", vmSpec.HostType, vmSpec.Name, s.Scope.GetResourceGroup()) } - klog.V(2).Infof("successfully deleted vm %s ", vmSpec.Name) + klog.V(2).Infof("successfully deleted %s %s ", vmSpec.HostType, vmSpec.Name) return err } -func (s *Service) clearBareMetalMachine(ctx context.Context, vmSpec *Spec) error { - err := s.BareMetalClient.Delete(ctx, s.Scope.GetResourceGroup(), vmSpec.Name) - if err != nil { - return errors.Wrapf(err, "Failed to delete baremetal machine") - } - - return nil -} - // generateStorageProfile generates a pointer to a compute.StorageProfile which can utilized for VM creation. func generateStorageProfile(vmSpec Spec) (*compute.StorageProfile, error) { osDisk := &compute.OSDisk{ From a73354119ce77186897a76cd4bef70f697a6fd9c Mon Sep 17 00:00:00 2001 From: Chris Gunn Date: Tue, 20 Apr 2021 16:43:04 -0700 Subject: [PATCH 08/16] Update Makefile to match master branch (#119) --- Makefile | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index c6505366..73370d56 100644 --- a/Makefile +++ b/Makefile @@ -354,13 +354,27 @@ create-cluster: .PHONY: deployment deployment: dev-release create-cluster ## Build and deploy caph in a kind management cluster. -# Build CAPH K8s definitions for dev purposes. -# Useful when a custom $REGISTRY URL has been set. (For example, when using a local docker container registry.) -.PHONY: dev-manifests -dev-manifests: $(RELEASE_DIR) - cp ./dev/manager_image_patch_template.yaml ./dev/manager_image_patch.yaml - sed -i'' -e 's@value: .*@value: '"${CONTROLLER_IMG}:$(TAG)"'@' ./dev/manager_image_patch.yaml - kustomize build dev > $(RELEASE_DIR)/infrastructure-components.yaml +## -------------------------------------- +## Development: Local/private registry +## -------------------------------------- + +# Create patch files to override container image registry. +.PHONY: local-dev-set-manifest-image +local-dev-set-manifest-image: + cp ./hack/config/manager_image_patch_template.yaml ./hack/config/manager_image_patch.yaml + sed -i'' -e 's@value:.*@value: '"${CONTROLLER_IMG}:$(TAG)"'@' ./hack/config/manager_image_patch.yaml + +# Build config. +.PHONY: local-dev-release-manifests +local-dev-release-manifests: $(RELEASE_DIR) + kustomize build ./hack/config > $(RELEASE_DIR)/infrastructure-components.yaml + +.PHONY: local-dev-release +local-dev-release: + $(MAKE) docker-build-img + $(MAKE) docker-push + $(MAKE) local-dev-set-manifest-image + $(MAKE) local-dev-release-manifests ## -------------------------------------- ## Kind From c6b2b372e1121455f159ac7674940a07b6a3b8d1 Mon Sep 17 00:00:00 2001 From: Chris Gunn Date: Tue, 20 Apr 2021 16:57:49 -0700 Subject: [PATCH 09/16] Add missing files (#120) --- .gitignore | 5 ++++- hack/config/kustomization.yaml | 10 ++++++++++ hack/config/manager_image_patch_template.yaml | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 hack/config/kustomization.yaml create mode 100644 hack/config/manager_image_patch_template.yaml diff --git a/.gitignore b/.gitignore index 6ae52adf..118c52c3 100644 --- a/.gitignore +++ b/.gitignore @@ -55,4 +55,7 @@ test/e2e/junit.e2e_suite.*.xml test/e2e/logs/* # generated template yamls -templates/cluster-template*.yaml \ No newline at end of file +templates/cluster-template*.yaml + +# Hack files +/hack/config/manager_image_patch.yaml diff --git a/hack/config/kustomization.yaml b/hack/config/kustomization.yaml new file mode 100644 index 00000000..c195b1cd --- /dev/null +++ b/hack/config/kustomization.yaml @@ -0,0 +1,10 @@ +bases: + - ../../config + +patchesJson6902: + - target: + group: apps + version: v1 + kind: Deployment + name: controller-manager + path: manager_image_patch.yaml diff --git a/hack/config/manager_image_patch_template.yaml b/hack/config/manager_image_patch_template.yaml new file mode 100644 index 00000000..32679b09 --- /dev/null +++ b/hack/config/manager_image_patch_template.yaml @@ -0,0 +1,3 @@ +- op: replace + path: "/spec/template/spec/containers/0/image" + value: From 828f54bf77503fdb43cc34fdf16b7ff56fe9675a Mon Sep 17 00:00:00 2001 From: Chris Gunn Date: Fri, 23 Apr 2021 10:19:04 -0700 Subject: [PATCH 10/16] Fix retrieval logic for existing bare-metal machines. (#121) Location value is being provided instead of a group value. --- cloud/services/virtualmachines/virtualmachines.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/services/virtualmachines/virtualmachines.go b/cloud/services/virtualmachines/virtualmachines.go index 542aef3e..6a32b51e 100644 --- a/cloud/services/virtualmachines/virtualmachines.go +++ b/cloud/services/virtualmachines/virtualmachines.go @@ -74,7 +74,7 @@ func (s *Service) Get(ctx context.Context, spec interface{}) (interface{}, error case infrav1.HostTypeBareMetal: var baremetalmachine *[]compute.BareMetalMachine - baremetalmachine, err = s.BareMetalClient.Get(ctx, s.Scope.Location(), vmSpec.Name) + baremetalmachine, err = s.BareMetalClient.Get(ctx, s.Scope.GetResourceGroup(), vmSpec.Name) if err != nil { return nil, err } From 77bc61608fc4204db3fffb2169965b734eee8916 Mon Sep 17 00:00:00 2001 From: Chris Gunn Date: Tue, 27 Apr 2021 18:34:16 -0700 Subject: [PATCH 11/16] Use new moc package's providerid functions. (#123) * Use new moc package's providerid functions. Use the new `providerid.FormatProviderID` function in MOC package instead of manually formatting the provider ID. This also inherently adds support for bare-metal provider IDs. * go.mod updates --- controllers/azurestackhcimachine_controller.go | 5 ++--- go.mod | 4 ++-- go.sum | 5 +++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/controllers/azurestackhcimachine_controller.go b/controllers/azurestackhcimachine_controller.go index c30fa1ff..581fbc58 100644 --- a/controllers/azurestackhcimachine_controller.go +++ b/controllers/azurestackhcimachine_controller.go @@ -21,13 +21,12 @@ import ( "context" "time" - "fmt" - "github.com/Azure/go-autorest/autorest/to" "github.com/go-logr/logr" infrav1 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1alpha3" azurestackhci "github.com/microsoft/cluster-api-provider-azurestackhci/cloud" "github.com/microsoft/cluster-api-provider-azurestackhci/cloud/scope" + "github.com/microsoft/moc/pkg/providerid" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" @@ -217,7 +216,7 @@ func (r *AzureStackHCIMachineReconciler) reconcileNormal(machineScope *scope.Mac } // Make sure Spec.ProviderID is always set. - machineScope.SetProviderID(fmt.Sprintf("moc://%s", vm.Name)) + machineScope.SetProviderID(providerid.FormatProviderID(providerid.HostType(vm.Spec.HostType), vm.Name)) // TODO(vincepri): Remove this annotation when clusterctl is no longer relevant. machineScope.SetAnnotation("cluster-api-provider-azurestackhci", "true") diff --git a/go.mod b/go.mod index fbc66187..cd54055e 100644 --- a/go.mod +++ b/go.mod @@ -7,8 +7,8 @@ require ( github.com/Azure/go-autorest/autorest/to v0.3.0 github.com/blang/semver v3.5.1+incompatible github.com/go-logr/logr v0.1.0 - github.com/microsoft/moc v0.10.8-alpha.12.0.20210413063441-d8fc6838c4b1 - github.com/microsoft/moc-sdk-for-go v0.10.8-alpha.8.0.20210413164523-0b990b432c46 + github.com/microsoft/moc v0.10.8-alpha.12.0.20210428012510-664c2c722996 + github.com/microsoft/moc-sdk-for-go v0.10.8-alpha.8.0.20210428013020-9db0241a87fc github.com/pkg/errors v0.9.1 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 diff --git a/go.sum b/go.sum index f9550dd8..0df110f9 100644 --- a/go.sum +++ b/go.sum @@ -318,8 +318,11 @@ github.com/microsoft/moc v0.10.6-alpha.6 h1:1hPvMXEK3Okc6rT5ryOpPM56t4D4u5v7VD9e github.com/microsoft/moc v0.10.6-alpha.6/go.mod h1:cIuJXU7UOjEXnHEZj8IGH4z9Lrc8lcVGp5/h+YVemec= github.com/microsoft/moc v0.10.8-alpha.12.0.20210413063441-d8fc6838c4b1 h1:rv0fCgeGZsFFuom+x85WBuJ7uD9VpLYz/ZwLiVhwIB8= github.com/microsoft/moc v0.10.8-alpha.12.0.20210413063441-d8fc6838c4b1/go.mod h1:B9W3xCoqNhfCMQ5dsQ12JOcsmG0xbpXQ8ux7u/n/rco= +github.com/microsoft/moc v0.10.8-alpha.12.0.20210428012510-664c2c722996 h1:xAkpMHUgf/uwbLwHFcihcNA9wTxhRg2r6PMf66syIlQ= +github.com/microsoft/moc v0.10.8-alpha.12.0.20210428012510-664c2c722996/go.mod h1:B9W3xCoqNhfCMQ5dsQ12JOcsmG0xbpXQ8ux7u/n/rco= github.com/microsoft/moc v0.10.8-alpha.16 h1:uRL8OcekJ6MUjJyOIwhskJ1H2T3WuZw1y94iEJakwxk= github.com/microsoft/moc v0.10.8-alpha.16/go.mod h1:bY29w3GntaOpAFMT7eOQb6S/X0yOMCBOkaMhwvIPoOM= +github.com/microsoft/moc v0.10.8 h1:tA6rGLDQi2FJeDprh/igD7vOeqlU4ifKA00dVUpIoSc= github.com/microsoft/moc-sdk-for-go v0.10.1-alpha.1 h1:rU0ec4KfkZ2Gmw1U4Zg7gOraeEqm9a40SFWTjVs5/es= github.com/microsoft/moc-sdk-for-go v0.10.1-alpha.1/go.mod h1:qWMWuKLImyoYPO6vsXz21onA2AE7UaBfzaS/giQpOMU= github.com/microsoft/moc-sdk-for-go v0.10.6-alpha.1 h1:ss6ftjGBw+Y3AjiJKh/HNwWT5qVkirwNsaIP3UInYR4= @@ -330,6 +333,8 @@ github.com/microsoft/moc-sdk-for-go v0.10.6-alpha.7 h1:Yv5WLjL8LBrofAqvdLbHZqXQb github.com/microsoft/moc-sdk-for-go v0.10.6-alpha.7/go.mod h1:cUhelJyVi1uq9lhLSY+oVvg0RHr3NUpL3mfM4ccUZSQ= github.com/microsoft/moc-sdk-for-go v0.10.8-alpha.8.0.20210413164523-0b990b432c46 h1:5SlGXeoZwPpWvP71Zes2npDTKDEz5dqAFoTCni2crQA= github.com/microsoft/moc-sdk-for-go v0.10.8-alpha.8.0.20210413164523-0b990b432c46/go.mod h1:sMH+9BdNOQzs0n9aVILkBBbfZR0yru19WMlNJ6j+ESs= +github.com/microsoft/moc-sdk-for-go v0.10.8-alpha.8.0.20210428013020-9db0241a87fc h1:y960c8P+aQKbnmPtn2uLaUuRaa6vWZNhBLzjFVPJmiE= +github.com/microsoft/moc-sdk-for-go v0.10.8-alpha.8.0.20210428013020-9db0241a87fc/go.mod h1:qCs+nwaqmL3m9ygpjOzegoT0S3/J/4EExOgOiRao75E= github.com/microsoft/moc-sdk-for-go v0.10.8 h1:RIRYwwKMsTCsWtpjDx5its7MSMtfn+YxDLzs4affUes= github.com/microsoft/moc-sdk-for-go v0.10.8/go.mod h1:Y6G0lF+rUkg9QwuBSdT/wzXbPdBsMhqIvdIr5SpjW8Q= github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= From 545d8ebb615b1f603e02ce12c11b7fd1d217406a Mon Sep 17 00:00:00 2001 From: Chris Gunn Date: Tue, 11 May 2021 15:03:52 -0700 Subject: [PATCH 12/16] Update go.mod --- go.mod | 4 ++-- go.sum | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index cd54055e..24a8e701 100644 --- a/go.mod +++ b/go.mod @@ -7,8 +7,8 @@ require ( github.com/Azure/go-autorest/autorest/to v0.3.0 github.com/blang/semver v3.5.1+incompatible github.com/go-logr/logr v0.1.0 - github.com/microsoft/moc v0.10.8-alpha.12.0.20210428012510-664c2c722996 - github.com/microsoft/moc-sdk-for-go v0.10.8-alpha.8.0.20210428013020-9db0241a87fc + github.com/microsoft/moc v0.10.10-0.20210510205040-161b5e608074 + github.com/microsoft/moc-sdk-for-go v0.10.10-0.20210511215707-cd535d83b9f4 github.com/pkg/errors v0.9.1 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 diff --git a/go.sum b/go.sum index aa54ec6d..be2fc658 100644 --- a/go.sum +++ b/go.sum @@ -26,6 +26,7 @@ github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/KnicKnic/go-windows v0.0.3-0.20200421223124-91aad71334c6/go.mod h1:bq9qyrkvAvMH2HPlkix2bE/eDuRz1kzwyoV/ieVhqK0= +github.com/KnicKnic/go-windows v0.0.3/go.mod h1:bq9qyrkvAvMH2HPlkix2bE/eDuRz1kzwyoV/ieVhqK0= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= @@ -316,12 +317,20 @@ github.com/microsoft/moc v0.10.1-alpha.4 h1:5P6UR+2kq+X9dsjVA2OBDPLNBg0YOgGsqqUR github.com/microsoft/moc v0.10.1-alpha.4/go.mod h1:oK8iLrb4IOdvmokCAgbMWzPj2m7PcARZnCa3g3tNrFI= github.com/microsoft/moc v0.10.8-alpha.12.0.20210428012510-664c2c722996 h1:xAkpMHUgf/uwbLwHFcihcNA9wTxhRg2r6PMf66syIlQ= github.com/microsoft/moc v0.10.8-alpha.12.0.20210428012510-664c2c722996/go.mod h1:B9W3xCoqNhfCMQ5dsQ12JOcsmG0xbpXQ8ux7u/n/rco= +github.com/microsoft/moc v0.10.10-0.20210510205040-161b5e608074 h1:oBj4/xtW4us72FkEfr2T5LdPrSJZTEbOkf+5pQ3XjYA= +github.com/microsoft/moc v0.10.10-0.20210510205040-161b5e608074/go.mod h1:85uh28c+MxW6gfG8HUhOpN41LvkIkOMigteiPGI6yM4= +github.com/microsoft/moc-pkg v0.10.9-alpha.4.0.20210511211911-84d67d21f73c/go.mod h1:99/T/L1V2DJfdJ9hgPsYC6gX7S+bFW+4w7sZoJQjSXg= github.com/microsoft/moc-sdk-for-go v0.10.8-alpha.8.0.20210428013020-9db0241a87fc h1:y960c8P+aQKbnmPtn2uLaUuRaa6vWZNhBLzjFVPJmiE= github.com/microsoft/moc-sdk-for-go v0.10.8-alpha.8.0.20210428013020-9db0241a87fc/go.mod h1:qCs+nwaqmL3m9ygpjOzegoT0S3/J/4EExOgOiRao75E= +github.com/microsoft/moc-sdk-for-go v0.10.10-0.20210511215707-cd535d83b9f4 h1:PPcnTnEfXPgy8UhxrwfyygAO709FXUUYUfaOvD2osZg= +github.com/microsoft/moc-sdk-for-go v0.10.10-0.20210511215707-cd535d83b9f4/go.mod h1:mWuwdPq1VBSGLCsGK+pS9p7Q85xqOGxPKjcM1ttKRZI= +github.com/microsoft/wmi v0.4.0-alpha.2/go.mod h1:Zn98qKc7WxZll23nec2To1Yz4M8xqcxGTaRmQSeHJ5U= github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.0 h1:7ks8ZkOP5/ujthUsT07rNv+nkLXCQWKNHuwzOAesEks= +github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -335,6 +344,7 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.1/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= +github.com/nwoodmsft/iso9660 v0.0.0-20191211094520-15de0aa41e99/go.mod h1:oIuE6nqRO03jsO5LH16blMV11a3d2WF4mh8jZ19/g2A= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -381,6 +391,7 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.11 h1:DhHlBtkHWPYi8O2y31JkK0TF+DGM+51OopZjH/Ia5qI= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= @@ -395,6 +406,7 @@ github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdh github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -432,6 +444,7 @@ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69 github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= @@ -441,10 +454,12 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1: go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd v0.5.0-alpha.5.0.20201125193152-8a03d2e9614b/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -527,14 +542,18 @@ golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190529164535-6a60838ec259/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -589,11 +608,13 @@ google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -670,6 +691,8 @@ k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29/go.mod h1:F+5wygcW0wmRTnM k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200619165400-6e3d28b6ed19 h1:7Nu2dTj82c6IaWvL7hImJzcXoTPz1MsSCH7r+0m6rfo= k8s.io/utils v0.0.0-20200619165400-6e3d28b6ed19/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +libvirt.org/libvirt-go v6.6.0+incompatible/go.mod h1:CPoljLoiC2aEw+62g1rZXl2oXAJaNsrq4YCSmJOELek= +libvirt.org/libvirt-go-xml v6.6.0+incompatible/go.mod h1:FL+H1+hKNWDdkKQGGS4sGCZJ3pGWcjt6VbxZvPlQJkY= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= From 559338a3e83bec372cc33d82e24d354153ef2ab4 Mon Sep 17 00:00:00 2001 From: Chris Gunn Date: Thu, 13 May 2021 15:39:39 -0700 Subject: [PATCH 13/16] Remove load balancer workaround for bare metal. --- cloud/scope/cluster.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cloud/scope/cluster.go b/cloud/scope/cluster.go index 2ae9f9e2..adcc235d 100644 --- a/cloud/scope/cluster.go +++ b/cloud/scope/cluster.go @@ -192,9 +192,7 @@ func (s *ClusterScope) APIServerPort() int32 { } func (s *ClusterScope) AzureStackHCILoadBalancer() *infrav1.AzureStackHCILoadBalancerSpec { - // Disable the load balancer for baremetal machine scenarios - // return s.AzureStackHCICluster.Spec.AzureStackHCILoadBalancer - return nil + return s.AzureStackHCICluster.Spec.AzureStackHCILoadBalancer } // GetNamespaceOrDefault returns the default namespace if given empty From b162428ac73efaeac1a1f4060db427ca58f59700 Mon Sep 17 00:00:00 2001 From: Chris Gunn Date: Thu, 3 Jun 2021 15:59:19 -0700 Subject: [PATCH 14/16] Pre-upstream cleanup --- aksiot.md | 3 - cloud/scope/scopeinterface.go | 1 - .../azurestackhcicluster_controller.go | 1 - dev/.gitignore | 1 - dev/kustomization.yaml | 10 -- dev/manager_image_patch_template.yaml | 3 - go.sum | 101 ++++++++++++++++++ 7 files changed, 101 insertions(+), 19 deletions(-) delete mode 100644 aksiot.md delete mode 100644 dev/.gitignore delete mode 100644 dev/kustomization.yaml delete mode 100644 dev/manager_image_patch_template.yaml diff --git a/aksiot.md b/aksiot.md deleted file mode 100644 index f23596b1..00000000 --- a/aksiot.md +++ /dev/null @@ -1,3 +0,0 @@ -# AksIoT - -[place holder] diff --git a/cloud/scope/scopeinterface.go b/cloud/scope/scopeinterface.go index 48bf0c86..3dea8ac8 100644 --- a/cloud/scope/scopeinterface.go +++ b/cloud/scope/scopeinterface.go @@ -26,5 +26,4 @@ type ScopeInterface interface { GetResourceGroup() string GetCloudAgentFqdn() string GetAuthorizer() auth.Authorizer - Location() string } diff --git a/controllers/azurestackhcicluster_controller.go b/controllers/azurestackhcicluster_controller.go index ab6d7f06..100b9603 100644 --- a/controllers/azurestackhcicluster_controller.go +++ b/controllers/azurestackhcicluster_controller.go @@ -222,7 +222,6 @@ func (r *AzureStackHCIClusterReconciler) reconcileDelete(clusterScope *scope.Clu } func (r *AzureStackHCIClusterReconciler) reconcileAzureStackHCILoadBalancer(clusterScope *scope.ClusterScope) (bool, error) { - // TODO: set ControlPlaneEndpoint in case there's no load balancer assigned if clusterScope.AzureStackHCILoadBalancer() == nil { clusterScope.Info("Skipping load balancer reconciliation since AzureStackHCICluster.Spec.AzureStackHCILoadBalancer is nil") return true, nil diff --git a/dev/.gitignore b/dev/.gitignore deleted file mode 100644 index 47a8e4da..00000000 --- a/dev/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/manager_image_patch.yaml diff --git a/dev/kustomization.yaml b/dev/kustomization.yaml deleted file mode 100644 index f6134634..00000000 --- a/dev/kustomization.yaml +++ /dev/null @@ -1,10 +0,0 @@ -bases: - - ../config - -patchesJson6902: - - target: - group: apps - version: v1 - kind: Deployment - name: controller-manager - path: manager_image_patch.yaml diff --git a/dev/manager_image_patch_template.yaml b/dev/manager_image_patch_template.yaml deleted file mode 100644 index a72eae0b..00000000 --- a/dev/manager_image_patch_template.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- op: replace - path: "/spec/template/spec/containers/0/image" - value: diff --git a/go.sum b/go.sum index be2fc658..39963f8b 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,17 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= contrib.go.opencensus.io/exporter/jaeger v0.2.0/go.mod h1:ukdzwIYYHgZ7QYtwVFQUjiT28BJHiMhTERo32s6qVgM= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.10.0 h1:mvdtztBqcL8se7MdrUweNieTNi4kfNG6GOJuurQJpuY= @@ -43,7 +53,10 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alessio/shellescape v0.0.0-20190409004728-b115ca0f9053/go.mod h1:xW8sBma2LE3QxFSzCnH9qe6gAE2yO9GvQaWwX89HxbE= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -52,6 +65,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115/go.mod h1:zVt7zX3K/aDCk9Tj+VM7YymsX66ERvzCJzw8rFCX2JU= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= @@ -70,6 +84,7 @@ github.com/coredns/corefile-migration v1.0.7/go.mod h1:OFwBp/Wc9dJt5cAZzHWMNhK1r github.com/coredns/corefile-migration v1.0.11/go.mod h1:RMy/mXdeDlYwzt0vdMEJvT2hGJ2I86/eO0UdXmH9XNI= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -120,6 +135,7 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-acme/lego v2.5.0+incompatible/go.mod h1:yzMNe9CasVUhkquNvti5nAtPmG94USbYxYrZfTkIn0M= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -189,6 +205,7 @@ github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18h github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -223,12 +240,15 @@ github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= @@ -237,13 +257,26 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGa github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -251,6 +284,10 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95/go.mod h1:QiyDdbZLaJ/mZP4Zwc9g2QsfaEA4o7XvvgZegSci5/E= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -306,6 +343,7 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -325,8 +363,15 @@ github.com/microsoft/moc-sdk-for-go v0.10.8-alpha.8.0.20210428013020-9db0241a87f github.com/microsoft/moc-sdk-for-go v0.10.10-0.20210511215707-cd535d83b9f4 h1:PPcnTnEfXPgy8UhxrwfyygAO709FXUUYUfaOvD2osZg= github.com/microsoft/moc-sdk-for-go v0.10.10-0.20210511215707-cd535d83b9f4/go.mod h1:mWuwdPq1VBSGLCsGK+pS9p7Q85xqOGxPKjcM1ttKRZI= github.com/microsoft/wmi v0.4.0-alpha.2/go.mod h1:Zn98qKc7WxZll23nec2To1Yz4M8xqcxGTaRmQSeHJ5U= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.0 h1:7ks8ZkOP5/ujthUsT07rNv+nkLXCQWKNHuwzOAesEks= @@ -361,6 +406,7 @@ github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.6.0 h1:aetoXYr0Tv7xRU/V4B4IZJ2QcbtMUFoNb3ORp7TzIK4= @@ -372,6 +418,7 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= @@ -398,11 +445,14 @@ github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4 github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -431,6 +481,8 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= +github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -459,6 +511,7 @@ go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qL go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= @@ -468,12 +521,15 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/ go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -483,19 +539,32 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnk golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -504,6 +573,8 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190328230028-74de082e2cca/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -516,6 +587,8 @@ golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1 h1:4qWs8cYYH6PoEFy4dfhDFgoMG golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210510120150-4163338589ed h1:p9UgmWI9wKpfYmgaV/IZKGdXc5qEK45tDwwwDyjS26I= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -528,9 +601,11 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -545,7 +620,9 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190529164535-6a60838ec259/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -562,6 +639,8 @@ golang.org/x/sys v0.0.0-20210412220455-f1c623a9e750/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea h1:+WiDlPBBaO+h9vPNZi8uJ3k4BkKQB7Iow3aqwHVA5hI= +golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -587,10 +666,19 @@ golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= @@ -601,21 +689,30 @@ gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40 gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -637,6 +734,7 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -662,7 +760,9 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= k8s.io/api v0.17.9 h1:BA/U8qtSNzx7BbmQy3lODbCxVMKGNUpBJ2fjsKt6OOY= k8s.io/api v0.17.9/go.mod h1:avJJAA1fSV6tnbCGW2K+S+ilDFW7WpNr5BScoiZ1M1U= k8s.io/apiextensions-apiserver v0.17.9 h1:GWtUr9LErCZBV7QEUIF7wiICPG6wzPukFRrwDv/AIdM= @@ -698,6 +798,7 @@ modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/cluster-api v0.3.11 h1:sBXyOCDFAUMlfAL1Z/ttJolfUMsrIjWpyjKFUkADer4= sigs.k8s.io/cluster-api v0.3.11/go.mod h1:bKh9AXgYRu5d3483NpEVlcVJujDN+rBqMXpG5o69Xss= sigs.k8s.io/controller-runtime v0.5.11 h1:U/FjGJ61aR2T2mCrdlBCxEcWgLEwLmK6YZKf0NC0a24= From 4ac0b52256c7216db3f1e3f1c163fc1501604925 Mon Sep 17 00:00:00 2001 From: Chris Gunn Date: Fri, 4 Jun 2021 17:35:50 -0700 Subject: [PATCH 15/16] Add support for custom suffix for container image tags. (#133) --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 73370d56..01a0bdbd 100644 --- a/Makefile +++ b/Makefile @@ -51,6 +51,11 @@ KUBECTL=$(TOOLS_BIN_DIR)/kubectl KUBE_APISERVER=$(TOOLS_BIN_DIR)/kube-apiserver ETCD=$(TOOLS_BIN_DIR)/etcd +TAGSUFFIX_APPEND := +ifdef TAGSUFFIX + TAGSUFFIX_APPEND := -${TAGSUFFIX} +endif + # Version MAJOR_VER ?= 0 MINOR_VER ?= 3 @@ -62,7 +67,7 @@ STAGING_REGISTRY := mocimages.azurecr.io PROD_REGISTRY := mocimages.azurecr.io IMAGE_NAME ?= caphcontroller CONTROLLER_IMG ?= $(REGISTRY)/$(IMAGE_NAME) -TAG := $(MAJOR_VER).$(MINOR_VER).$(PATCH_VER) +TAG := $(MAJOR_VER).$(MINOR_VER).$(PATCH_VER)${TAGSUFFIX_APPEND} ARCH := amd64 ALL_ARCH = amd64 arm arm64 ppc64le s390x From fa77a7f1c9800a4795cbc6b690bdc3155db95a79 Mon Sep 17 00:00:00 2001 From: Jiri Appl Date: Mon, 1 Nov 2021 11:56:44 -0700 Subject: [PATCH 16/16] Merge fixes --- api/v1alpha3/zz_generated.conversion.go | 6 ++++++ api/v1alpha4/azurestackhciloadbalancer_types.go | 3 +++ api/v1alpha4/azurestackhcimachine_types.go | 3 +++ api/v1alpha4/azurestackhcivirtualmachine_types.go | 3 +++ api/v1alpha4/types.go | 12 ++++++++++++ ...re.cluster.x-k8s.io_azurestackhciclusters.yaml | 4 ++++ ...uster.x-k8s.io_azurestackhciloadbalancers.yaml | 4 ++++ ...re.cluster.x-k8s.io_azurestackhcimachines.yaml | 4 ++++ ...er.x-k8s.io_azurestackhcimachinetemplates.yaml | 4 ++++ ...ter.x-k8s.io_azurestackhcivirtualmachines.yaml | 4 ++++ go.mod | 7 +++++-- go.sum | 15 +++++++++++++++ 12 files changed, 67 insertions(+), 2 deletions(-) diff --git a/api/v1alpha3/zz_generated.conversion.go b/api/v1alpha3/zz_generated.conversion.go index 52e58c48..e164fae6 100644 --- a/api/v1alpha3/zz_generated.conversion.go +++ b/api/v1alpha3/zz_generated.conversion.go @@ -544,6 +544,7 @@ func autoConvert_v1alpha3_AzureStackHCILoadBalancerSpec_To_v1alpha4_AzureStackHC if err := Convert_v1alpha3_Image_To_v1alpha4_Image(&in.Image, &out.Image, s); err != nil { return err } + out.HostType = v1alpha4.HostType(in.HostType) out.VMSize = in.VMSize out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) return nil @@ -561,6 +562,7 @@ func autoConvert_v1alpha4_AzureStackHCILoadBalancerSpec_To_v1alpha3_AzureStackHC } out.VMSize = in.VMSize out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) + out.HostType = HostType(in.HostType) return nil } @@ -695,6 +697,7 @@ func Convert_v1alpha4_AzureStackHCIMachineProviderCondition_To_v1alpha3_AzureSta func autoConvert_v1alpha3_AzureStackHCIMachineSpec_To_v1alpha4_AzureStackHCIMachineSpec(in *AzureStackHCIMachineSpec, out *v1alpha4.AzureStackHCIMachineSpec, s conversion.Scope) error { out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) + out.HostType = v1alpha4.HostType(in.HostType) out.VMSize = in.VMSize if err := Convert_v1alpha3_AvailabilityZone_To_v1alpha4_AvailabilityZone(&in.AvailabilityZone, &out.AvailabilityZone, s); err != nil { return err @@ -719,6 +722,7 @@ func Convert_v1alpha3_AzureStackHCIMachineSpec_To_v1alpha4_AzureStackHCIMachineS func autoConvert_v1alpha4_AzureStackHCIMachineSpec_To_v1alpha3_AzureStackHCIMachineSpec(in *v1alpha4.AzureStackHCIMachineSpec, out *AzureStackHCIMachineSpec, s conversion.Scope) error { out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) + out.HostType = HostType(in.HostType) out.VMSize = in.VMSize if err := Convert_v1alpha4_AvailabilityZone_To_v1alpha3_AvailabilityZone(&in.AvailabilityZone, &out.AvailabilityZone, s); err != nil { return err @@ -942,6 +946,7 @@ func Convert_v1alpha4_AzureStackHCIVirtualMachineList_To_v1alpha3_AzureStackHCIV } func autoConvert_v1alpha3_AzureStackHCIVirtualMachineSpec_To_v1alpha4_AzureStackHCIVirtualMachineSpec(in *AzureStackHCIVirtualMachineSpec, out *v1alpha4.AzureStackHCIVirtualMachineSpec, s conversion.Scope) error { + out.HostType = v1alpha4.HostType(in.HostType) out.VMSize = in.VMSize if err := Convert_v1alpha3_AvailabilityZone_To_v1alpha4_AvailabilityZone(&in.AvailabilityZone, &out.AvailabilityZone, s); err != nil { return err @@ -971,6 +976,7 @@ func Convert_v1alpha3_AzureStackHCIVirtualMachineSpec_To_v1alpha4_AzureStackHCIV } func autoConvert_v1alpha4_AzureStackHCIVirtualMachineSpec_To_v1alpha3_AzureStackHCIVirtualMachineSpec(in *v1alpha4.AzureStackHCIVirtualMachineSpec, out *AzureStackHCIVirtualMachineSpec, s conversion.Scope) error { + out.HostType = HostType(in.HostType) out.VMSize = in.VMSize if err := Convert_v1alpha4_AvailabilityZone_To_v1alpha3_AvailabilityZone(&in.AvailabilityZone, &out.AvailabilityZone, s); err != nil { return err diff --git a/api/v1alpha4/azurestackhciloadbalancer_types.go b/api/v1alpha4/azurestackhciloadbalancer_types.go index 9c500d53..ef7cd84d 100644 --- a/api/v1alpha4/azurestackhciloadbalancer_types.go +++ b/api/v1alpha4/azurestackhciloadbalancer_types.go @@ -38,6 +38,9 @@ type AzureStackHCILoadBalancerSpec struct { // +optional // +kubebuilder:default=1 Replicas *int32 `json:"replicas,omitempty"` + + // +optional + HostType HostType `json:"hostType,omitempty"` } type AzureStackHCILoadBalancerStatus struct { diff --git a/api/v1alpha4/azurestackhcimachine_types.go b/api/v1alpha4/azurestackhcimachine_types.go index 2502dd3b..6d0eedc5 100644 --- a/api/v1alpha4/azurestackhcimachine_types.go +++ b/api/v1alpha4/azurestackhcimachine_types.go @@ -36,6 +36,9 @@ type AzureStackHCIMachineSpec struct { // +optional ProviderID *string `json:"providerID,omitempty"` + // +optional + HostType HostType `json:"hostType,omitempty"` + VMSize string `json:"vmSize"` AvailabilityZone AvailabilityZone `json:"availabilityZone,omitempty"` diff --git a/api/v1alpha4/azurestackhcivirtualmachine_types.go b/api/v1alpha4/azurestackhcivirtualmachine_types.go index 403f724e..e19d17b0 100644 --- a/api/v1alpha4/azurestackhcivirtualmachine_types.go +++ b/api/v1alpha4/azurestackhcivirtualmachine_types.go @@ -32,6 +32,9 @@ const ( // AzureStackHCIVirtualMachineSpec defines the desired state of AzureStackHCIVirtualMachine type AzureStackHCIVirtualMachineSpec struct { + // +optional + HostType HostType `json:"hostType,omitempty"` + VMSize string `json:"vmSize"` AvailabilityZone AvailabilityZone `json:"availabilityZone,omitempty"` Image Image `json:"image"` diff --git a/api/v1alpha4/types.go b/api/v1alpha4/types.go index b510407b..e78240dd 100644 --- a/api/v1alpha4/types.go +++ b/api/v1alpha4/types.go @@ -222,3 +222,15 @@ const ( ValueReady = "true" AnnotationControlPlaneReady = "azurestackhci.cluster.sigs.k8s.io/control-plane-ready" ) + +// HostType specifies what type of machine a node should be deployed on. +type HostType string + +const ( + // HostTypeVM specifies that the node should be deployed on a virtual machine. + // Default value. + HostTypeVM = HostType("vm") + + // HostTypeBareMetal specifies that the node should be deployed on a bare metal machine. + HostTypeBareMetal = HostType("baremetal") +) diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciclusters.yaml index 395e4533..1fb6db38 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciclusters.yaml @@ -351,6 +351,10 @@ spec: description: AzureStackHCILoadBalancer is used to declare the AzureStackHCILoadBalancerSpec if a LoadBalancer is desired for the AzureStackHCICluster. properties: + hostType: + description: HostType specifies what type of machine a node should + be deployed on. + type: string image: description: 'Image defines information about the image to use for VM creation. There are three ways to specify an image: by diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciloadbalancers.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciloadbalancers.yaml index 6f3cc03f..c0d5c709 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciloadbalancers.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhciloadbalancers.yaml @@ -292,6 +292,10 @@ spec: type: object spec: properties: + hostType: + description: HostType specifies what type of machine a node should + be deployed on. + type: string image: description: 'Image defines information about the image to use for VM creation. There are three ways to specify an image: by ID, by diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachines.yaml index 76e481f6..7dca9e03 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachines.yaml @@ -276,6 +276,10 @@ spec: id: type: string type: object + hostType: + description: HostType specifies what type of machine a node should + be deployed on. + type: string image: description: 'Image defines information about the image to use for VM creation. There are three ways to specify an image: by ID, by diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachinetemplates.yaml index 9007000e..312ed2bc 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcimachinetemplates.yaml @@ -197,6 +197,10 @@ spec: id: type: string type: object + hostType: + description: HostType specifies what type of machine a node + should be deployed on. + type: string image: description: 'Image defines information about the image to use for VM creation. There are three ways to specify an diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcivirtualmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcivirtualmachines.yaml index a14cebb0..33ac5d38 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcivirtualmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azurestackhcivirtualmachines.yaml @@ -276,6 +276,10 @@ spec: type: string clusterName: type: string + hostType: + description: HostType specifies what type of machine a node should + be deployed on. + type: string identity: description: VMIdentity defines the identity of the virtual machine, if configured. diff --git a/go.mod b/go.mod index 0b816382..294106af 100644 --- a/go.mod +++ b/go.mod @@ -6,12 +6,15 @@ require ( github.com/Azure/go-autorest/autorest v0.11.18 // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 github.com/blang/semver v3.5.1+incompatible + github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/go-logr/logr v0.4.0 - github.com/microsoft/moc v0.10.9 - github.com/microsoft/moc-sdk-for-go v0.10.9-alpha.4 + github.com/microsoft/moc v0.10.14 + github.com/microsoft/moc-sdk-for-go v0.10.14 + github.com/onsi/gomega v1.14.0 // indirect github.com/pkg/errors v0.9.1 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 + golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914 // indirect google.golang.org/grpc v1.39.0 k8s.io/api v0.21.3 k8s.io/apimachinery v0.21.3 diff --git a/go.sum b/go.sum index 781f5588..92b372d0 100644 --- a/go.sum +++ b/go.sum @@ -36,6 +36,7 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +code.cloudfoundry.org/bytefmt v0.0.0-20210608160410-67692ebc98de/go.mod h1:YOakoAiZWNbkynB2dKOKvdxVehYGn3EH4UXq/i99hYg= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= @@ -431,8 +432,13 @@ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182aff github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/microsoft/moc v0.10.9 h1:TI2ZE7pyMddctPPdsORiI+nLh2CPpwnie5RhUxf7b24= github.com/microsoft/moc v0.10.9/go.mod h1:bY29w3GntaOpAFMT7eOQb6S/X0yOMCBOkaMhwvIPoOM= +github.com/microsoft/moc v0.10.14-alpha.1/go.mod h1:6QpHAg6Y/MOxZxZ3BkyVPPHx7BSekYmz1OY2QJ6GfT8= +github.com/microsoft/moc v0.10.14 h1:MPcFdZgqGLoOf9dDPhisAKh5ILGcREHboxTBQxUpRpI= +github.com/microsoft/moc v0.10.14/go.mod h1:6QpHAg6Y/MOxZxZ3BkyVPPHx7BSekYmz1OY2QJ6GfT8= github.com/microsoft/moc-sdk-for-go v0.10.9-alpha.4 h1:LcmKVeyWY6zP5PQ/FJltmmt4M3rUbWVm3WQPDd2/xsw= github.com/microsoft/moc-sdk-for-go v0.10.9-alpha.4/go.mod h1:HKzn7EmksZV89k67g9T5zpbINooUmoIm1P7c2M1chUo= +github.com/microsoft/moc-sdk-for-go v0.10.14 h1:YxDtveOCPFatI4XK/AzNhAAZQewPB08gpWnZMKOog9g= +github.com/microsoft/moc-sdk-for-go v0.10.14/go.mod h1:jXTC0QHinPYIQ0rjSRMj/I/7JqV2K3l2DhdEAivuwbE= github.com/miekg/dns v1.1.25/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -471,12 +477,14 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.14.0 h1:ep6kpPVwmr/nTbklSx2nrLNSIO62DoYAhnPNIMhK8gI= github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -564,6 +572,7 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1 h1:Kq1fyeebqsBfbjZj4EL7gj2IO0mMaiyjYUWcUsl2O44= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= @@ -729,6 +738,8 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 h1:DzZ89McO9/gWPsQXS/FVKAlG02ZjaQ6AlZRBimEYOd0= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d h1:LO7XpTYMwTqxjLcGWPijK3vRXg1aWdlNOVOHRq45d7c= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -823,6 +834,8 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e h1:WUoyKPm6nCo1BnNUvPGnFG3T5DUVem42yDJZZ4CNxMA= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= @@ -836,6 +849,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=