From 5935c884a2bd56309db5acd479bbb0cb47ac77e5 Mon Sep 17 00:00:00 2001 From: Heba Elayoty Date: Tue, 11 Jun 2024 19:04:52 -0700 Subject: [PATCH] Add awesome sdk Signed-off-by: Heba Elayoty --- go.mod | 2 +- pkg/auth/awesome/awesomeAgentPoolClient.go | 251 +------- pkg/auth/awesome/models.go | 587 ------------------- pkg/auth/awesome/options.go | 636 --------------------- pkg/auth/awesome/responses.go | 163 ------ pkg/auth/cred.go | 35 +- pkg/providers/instance/azure_client.go | 59 +- 7 files changed, 37 insertions(+), 1696 deletions(-) delete mode 100644 pkg/auth/awesome/models.go delete mode 100644 pkg/auth/awesome/options.go delete mode 100644 pkg/auth/awesome/responses.go diff --git a/go.mod b/go.mod index 9b178304..b3ad42da 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,6 @@ require ( github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 github.com/aws/karpenter-core v0.29.2 github.com/go-playground/validator/v10 v10.13.0 - github.com/google/uuid v1.6.0 github.com/onsi/ginkgo/v2 v2.11.0 github.com/onsi/gomega v1.27.10 github.com/patrickmn/go-cache v2.1.0+incompatible @@ -80,6 +79,7 @@ require ( github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/imdario/mergo v0.3.16 // indirect diff --git a/pkg/auth/awesome/awesomeAgentPoolClient.go b/pkg/auth/awesome/awesomeAgentPoolClient.go index 67b94a10..55d36c7b 100644 --- a/pkg/auth/awesome/awesomeAgentPoolClient.go +++ b/pkg/auth/awesome/awesomeAgentPoolClient.go @@ -12,6 +12,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4" + "k8s.io/klog/v2" "net/http" "net/url" @@ -132,61 +133,6 @@ func (client *AgentPoolsClient) abortLatestOperationCreateRequest(ctx context.Co return req, nil } -// CaptureSecurityVHDSnapshot - [Internal Only] Capture Security VHD Snapshot of an agent pool in the specified managed cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-03-02-preview -func (client *AgentPoolsClient) captureSecurityVHDSnapshot(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *AgentPoolsClientBeginCaptureSecurityVHDSnapshotOptions) (*http.Response, error) { - var err error - const operationName = "AgentPoolsClient.BeginCaptureSecurityVHDSnapshot" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.captureSecurityVHDSnapshotCreateRequest(ctx, resourceGroupName, resourceName, agentPoolName, options) - if err != nil { - return nil, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// captureSecurityVHDSnapshotCreateRequest creates the CaptureSecurityVHDSnapshot request. -func (client *AgentPoolsClient) captureSecurityVHDSnapshotCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *AgentPoolsClientBeginCaptureSecurityVHDSnapshotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/captureSecurityVHDSnapshot" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if agentPoolName == "" { - return nil, errors.New("parameter agentPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{agentPoolName}", url.PathEscape(agentPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - // BeginCreateOrUpdate - Creates or updates an agent pool in the specified managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // @@ -353,64 +299,6 @@ func (client *AgentPoolsClient) deleteCreateRequest(ctx context.Context, resourc return req, nil } -// DeleteMachines - Deletes specific machines in an agent pool. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-03-02-preview -func (client *AgentPoolsClient) deleteMachines(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, machines AgentPoolDeleteMachinesParameter, options *AgentPoolsClientBeginDeleteMachinesOptions) (*http.Response, error) { - var err error - const operationName = "AgentPoolsClient.BeginDeleteMachines" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.deleteMachinesCreateRequest(ctx, resourceGroupName, resourceName, agentPoolName, machines, options) - if err != nil { - return nil, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// deleteMachinesCreateRequest creates the DeleteMachines request. -func (client *AgentPoolsClient) deleteMachinesCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, machines AgentPoolDeleteMachinesParameter, options *AgentPoolsClientBeginDeleteMachinesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if agentPoolName == "" { - return nil, errors.New("parameter agentPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{agentPoolName}", url.PathEscape(agentPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, machines); err != nil { - return nil, err - } - return req, nil -} - // Get - Gets the specified managed cluster agent pool. // If the operation fails it returns an *azcore.ResponseError type. // @@ -480,142 +368,6 @@ func (client *AgentPoolsClient) getHandleResponse(resp *http.Response) (armconta return result, nil } -// GetAvailableAgentPoolVersions - See supported Kubernetes versions [https://docs.microsoft.com/azure/aks/supported-kubernetes-versions] -// for more details about the version lifecycle. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-03-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - options - AgentPoolsClientGetAvailableAgentPoolVersionsOptions contains the optional parameters for the AgentPoolsClient.GetAvailableAgentPoolVersions -// method. -func (client *AgentPoolsClient) GetAvailableAgentPoolVersions(ctx context.Context, resourceGroupName string, resourceName string, options *AgentPoolsClientGetAvailableAgentPoolVersionsOptions) (AgentPoolsClientGetAvailableAgentPoolVersionsResponse, error) { - var err error - const operationName = "AgentPoolsClient.GetAvailableAgentPoolVersions" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.getAvailableAgentPoolVersionsCreateRequest(ctx, resourceGroupName, resourceName, options) - if err != nil { - return AgentPoolsClientGetAvailableAgentPoolVersionsResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AgentPoolsClientGetAvailableAgentPoolVersionsResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return AgentPoolsClientGetAvailableAgentPoolVersionsResponse{}, err - } - resp, err := client.getAvailableAgentPoolVersionsHandleResponse(httpResp) - return resp, err -} - -// getAvailableAgentPoolVersionsCreateRequest creates the GetAvailableAgentPoolVersions request. -func (client *AgentPoolsClient) getAvailableAgentPoolVersionsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *AgentPoolsClientGetAvailableAgentPoolVersionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAvailableAgentPoolVersionsHandleResponse handles the GetAvailableAgentPoolVersions response. -func (client *AgentPoolsClient) getAvailableAgentPoolVersionsHandleResponse(resp *http.Response) (AgentPoolsClientGetAvailableAgentPoolVersionsResponse, error) { - result := AgentPoolsClientGetAvailableAgentPoolVersionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AgentPoolAvailableVersions); err != nil { - return AgentPoolsClientGetAvailableAgentPoolVersionsResponse{}, err - } - return result, nil -} - -// GetUpgradeProfile - Gets the upgrade profile for an agent pool. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2024-03-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - agentPoolName - The name of the agent pool. -// - options - AgentPoolsClientGetUpgradeProfileOptions contains the optional parameters for the AgentPoolsClient.GetUpgradeProfile -// method. -func (client *AgentPoolsClient) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *AgentPoolsClientGetUpgradeProfileOptions) (AgentPoolsClientGetUpgradeProfileResponse, error) { - var err error - const operationName = "AgentPoolsClient.GetUpgradeProfile" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.getUpgradeProfileCreateRequest(ctx, resourceGroupName, resourceName, agentPoolName, options) - if err != nil { - return AgentPoolsClientGetUpgradeProfileResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AgentPoolsClientGetUpgradeProfileResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return AgentPoolsClientGetUpgradeProfileResponse{}, err - } - resp, err := client.getUpgradeProfileHandleResponse(httpResp) - return resp, err -} - -// getUpgradeProfileCreateRequest creates the GetUpgradeProfile request. -func (client *AgentPoolsClient) getUpgradeProfileCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *AgentPoolsClientGetUpgradeProfileOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if agentPoolName == "" { - return nil, errors.New("parameter agentPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{agentPoolName}", url.PathEscape(agentPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getUpgradeProfileHandleResponse handles the GetUpgradeProfile response. -func (client *AgentPoolsClient) getUpgradeProfileHandleResponse(resp *http.Response) (AgentPoolsClientGetUpgradeProfileResponse, error) { - result := AgentPoolsClientGetUpgradeProfileResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AgentPoolUpgradeProfile); err != nil { - return AgentPoolsClientGetUpgradeProfileResponse{}, err - } - return result, nil -} - // NewListPager - Gets a list of agent pools in the specified managed cluster. // // Generated from API version 2024-03-02-preview @@ -623,6 +375,7 @@ func (client *AgentPoolsClient) getUpgradeProfileHandleResponse(resp *http.Respo // - resourceName - The name of the managed cluster resource. // - options - AgentPoolsClientListOptions contains the optional parameters for the AgentPoolsClient.NewListPager method. func (client *AgentPoolsClient) NewListPager(resourceGroupName string, resourceName string, options *armcontainerservice.AgentPoolsClientListOptions) *runtime.Pager[armcontainerservice.AgentPoolsClientListResponse] { + klog.Info("Awesome NewListPager") return runtime.NewPager(runtime.PagingHandler[armcontainerservice.AgentPoolsClientListResponse]{ More: func(page armcontainerservice.AgentPoolsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 diff --git a/pkg/auth/awesome/models.go b/pkg/auth/awesome/models.go deleted file mode 100644 index 62b88072..00000000 --- a/pkg/auth/awesome/models.go +++ /dev/null @@ -1,587 +0,0 @@ -package awesome - -// RotateCertProfile - [Internal Only] The rotate cert profile -type RotateCertProfile struct { - // The rotate cert mode. - RotateCertMode *RotateCertMode -} - -// RotateCertMode - The rotate cert mode. -type RotateCertMode string - -// GPUInstanceProfile - GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. -type GPUInstanceProfile string - -// KubeletDiskType - Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. -type KubeletDiskType string - -// AgentPoolMode - A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent -// pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools -type AgentPoolMode string - -// OSDiskType - The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. -// Otherwise, defaults to 'Managed'. May not be changed after creation. For more information -// see Ephemeral OS [https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os]. -type OSDiskType string - -// OSSKU - Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 -// if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 -// after Windows2019 is deprecated. -type OSSKU string - -// OSType - The operating system type. The default is Linux. -type OSType string - -// PodIPAllocationMode - The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is -// 'DynamicIndividual'. -type PodIPAllocationMode string - -// ManagedClusterAgentPoolProfileProperties - Properties for the container service agent pool profile. -type ManagedClusterAgentPoolProfileProperties struct { - // The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. - AvailabilityZones []*string - - // Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user - // pools and in the range of 1 to 1000 (inclusive) for system pools. The default - // value is 1. - Count *int32 - - // CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. - CreationData *CreationData - - // Whether to enable auto-scaler - EnableAutoScaling *bool - - // When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset along with - // host services to sync custom certificate authorities from user-provided list of - // base64 encoded certificates into node trust stores. Defaults to false. - EnableCustomCATrust *bool - - // This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption - EnableEncryptionAtHost *bool - - // See Add a FIPS-enabled node pool [https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview] - // for more details. - EnableFIPS *bool - - // Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is - // for gaming workloads, where a console needs to make a direct connection to a - // cloud virtual machine to minimize hops. For more information see assigning a public IP per node - // [https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools]. The default - // is false. - EnableNodePublicIP *bool - - // Whether to enable UltraSSD - EnableUltraSSD *bool - - // GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. - GpuInstanceProfile *GPUInstanceProfile - - // This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. - // For more information see Azure dedicated hosts - // [https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts]. - HostGroupID *string - - // The Kubelet configuration on the agent pool nodes. - KubeletConfig *KubeletConfig - - // Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. - KubeletDiskType *KubeletDiskType - - // The OS configuration of Linux agent nodes. - LinuxOSConfig *LinuxOSConfig - - // The maximum number of nodes for auto-scaling - MaxCount *int32 - - // The maximum number of pods that can run on a node. - MaxPods *int32 - - // The minimum number of nodes for auto-scaling - MinCount *int32 - - // A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions - // and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools - Mode *AgentPoolMode - - // Network-related settings of an agent pool. - NetworkProfile *AgentPoolNetworkProfile - - // The node labels to be persisted across all nodes in agent pool. - NodeLabels map[string]*string - - // This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} - NodePublicIPPrefixID *string - - // The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. - NodeTaints []*string - - // OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it - // will apply the default osDisk size according to the vmSize specified. - OSDiskSizeGB *int32 - - // The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, - // defaults to 'Managed'. May not be changed after creation. For more information - // see Ephemeral OS [https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os]. - OSDiskType *OSDiskType - - // Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if - // OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 - // after Windows2019 is deprecated. - OSSKU *OSSKU - - // The operating system type. The default is Linux. - OSType *OSType - - // Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating - // the agent pool with the same once it has been created will not trigger an - // upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster - // to the same Kubernetes version. The node pool version must have the same - // major version as the control plane. The node pool minor version must be within two minor versions of the control plane - // version. The node pool version cannot be greater than the control plane version. - // For more information see upgrading a node pool [https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool]. - OrchestratorVersion *string - - // If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} - PodSubnetID *string - - // When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. - // A stopped Agent Pool stops all of its VMs and does not accrue billing - // charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded - PowerState *PowerState - - // The ID for Proximity Placement Group. - ProximityPlacementGroupID *string - - // This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. - ScaleDownMode *ScaleDownMode - - // This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. - ScaleSetEvictionPolicy *ScaleSetEvictionPolicy - - // The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. - ScaleSetPriority *ScaleSetPriority - - // Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. - // For more details on spot pricing, see spot VMs pricing - // [https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing] - SpotMaxPrice *float32 - - // The tags to be persisted on the agent pool virtual machine scale set. - Tags map[string]*string - - // The type of Agent Pool. - Type *AgentPoolType - - // Settings for upgrading the agentpool - UpgradeSettings *AgentPoolUpgradeSettings - - // VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might - // fail to run correctly. For more details on restricted VM sizes, see: - // https://docs.microsoft.com/azure/aks/quotas-skus-regions - VMSize *string - - // If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to - // nodes and pods, otherwise it applies to just nodes. This is of the form: - // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} - VnetSubnetID *string - - // The Windows agent pool's specific profile. - WindowsProfile *AgentPoolWindowsProfile - - // Determines the type of workload a node can run. - WorkloadRuntime *WorkloadRuntime - - // READ-ONLY; If orchestratorVersion was a fully specified version , this field will be exactly equal to it. If orchestratorVersion - // was , this field will contain the full version being used. - CurrentOrchestratorVersion *string - - // READ-ONLY; Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource - // is updated. Specify an if-match or if-none-match header with the eTag value for a - // subsequent request to enable optimistic concurrency per the normal etag convention. - ETag *string - - // READ-ONLY; The version of node image - NodeImageVersion *string - - // READ-ONLY; The current deployment or provisioning state. - ProvisioningState *string -} - -// ScaleProfile - Specifications on how to scale a VirtualMachines agent pool. -type ScaleProfile struct { - // Specifications on how to auto-scale the VirtualMachines agent pool within a predefined size range. Currently, at most one - // AutoScaleProfile is allowed. - Autoscale []*AutoScaleProfile - - // Specifications on how to scale the VirtualMachines agent pool to a fixed size. Currently, at most one ManualScaleProfile - // is allowed. - Manual []*ManualScaleProfile -} - -// ManualScaleProfile - Specifications on number of machines. -type ManualScaleProfile struct { - // Number of nodes. - Count *int32 - - // The list of allowed vm sizes e.g. ['StandardE4sv3', 'StandardE16sv3', 'StandardD16sv5']. AKS will use the first available - // one when scaling. If a VM size is unavailable (e.g. due to quota or regional - // capacity reasons), AKS will use the next size. - Sizes []*string -} - -// AgentPoolType - The type of Agent Pool. -type AgentPoolType string - -// AutoScaleProfile - Specifications on auto-scaling. -type AutoScaleProfile struct { - // The maximum number of nodes of the specified sizes. - MaxCount *int32 - - // The minimum number of nodes of the specified sizes. - MinCount *int32 - - // The list of allowed vm sizes e.g. ['StandardE4sv3', 'StandardE16sv3', 'StandardD16sv5']. AKS will use the first available - // one when auto scaling. If a VM size is unavailable (e.g. due to quota or - // regional capacity reasons), AKS will use the next size. - Sizes []*string -} - -// VirtualMachinesProfile - Specifications on VirtualMachines agent pool. -type VirtualMachinesProfile struct { - // Specifications on how to scale a VirtualMachines agent pool. - Scale *ScaleProfile -} - -// WorkloadRuntime - Determines the type of workload a node can run. -type WorkloadRuntime string - -type AgentPoolArtifactStreamingProfile struct { - // Artifact streaming speeds up the cold-start of containers on a node through on-demand image loading. To use this feature, - // container images must also enable artifact streaming on ACR. If not specified, - // the default is false. - Enabled *bool -} - -// VirtualMachineNodes - Current status on a group of nodes of the same vm size. -type VirtualMachineNodes struct { - // Number of nodes. - Count *int32 - - // The VM size of the agents used to host this group of nodes. - Size *string -} - -// CreationData - Data used when creating a target resource from a source resource. -type CreationData struct { - // This is the ARM ID of the source object to be used to create the target object. - SourceResourceID *string -} - -// KubeletConfig - See AKS custom node configuration [https://docs.microsoft.com/azure/aks/custom-node-configuration] for -// more details. -type KubeletConfig struct { - // Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in *). - AllowedUnsafeSysctls []*string - - // The default is true. - CPUCfsQuota *bool - - // The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For - // example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and - // 'h'. - CPUCfsQuotaPeriod *string - - // The default is 'none'. See Kubernetes CPU management policies [https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies] - // for more information. Allowed - // values are 'none' and 'static'. - CPUManagerPolicy *string - - // The maximum number of container log files that can be present for a container. The number must be ≥ 2. - ContainerLogMaxFiles *int32 - - // The maximum size (e.g. 10Mi) of container log file before it is rotated. - ContainerLogMaxSizeMB *int32 - - // If set to true it will make the Kubelet fail to start if swap is enabled on the node. - FailSwapOn *bool - - // To disable image garbage collection, set to 100. The default is 85% - ImageGcHighThreshold *int32 - - // This cannot be set higher than imageGcHighThreshold. The default is 80% - ImageGcLowThreshold *int32 - - // The maximum number of processes per pod. - PodMaxPids *int32 - - // For more information see Kubernetes Topology Manager [https://kubernetes.io/docs/tasks/administer-cluster/topology-manager]. - // The default is 'none'. Allowed values are 'none', 'best-effort', - // 'restricted', and 'single-numa-node'. - TopologyManagerPolicy *string -} - -// LinuxOSConfig - See AKS custom node configuration [https://docs.microsoft.com/azure/aks/custom-node-configuration] for -// more details. -type LinuxOSConfig struct { - // The size in MB of a swap file that will be created on each node. - SwapFileSizeMB *int32 - - // Sysctl settings for Linux agent nodes. - Sysctls *SysctlConfig - - // Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information - // see Transparent Hugepages - // [https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge]. - TransparentHugePageDefrag *string - - // Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see Transparent Hugepages - // [https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge]. - TransparentHugePageEnabled *string - - // Ulimit settings for Linux agent nodes. - Ulimits *UlimitConfig -} - -// UlimitConfig - Ulimit settings for Linux agent nodes -type UlimitConfig struct { - // Maximum locked-in-memory address space (KB) - MaxLockedMemory *string - - // Maximum number of open files - NoFile *string -} - -// SysctlConfig - Sysctl settings for Linux agent nodes. -type SysctlConfig struct { - // Sysctl setting fs.aio-max-nr. - FsAioMaxNr *int32 - - // Sysctl setting fs.file-max. - FsFileMax *int32 - - // Sysctl setting fs.inotify.maxuserwatches. - FsInotifyMaxUserWatches *int32 - - // Sysctl setting fs.nr_open. - FsNrOpen *int32 - - // Sysctl setting kernel.threads-max. - KernelThreadsMax *int32 - - // Sysctl setting net.core.netdevmaxbacklog. - NetCoreNetdevMaxBacklog *int32 - - // Sysctl setting net.core.optmem_max. - NetCoreOptmemMax *int32 - - // Sysctl setting net.core.rmem_default. - NetCoreRmemDefault *int32 - - // Sysctl setting net.core.rmem_max. - NetCoreRmemMax *int32 - - // Sysctl setting net.core.somaxconn. - NetCoreSomaxconn *int32 - - // Sysctl setting net.core.wmem_default. - NetCoreWmemDefault *int32 - - // Sysctl setting net.core.wmem_max. - NetCoreWmemMax *int32 - - // Sysctl setting net.ipv4.iplocalport_range. - NetIPv4IPLocalPortRange *string - - // Sysctl setting net.ipv4.neigh.default.gc_thresh1. - NetIPv4NeighDefaultGcThresh1 *int32 - - // Sysctl setting net.ipv4.neigh.default.gc_thresh2. - NetIPv4NeighDefaultGcThresh2 *int32 - - // Sysctl setting net.ipv4.neigh.default.gc_thresh3. - NetIPv4NeighDefaultGcThresh3 *int32 - - // Sysctl setting net.ipv4.tcpfintimeout. - NetIPv4TCPFinTimeout *int32 - - // Sysctl setting net.ipv4.tcpkeepaliveprobes. - NetIPv4TCPKeepaliveProbes *int32 - - // Sysctl setting net.ipv4.tcpkeepalivetime. - NetIPv4TCPKeepaliveTime *int32 - - // Sysctl setting net.ipv4.tcpmaxsyn_backlog. - NetIPv4TCPMaxSynBacklog *int32 - - // Sysctl setting net.ipv4.tcpmaxtw_buckets. - NetIPv4TCPMaxTwBuckets *int32 - - // Sysctl setting net.ipv4.tcptwreuse. - NetIPv4TCPTwReuse *bool - - // Sysctl setting net.ipv4.tcpkeepaliveintvl. - NetIPv4TcpkeepaliveIntvl *int32 - - // Sysctl setting net.netfilter.nfconntrackbuckets. - NetNetfilterNfConntrackBuckets *int32 - - // Sysctl setting net.netfilter.nfconntrackmax. - NetNetfilterNfConntrackMax *int32 - - // Sysctl setting vm.maxmapcount. - VMMaxMapCount *int32 - - // Sysctl setting vm.swappiness. - VMSwappiness *int32 - - // Sysctl setting vm.vfscachepressure. - VMVfsCachePressure *int32 -} - -// PowerState - Describes the Power State of the cluster -type PowerState struct { - // Tells whether the cluster is Running or Stopped - Code *Code -} - -// Code - Tells whether the cluster is Running or Stopped -type Code string - -// ScaleDownMode - Describes how VMs are added to or removed from Agent Pools. See billing states [https://docs.microsoft.com/azure/virtual-machines/states-billing]. -type ScaleDownMode string - -// ScaleSetEvictionPolicy - The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. -// For more information about eviction see spot VMs -// [https://docs.microsoft.com/azure/virtual-machines/spot-vms] -type ScaleSetEvictionPolicy string - -// ScaleSetPriority - The Virtual Machine Scale Set priority. -type ScaleSetPriority string - -// IPTag - Contains the IPTag associated with the object. -type IPTag struct { - // The IP tag type. Example: RoutingPreference. - IPTagType *string - - // The value of the IP tag associated with the public IP. Example: Internet. - Tag *string -} - -// AgentPoolSSHAccess - SSH access method of an agent pool. -type AgentPoolSSHAccess string - -// PortRange - The port range. -type PortRange struct { - // The maximum port that is included in the range. It should be ranged from 1 to 65535, and be greater than or equal to portStart. - PortEnd *int32 - - // The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or equal to portEnd. - PortStart *int32 - - // The network protocol of the port. - Protocol *Protocol -} - -// AgentPoolUpgradeProfile - The list of available upgrades for an agent pool. -type AgentPoolUpgradeProfile struct { - // REQUIRED; The properties of the agent pool upgrade profile. - Properties *AgentPoolUpgradeProfileProperties - - // READ-ONLY; The ID of the agent pool upgrade profile. - ID *string - - // READ-ONLY; The name of the agent pool upgrade profile. - Name *string - - // READ-ONLY; The type of the agent pool upgrade profile. - Type *string -} - -// AgentPoolUpgradeProfileProperties - The list of available upgrade versions. -type AgentPoolUpgradeProfileProperties struct { - // REQUIRED; The Kubernetes version (major.minor.patch). - KubernetesVersion *string - - // REQUIRED; The operating system type. The default is Linux. - OSType *OSType - - // components of given Kubernetes version. - ComponentsByReleases *ComponentsByReleases - - // The latest AKS supported node image version. - LatestNodeImageVersion *string - - // List of orchestrator types and versions available for upgrade. - Upgrades []*AgentPoolUpgradeProfilePropertiesUpgradesItem -} - -type AgentPoolUpgradeProfilePropertiesUpgradesItem struct { - // Whether the Kubernetes version is currently in preview. - IsPreview *bool - - // The Kubernetes version (major.minor.patch). - KubernetesVersion *string -} - -// AgentPoolUpgradeSettings - Settings for upgrading an agentpool -type AgentPoolUpgradeSettings struct { - // The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time - // honors waiting on pod disruption budgets. If this time is exceeded, the upgrade - // fails. If not specified, the default is 30 minutes. - DrainTimeoutInMinutes *int32 - - // This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage - // of the total agent pool size at the time of the upgrade. For - // percentages, fractional nodes are rounded up. If not specified, the default is 1. For more information, including best - // practices, see: - // https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade - MaxSurge *string - - // The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node. If not - // specified, the default is 0 minutes. - NodeSoakDurationInMinutes *int32 - - // Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption - // Budgets (PDBs), but other issues, such as pod termination grace period is - // exceeding the remaining per-node drain timeout or pod is still being in a running state, can also cause undrainable nodes. - UndrainableNodeBehavior *UndrainableNodeBehavior -} - -// AgentPoolWindowsProfile - The Windows agent pool's specific profile. -type AgentPoolWindowsProfile struct { - // The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows - // agent pool does not have node public IP enabled. - DisableOutboundNat *bool -} - -type Component struct { - // If upgraded component version contains breaking changes from the current version. To see a detailed description of what - // the breaking changes are, visit - // https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version. - HasBreakingChanges *bool - - // Component name. - Name *string - - // Component version. - Version *string -} - -// ComponentsByReleases - components of given Kubernetes version. -type ComponentsByReleases struct { - // components of current or upgraded Kubernetes version in the cluster. - Components []*Component - - // The Kubernetes version (major.minor). - KubernetesVersion *string -} - -// UndrainableNodeBehavior - Defines the behavior for undrainable nodes during upgrade. The most common cause of undrainable -// nodes is Pod Disruption Budgets (PDBs), but other issues, such as pod termination grace period is -// exceeding the remaining per-node drain timeout or pod is still being in a running state, can also cause undrainable nodes. -type UndrainableNodeBehavior string - -// Protocol - The network protocol of the port. -type Protocol string diff --git a/pkg/auth/awesome/options.go b/pkg/auth/awesome/options.go deleted file mode 100644 index c5dfedec..00000000 --- a/pkg/auth/awesome/options.go +++ /dev/null @@ -1,636 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -package awesome - -// AgentPoolNodeOSUpgradeSettings - [Internal Only] The agent pool node os upgrade settings -type AgentPoolNodeOSUpgradeSettings struct { - // READ-ONLY; The security vhd target. - SecurityVhdTarget *SecurityVhdTarget -} - -// SecurityVhdTarget - The security vhd target. -type SecurityVhdTarget string - -// AdminAgentPoolsClientBeginLiveUpgradeSecurityPackagesOptions contains the optional parameters for the AdminAgentPoolsClient.BeginLiveUpgradeSecurityPackages -// method. -type AdminAgentPoolsClientBeginLiveUpgradeSecurityPackagesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AdminManagedClustersClientDeleteNodeResourceGroupDenyAssignmentsOptions contains the optional parameters for the AdminManagedClustersClient.DeleteNodeResourceGroupDenyAssignments -// method. -type AdminManagedClustersClientDeleteNodeResourceGroupDenyAssignmentsOptions struct { - // Whether to delete deny assignment on the node resource group forcefully. - ForceDelete *bool - - // The name of the node resource group. - NodeResourceGroupName *string -} - -// AdminManagedClustersClientListCustomerControlPlaneEventsOptions contains the optional parameters for the AdminManagedClustersClient.ListCustomerControlPlaneEvents -// method. -type AdminManagedClustersClientListCustomerControlPlaneEventsOptions struct { - // placeholder for future optional parameters -} - -// AdminManagedClustersClientListCustomerControlPlanePodsOptions contains the optional parameters for the AdminManagedClustersClient.ListCustomerControlPlanePods -// method. -type AdminManagedClustersClientListCustomerControlPlanePodsOptions struct { - // placeholder for future optional parameters -} - -// AdminManagedClustersClientListOptions contains the optional parameters for the AdminManagedClustersClient.NewListPager -// method. -type AdminManagedClustersClientListOptions struct { - // placeholder for future optional parameters -} - -// AdminManagedClustersClientMigrateCustomerControlPlaneOptions contains the optional parameters for the AdminManagedClustersClient.MigrateCustomerControlPlane -// method. -type AdminManagedClustersClientMigrateCustomerControlPlaneOptions struct { - // placeholder for future optional parameters -} - -// AdminManagedClustersClientUpdateTLSBootstrapTokenOptions contains the optional parameters for the AdminManagedClustersClient.UpdateTLSBootstrapToken -// method. -type AdminManagedClustersClientUpdateTLSBootstrapTokenOptions struct { - // placeholder for future optional parameters -} - -// AdminUnderlayClientCreateOrUpdateOptions contains the optional parameters for the AdminUnderlayClient.CreateOrUpdate method. -type AdminUnderlayClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// AdminUnderlayClientDrainControlPlanesOptions contains the optional parameters for the AdminUnderlayClient.DrainControlPlanes -// method. -type AdminUnderlayClientDrainControlPlanesOptions struct { - // placeholder for future optional parameters -} - -// AdminUnderlayClientQuarantineUnderlayOptions contains the optional parameters for the AdminUnderlayClient.QuarantineUnderlay -// method. -type AdminUnderlayClientQuarantineUnderlayOptions struct { - // placeholder for future optional parameters -} - -// AdminUnderlayClientUnquarantineUnderlayOptions contains the optional parameters for the AdminUnderlayClient.UnquarantineUnderlay -// method. -type AdminUnderlayClientUnquarantineUnderlayOptions struct { - // placeholder for future optional parameters -} - -// AgentPoolsClientBeginAbortLatestOperationOptions contains the optional parameters for the AgentPoolsClient.BeginAbortLatestOperation -// method. -type AgentPoolsClientBeginAbortLatestOperationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AgentPoolsClientBeginCaptureSecurityVHDSnapshotOptions contains the optional parameters for the AgentPoolsClient.BeginCaptureSecurityVHDSnapshot -// method. -type AgentPoolsClientBeginCaptureSecurityVHDSnapshotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AgentPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the AgentPoolsClient.BeginCreateOrUpdate -// method. -type AgentPoolsClientBeginCreateOrUpdateOptions struct { - // The request should only proceed if an entity matches this string. - IfMatch *string - - // The request should only proceed if no entity matches this string. - IfNoneMatch *string - - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AgentPoolsClientBeginDeleteMachinesOptions contains the optional parameters for the AgentPoolsClient.BeginDeleteMachines -// method. -type AgentPoolsClientBeginDeleteMachinesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AgentPoolsClientBeginDeleteOptions contains the optional parameters for the AgentPoolsClient.BeginDelete method. -type AgentPoolsClientBeginDeleteOptions struct { - // The request should only proceed if an entity matches this string. - IfMatch *string - - // ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget - IgnorePodDisruptionBudget *bool - - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AgentPoolsClientBeginUpgradeNodeImageVersionOptions contains the optional parameters for the AgentPoolsClient.BeginUpgradeNodeImageVersion -// method. -type AgentPoolsClientBeginUpgradeNodeImageVersionOptions struct { - // [Internal Only] The agent pool node os upgrade settings. - Parameters *AgentPoolNodeOSUpgradeSettings - - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AgentPoolsClientGetAvailableAgentPoolVersionsOptions contains the optional parameters for the AgentPoolsClient.GetAvailableAgentPoolVersions -// method. -type AgentPoolsClientGetAvailableAgentPoolVersionsOptions struct { - // placeholder for future optional parameters -} - -// AgentPoolsClientGetOptions contains the optional parameters for the AgentPoolsClient.Get method. -type AgentPoolsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AgentPoolsClientGetUpgradeProfileOptions contains the optional parameters for the AgentPoolsClient.GetUpgradeProfile method. -type AgentPoolsClientGetUpgradeProfileOptions struct { - // placeholder for future optional parameters -} - -// AgentPoolsClientListOptions contains the optional parameters for the AgentPoolsClient.NewListPager method. -type AgentPoolsClientListOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancersClientBeginDeleteOptions contains the optional parameters for the LoadBalancersClient.BeginDelete method. -type LoadBalancersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LoadBalancersClientCreateOrUpdateOptions contains the optional parameters for the LoadBalancersClient.CreateOrUpdate method. -type LoadBalancersClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancersClientGetOptions contains the optional parameters for the LoadBalancersClient.Get method. -type LoadBalancersClientGetOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancersClientListByManagedClusterOptions contains the optional parameters for the LoadBalancersClient.NewListByManagedClusterPager -// method. -type LoadBalancersClientListByManagedClusterOptions struct { - // placeholder for future optional parameters -} - -// MachinesClientGetOptions contains the optional parameters for the MachinesClient.Get method. -type MachinesClientGetOptions struct { - // placeholder for future optional parameters -} - -// MachinesClientListOptions contains the optional parameters for the MachinesClient.NewListPager method. -type MachinesClientListOptions struct { - // placeholder for future optional parameters -} - -// MaintenanceConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the MaintenanceConfigurationsClient.CreateOrUpdate -// method. -type MaintenanceConfigurationsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// MaintenanceConfigurationsClientDeleteOptions contains the optional parameters for the MaintenanceConfigurationsClient.Delete -// method. -type MaintenanceConfigurationsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// MaintenanceConfigurationsClientGetOptions contains the optional parameters for the MaintenanceConfigurationsClient.Get -// method. -type MaintenanceConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// MaintenanceConfigurationsClientListByManagedClusterOptions contains the optional parameters for the MaintenanceConfigurationsClient.NewListByManagedClusterPager -// method. -type MaintenanceConfigurationsClientListByManagedClusterOptions struct { - // placeholder for future optional parameters -} - -// ManagedClusterSnapshotsClientCreateOrUpdateOptions contains the optional parameters for the ManagedClusterSnapshotsClient.CreateOrUpdate -// method. -type ManagedClusterSnapshotsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ManagedClusterSnapshotsClientDeleteOptions contains the optional parameters for the ManagedClusterSnapshotsClient.Delete -// method. -type ManagedClusterSnapshotsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ManagedClusterSnapshotsClientGetOptions contains the optional parameters for the ManagedClusterSnapshotsClient.Get method. -type ManagedClusterSnapshotsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ManagedClusterSnapshotsClientListByResourceGroupOptions contains the optional parameters for the ManagedClusterSnapshotsClient.NewListByResourceGroupPager -// method. -type ManagedClusterSnapshotsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ManagedClusterSnapshotsClientListOptions contains the optional parameters for the ManagedClusterSnapshotsClient.NewListPager -// method. -type ManagedClusterSnapshotsClientListOptions struct { - // placeholder for future optional parameters -} - -// ManagedClusterSnapshotsClientUpdateTagsOptions contains the optional parameters for the ManagedClusterSnapshotsClient.UpdateTags -// method. -type ManagedClusterSnapshotsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientBeginAbortLatestOperationOptions contains the optional parameters for the ManagedClustersClient.BeginAbortLatestOperation -// method. -type ManagedClustersClientBeginAbortLatestOperationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedClustersClient.BeginCreateOrUpdate -// method. -type ManagedClustersClientBeginCreateOrUpdateOptions struct { - // The request should only proceed if an entity matches this string. - IfMatch *string - - // The request should only proceed if no entity matches this string. - IfNoneMatch *string - - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedClustersClientBeginDeleteOptions contains the optional parameters for the ManagedClustersClient.BeginDelete method. -type ManagedClustersClientBeginDeleteOptions struct { - // The request should only proceed if an entity matches this string. - IfMatch *string - - // ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget - IgnorePodDisruptionBudget *bool - - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedClustersClientBeginRebalanceLoadBalancersOptions contains the optional parameters for the ManagedClustersClient.BeginRebalanceLoadBalancers -// method. -type ManagedClustersClientBeginRebalanceLoadBalancersOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedClustersClientBeginResetAADProfileOptions contains the optional parameters for the ManagedClustersClient.BeginResetAADProfile -// method. -type ManagedClustersClientBeginResetAADProfileOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedClustersClientBeginResetNodeIdentityProfileOptions contains the optional parameters for the ManagedClustersClient.BeginResetNodeIdentityProfile -// method. -type ManagedClustersClientBeginResetNodeIdentityProfileOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedClustersClientBeginResetServicePrincipalProfileOptions contains the optional parameters for the ManagedClustersClient.BeginResetServicePrincipalProfile -// method. -type ManagedClustersClientBeginResetServicePrincipalProfileOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedClustersClientBeginRotateClusterCertificatesOptions contains the optional parameters for the ManagedClustersClient.BeginRotateClusterCertificates -// method. -type ManagedClustersClientBeginRotateClusterCertificatesOptions struct { - // [Internal Only] The rotate cert profile. - Parameters *RotateCertProfile - - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedClustersClientBeginRotateServiceAccountSigningKeysOptions contains the optional parameters for the ManagedClustersClient.BeginRotateServiceAccountSigningKeys -// method. -type ManagedClustersClientBeginRotateServiceAccountSigningKeysOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string - - // expiration in seconds for rotated Service Account Signing Key - RotatedExpirationTime *string - - // expiration in seconds for rotating Service Account Signing Key - RotatingExpirationTime *string -} - -// ManagedClustersClientBeginRunCommandOptions contains the optional parameters for the ManagedClustersClient.BeginRunCommand -// method. -type ManagedClustersClientBeginRunCommandOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedClustersClientBeginStartOptions contains the optional parameters for the ManagedClustersClient.BeginStart method. -type ManagedClustersClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedClustersClientBeginStopOptions contains the optional parameters for the ManagedClustersClient.BeginStop method. -type ManagedClustersClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedClustersClientBeginUnpinOptions contains the optional parameters for the ManagedClustersClient.BeginUnpin method. -type ManagedClustersClientBeginUnpinOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedClustersClientBeginUpdateTagsOptions contains the optional parameters for the ManagedClustersClient.BeginUpdateTags -// method. -type ManagedClustersClientBeginUpdateTagsOptions struct { - // The request should only proceed if an entity matches this string. - IfMatch *string - - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedClustersClientGetAccessProfileOptions contains the optional parameters for the ManagedClustersClient.GetAccessProfile -// method. -type ManagedClustersClientGetAccessProfileOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientGetCommandResultOptions contains the optional parameters for the ManagedClustersClient.GetCommandResult -// method. -type ManagedClustersClientGetCommandResultOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientGetGuardrailsVersionsOptions contains the optional parameters for the ManagedClustersClient.GetGuardrailsVersions -// method. -type ManagedClustersClientGetGuardrailsVersionsOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientGetMeshRevisionProfileOptions contains the optional parameters for the ManagedClustersClient.GetMeshRevisionProfile -// method. -type ManagedClustersClientGetMeshRevisionProfileOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientGetMeshUpgradeProfileOptions contains the optional parameters for the ManagedClustersClient.GetMeshUpgradeProfile -// method. -type ManagedClustersClientGetMeshUpgradeProfileOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientGetOSOptionsOptions contains the optional parameters for the ManagedClustersClient.GetOSOptions method. -type ManagedClustersClientGetOSOptionsOptions struct { - // The resource type for which the OS options needs to be returned - ResourceType *string -} - -// ManagedClustersClientGetOptions contains the optional parameters for the ManagedClustersClient.Get method. -type ManagedClustersClientGetOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientGetSafeguardsVersionsOptions contains the optional parameters for the ManagedClustersClient.GetSafeguardsVersions -// method. -type ManagedClustersClientGetSafeguardsVersionsOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientGetUpgradeProfileOptions contains the optional parameters for the ManagedClustersClient.GetUpgradeProfile -// method. -type ManagedClustersClientGetUpgradeProfileOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientListByResourceGroupOptions contains the optional parameters for the ManagedClustersClient.NewListByResourceGroupPager -// method. -type ManagedClustersClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientListClusterAdminCredentialsOptions contains the optional parameters for the ManagedClustersClient.ListClusterAdminCredentials -// method. -type ManagedClustersClientListClusterAdminCredentialsOptions struct { - // server fqdn type for credentials to be returned - ServerFqdn *string -} - -// ManagedClustersClientListClusterMonitoringUserCredentialsOptions contains the optional parameters for the ManagedClustersClient.ListClusterMonitoringUserCredentials -// method. -type ManagedClustersClientListClusterMonitoringUserCredentialsOptions struct { - // server fqdn type for credentials to be returned - ServerFqdn *string -} - -type Format string - -// ManagedClustersClientListClusterUserCredentialsOptions contains the optional parameters for the ManagedClustersClient.ListClusterUserCredentials -// method. -type ManagedClustersClientListClusterUserCredentialsOptions struct { - // Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return azure auth-provider - // kubeconfig; format 'exec' will return exec format kubeconfig, which requires - // kubelogin binary in the path. - Format *Format - - // server fqdn type for credentials to be returned - ServerFqdn *string -} - -// ManagedClustersClientListGuardrailsVersionsOptions contains the optional parameters for the ManagedClustersClient.NewListGuardrailsVersionsPager -// method. -type ManagedClustersClientListGuardrailsVersionsOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientListKubernetesVersionsOptions contains the optional parameters for the ManagedClustersClient.ListKubernetesVersions -// method. -type ManagedClustersClientListKubernetesVersionsOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientListMeshRevisionProfilesOptions contains the optional parameters for the ManagedClustersClient.NewListMeshRevisionProfilesPager -// method. -type ManagedClustersClientListMeshRevisionProfilesOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientListMeshUpgradeProfilesOptions contains the optional parameters for the ManagedClustersClient.NewListMeshUpgradeProfilesPager -// method. -type ManagedClustersClientListMeshUpgradeProfilesOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientListOptions contains the optional parameters for the ManagedClustersClient.NewListPager method. -type ManagedClustersClientListOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the ManagedClustersClient.NewListOutboundNetworkDependenciesEndpointsPager -// method. -type ManagedClustersClientListOutboundNetworkDependenciesEndpointsOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientListSafeguardsVersionsOptions contains the optional parameters for the ManagedClustersClient.NewListSafeguardsVersionsPager -// method. -type ManagedClustersClientListSafeguardsVersionsOptions struct { - // placeholder for future optional parameters -} - -// ManagedClustersClientPreflightOptions contains the optional parameters for the ManagedClustersClient.Preflight method. -type ManagedClustersClientPreflightOptions struct { - // placeholder for future optional parameters -} - -// NetworkSecurityPerimetersClientBeginCreateOrUpdateOptions contains the optional parameters for the NetworkSecurityPerimetersClient.BeginCreateOrUpdate -// method. -type NetworkSecurityPerimetersClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OperationStatusResultClientGetByAgentPoolOptions contains the optional parameters for the OperationStatusResultClient.GetByAgentPool -// method. -type OperationStatusResultClientGetByAgentPoolOptions struct { - // placeholder for future optional parameters -} - -// OperationStatusResultClientGetByIDOptions contains the optional parameters for the OperationStatusResultClient.GetByID -// method. -type OperationStatusResultClientGetByIDOptions struct { - // placeholder for future optional parameters -} - -// OperationStatusResultClientGetOptions contains the optional parameters for the OperationStatusResultClient.Get method. -type OperationStatusResultClientGetOptions struct { - // placeholder for future optional parameters -} - -// OperationStatusResultClientListOptions contains the optional parameters for the OperationStatusResultClient.NewListPager -// method. -type OperationStatusResultClientListOptions struct { - // placeholder for future optional parameters -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete -// method. -type PrivateEndpointConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. -type PrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List -// method. -type PrivateEndpointConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Update -// method. -type PrivateEndpointConnectionsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method. -type PrivateLinkResourcesClientListOptions struct { - // placeholder for future optional parameters -} - -// ResolvePrivateLinkServiceIDClientPOSTOptions contains the optional parameters for the ResolvePrivateLinkServiceIDClient.POST -// method. -type ResolvePrivateLinkServiceIDClientPOSTOptions struct { - // placeholder for future optional parameters -} - -// SnapshotsClientCreateOrUpdateOptions contains the optional parameters for the SnapshotsClient.CreateOrUpdate method. -type SnapshotsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SnapshotsClientDeleteOptions contains the optional parameters for the SnapshotsClient.Delete method. -type SnapshotsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SnapshotsClientGetOptions contains the optional parameters for the SnapshotsClient.Get method. -type SnapshotsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SnapshotsClientListByResourceGroupOptions contains the optional parameters for the SnapshotsClient.NewListByResourceGroupPager -// method. -type SnapshotsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// SnapshotsClientListOptions contains the optional parameters for the SnapshotsClient.NewListPager method. -type SnapshotsClientListOptions struct { - // placeholder for future optional parameters -} - -// SnapshotsClientUpdateTagsOptions contains the optional parameters for the SnapshotsClient.UpdateTags method. -type SnapshotsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// TrustedAccessRoleBindingsClientBeginCreateOrUpdateOptions contains the optional parameters for the TrustedAccessRoleBindingsClient.BeginCreateOrUpdate -// method. -type TrustedAccessRoleBindingsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// TrustedAccessRoleBindingsClientBeginDeleteOptions contains the optional parameters for the TrustedAccessRoleBindingsClient.BeginDelete -// method. -type TrustedAccessRoleBindingsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// TrustedAccessRoleBindingsClientGetOptions contains the optional parameters for the TrustedAccessRoleBindingsClient.Get -// method. -type TrustedAccessRoleBindingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// TrustedAccessRoleBindingsClientListOptions contains the optional parameters for the TrustedAccessRoleBindingsClient.NewListPager -// method. -type TrustedAccessRoleBindingsClientListOptions struct { - // placeholder for future optional parameters -} - -// TrustedAccessRolesClientListOptions contains the optional parameters for the TrustedAccessRolesClient.NewListPager method. -type TrustedAccessRolesClientListOptions struct { - // placeholder for future optional parameters -} diff --git a/pkg/auth/awesome/responses.go b/pkg/auth/awesome/responses.go deleted file mode 100644 index 27685a5e..00000000 --- a/pkg/auth/awesome/responses.go +++ /dev/null @@ -1,163 +0,0 @@ -package awesome - -// AgentPoolsClientAbortLatestOperationResponse contains the response from method AgentPoolsClient.BeginAbortLatestOperation. -type AgentPoolsClientAbortLatestOperationResponse struct { - // placeholder for future response values -} - -// AgentPoolsClientCaptureSecurityVHDSnapshotResponse contains the response from method AgentPoolsClient.BeginCaptureSecurityVHDSnapshot. -type AgentPoolsClientCaptureSecurityVHDSnapshotResponse struct { - // placeholder for future response values -} - -// AgentPoolsClientCreateOrUpdateResponse contains the response from method AgentPoolsClient.BeginCreateOrUpdate. -type AgentPoolsClientCreateOrUpdateResponse struct { - // Agent Pool. - AgentPool -} - -// AgentPoolsClientDeleteMachinesResponse contains the response from method AgentPoolsClient.BeginDeleteMachines. -type AgentPoolsClientDeleteMachinesResponse struct { - // placeholder for future response values -} - -// AgentPoolsClientDeleteResponse contains the response from method AgentPoolsClient.BeginDelete. -type AgentPoolsClientDeleteResponse struct { - // placeholder for future response values -} - -// AgentPoolsClientGetAvailableAgentPoolVersionsResponse contains the response from method AgentPoolsClient.GetAvailableAgentPoolVersions. -type AgentPoolsClientGetAvailableAgentPoolVersionsResponse struct { - // The list of available versions for an agent pool. - AgentPoolAvailableVersions -} - -// AgentPoolsClientGetResponse contains the response from method AgentPoolsClient.Get. -type AgentPoolsClientGetResponse struct { - // Agent Pool. - AgentPool -} - -// AgentPoolsClientGetUpgradeProfileResponse contains the response from method AgentPoolsClient.GetUpgradeProfile. -type AgentPoolsClientGetUpgradeProfileResponse struct { - // The list of available upgrades for an agent pool. - AgentPoolUpgradeProfile -} - -// AgentPoolsClientListResponse contains the response from method AgentPoolsClient.NewListPager. -type AgentPoolsClientListResponse struct { - // The response from the List Agent Pools operation. - AgentPoolListResult -} - -// AgentPoolsClientUpgradeNodeImageVersionResponse contains the response from method AgentPoolsClient.BeginUpgradeNodeImageVersion. -type AgentPoolsClientUpgradeNodeImageVersionResponse struct { - // Agent Pool. - AgentPool -} - -// AgentPool - Agent Pool. -type AgentPool struct { - // Properties of an agent pool. - Properties *ManagedClusterAgentPoolProfileProperties - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string - - // READ-ONLY; Resource type - Type *string -} - -// AgentPoolAvailableVersions - The list of available versions for an agent pool. -type AgentPoolAvailableVersions struct { - // REQUIRED; Properties of agent pool available versions. - Properties *AgentPoolAvailableVersionsProperties - - // READ-ONLY; The ID of the agent pool version list. - ID *string - - // READ-ONLY; The name of the agent pool version list. - Name *string - - // READ-ONLY; Type of the agent pool version list. - Type *string -} - -// AgentPoolAvailableVersionsProperties - The list of available agent pool versions. -type AgentPoolAvailableVersionsProperties struct { - // List of versions available for agent pool. - AgentPoolVersions []*AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem -} - -type AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem struct { - // Whether this version is the default agent pool version. - Default *bool - - // Whether Kubernetes version is currently in preview. - IsPreview *bool - - // The Kubernetes version (major.minor.patch). - KubernetesVersion *string -} - -// AgentPoolDeleteMachinesParameter - Specifies a list of machine names from the agent pool to be deleted. -type AgentPoolDeleteMachinesParameter struct { - // REQUIRED; The agent pool machine names. - MachineNames []*string -} - -type AgentPoolGPUProfile struct { - // The default value is true when the vmSize of the agent pool contains a GPU, false otherwise. GPU Driver Installation can - // only be set true when VM has an associated GPU resource. Setting this field to - // false prevents automatic GPU driver installation. In that case, in order for the GPU to be usable, the user must perform - // GPU driver installation themselves. - InstallGPUDriver *bool -} - -// AgentPoolGatewayProfile - The profile of a gateway agent pool. -type AgentPoolGatewayProfile struct { - // The size of Public IPv4 Prefix supported by the gateway agent pool. All prefixes applied to the gateway agent pool must - // be of this size. This provides the upper limit of node count in the gateway - // agent pool. Value value range is [28, 31]. The default value is 31. - PublicIPPrefixSize *int32 -} - -// AgentPoolListResult - The response from the List Agent Pools operation. -type AgentPoolListResult struct { - // The list of agent pools. - Value []*AgentPool - - // READ-ONLY; The URL to get the next set of agent pool results. - NextLink *string -} - -// AgentPoolNetworkProfile - Network settings of an agent pool. -type AgentPoolNetworkProfile struct { - // The port ranges that are allowed to access. The specified ranges are allowed to overlap. - AllowedHostPorts []*PortRange - - // The IDs of the application security groups which agent pool will associate when created. - ApplicationSecurityGroups []*string - - // IPTags of instance-level public IPs. - NodePublicIPTags []*IPTag -} - -// AgentPoolSecurityProfile - The security settings of an agent pool. -type AgentPoolSecurityProfile struct { - // Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For more - // details, see aka.ms/aks/trustedlaunch. If not specified, the default is - // false. - EnableSecureBoot *bool - - // vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the - // node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the - // default is false. - EnableVTPM *bool - - // SSH access method of an agent pool. - SSHAccess *AgentPoolSSHAccess -} diff --git a/pkg/auth/cred.go b/pkg/auth/cred.go index 461f3561..2ff32ab8 100644 --- a/pkg/auth/cred.go +++ b/pkg/auth/cred.go @@ -41,11 +41,12 @@ import ( ) const ( - e2eOverlayResourceVersionKey = "AKS_E2E_OVERLAY_RESOURCE_VERSION" - E2E_RP_INGRESS_ENDPOINT_ADDRESS = "rp.e2e.ig.e2e-aks.azure.com" - E2E_SERVICE_CONFIGURATION_AUDIENCE = "https://management.core.windows.net/" HTTPSPrefix = "https://" + E2E_SERVICE_CONFIGURATION_AUDIENCE = "https://management.core.windows.net/" + HTTPS_PORT = ":443" E2E_RP_INGRESS_ENDPOINT = "rp.e2e.ig.e2e-aks.azure.com" + E2E_RP_INGRESS_ENDPOINT_ADDRESS = E2E_RP_INGRESS_ENDPOINT + HTTPS_PORT + e2eOverlayResourceVersionKey = "AKS_E2E_OVERLAY_RESOURCE_VERSION" ) // CredentialAuth authenticates an application with assertions provided by a callback function. @@ -158,7 +159,7 @@ func (ca *CredentialAuth) readJWTFromFS() (string, error) { } func getE2ETestingCert(ctx context.Context) (string, error) { klog.Info("getE2ETestingCert") - e2eOverlayResourceVersion := "rscazghj6" //os.Getenv(e2eOverlayResourceVersionKey) + e2eOverlayResourceVersion := "rw9erfy9x" //os.Getenv(e2eOverlayResourceVersionKey) if e2eOverlayResourceVersion == "" { return "", fmt.Errorf("E2E overlay resource version is not set") } @@ -178,7 +179,6 @@ func getE2ETestingCert(ctx context.Context) (string, error) { if err1 != nil { return "", err1 } - klog.Infof("Cert result: %s", *result.Value) return *result.Value, nil } @@ -190,18 +190,18 @@ func BuildHTTPClient(ctx context.Context) (*http.Client, error) { return nil, err } - certPEM, keyPEM := SplitPEMBlock([]byte(armClientCert)) + certPEM, keyPEM := splitPEMBlock([]byte(armClientCert)) if len(certPEM) == 0 { return nil, errors.New("malformed cert pem format") } // Load client cert - cert, err := tls.X509KeyPair([]byte(certPEM), []byte(keyPEM)) + cert, err := tls.X509KeyPair(certPEM, keyPEM) if err != nil { return nil, err } caCertPool := x509.NewCertPool() - ok := caCertPool.AppendCertsFromPEM([]byte(certPEM)) + ok := caCertPool.AppendCertsFromPEM(certPEM) if !ok { return nil, errors.New("") } @@ -216,14 +216,20 @@ func BuildHTTPClient(ctx context.Context) (*http.Client, error) { Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, } + rpIngressEndpoint := fmt.Sprintf("aksrpingress-e2e-%s.%s.cloudapp.azure.com", "heelayotebld95712747", "eastus") + klog.Infof("before rpIngressAddress: %s", rpIngressEndpoint) + + rpIngressAddress := normalizeHostPort(rpIngressEndpoint, HTTPS_PORT) transport := &http.Transport{ TLSClientConfig: tlsConfig, DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) { + klog.Infof("rpIngressAddress: %s", rpIngressAddress) + klog.Infof("DialContext Address before: %s", addr) if addr == E2E_RP_INGRESS_ENDPOINT_ADDRESS { - addr = fmt.Sprintf("%s%s", fmt.Sprintf("aksrpingress-e2e-%s.%s.cloudapp.azure.com", "heelayotebld95054108", "eastus"), ":443") + addr = rpIngressAddress } - + klog.Infof("DialContext Address: %s", addr) return dialer.DialContext(ctx, network, addr) }, // Configuring DialContext disables HTTP/2 by default. @@ -275,7 +281,7 @@ func configureHTTP2Transport(t *http.Transport) error { } // split the pem block to cert/key -func SplitPEMBlock(pemBlock []byte) (certPEM []byte, keyPEM []byte) { +func splitPEMBlock(pemBlock []byte) (certPEM []byte, keyPEM []byte) { for { var derBlock *pem.Block derBlock, pemBlock = pem.Decode(pemBlock) @@ -300,3 +306,10 @@ func CloneCloudConfiguration(cloudConfig *cloud.Configuration) *cloud.Configurat } return &clone } + +func normalizeHostPort(hostMaybeWithPort string, defaultPortWithColon string) string { + if _, _, err := net.SplitHostPort(hostMaybeWithPort); err == nil { + return hostMaybeWithPort // host already has a port + } + return fmt.Sprintf("%s%s", hostMaybeWithPort, defaultPortWithColon) +} diff --git a/pkg/providers/instance/azure_client.go b/pkg/providers/instance/azure_client.go index b8a9fce1..a3cdffb2 100644 --- a/pkg/providers/instance/azure_client.go +++ b/pkg/providers/instance/azure_client.go @@ -17,18 +17,13 @@ package instance import ( "context" - "maps" - "net/http" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4" "github.com/azure/gpu-provisioner/pkg/auth/awesome" "github.com/azure/gpu-provisioner/pkg/utils" - "github.com/google/uuid" - // nolint SA1019 - deprecated package "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2022-08-01/compute" "github.com/Azure/skewer" @@ -38,10 +33,6 @@ import ( "k8s.io/klog/v2" ) -const ( - RPReferer = "rp.e2e.ig.e2e-aks.azure.com" -) - type AgentPoolsAPI interface { BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters armcontainerservice.AgentPool, options *armcontainerservice.AgentPoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[armcontainerservice.AgentPoolsClientCreateOrUpdateResponse], error) Get(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *armcontainerservice.AgentPoolsClientGetOptions) (armcontainerservice.AgentPoolsClientGetResponse, error) @@ -66,8 +57,9 @@ func NewAZClientFromAPI( } func CreateAzClient(ctx context.Context, cfg *auth.Config) (*AZClient, error) { - var err error + klog.Infof("CreateAzClient") + var err error azClient, err := NewAZClient(ctx, cfg) if err != nil { return nil, err @@ -77,13 +69,14 @@ func CreateAzClient(ctx context.Context, cfg *auth.Config) (*AZClient, error) { } func NewAZClient(ctx context.Context, cfg *auth.Config) (*AZClient, error) { - + klog.Infof("NewAZClient") skuClient := compute.NewResourceSkusClient(cfg.SubscriptionID) isE2E := utils.WithDefaultBool("E2E_TEST_MODE", false) // If not E2E, we use the default options var agentPoolClient AgentPoolsAPI if isE2E { optionsToUse := &arm.ClientOptions{} + e2eCloudConfig := auth.CloneCloudConfiguration(&cloud.AzurePublic) e2eCloudConfig.Services[cloud.ResourceManager] = cloud.ServiceConfiguration{ Audience: auth.E2E_SERVICE_CONFIGURATION_AUDIENCE, @@ -92,18 +85,17 @@ func NewAZClient(ctx context.Context, cfg *auth.Config) (*AZClient, error) { optionsToUse.ClientOptions.Cloud = *e2eCloudConfig httpClient, err := auth.BuildHTTPClient(ctx) - optionsToUse.Transport = httpClient - if err != nil { return nil, err } - apClient, err := awesome.NewAgentPoolsClient(cfg.SubscriptionID, &auth.DummyCredential{}, optionsToUse) + optionsToUse.Transport = httpClient + + agentPoolClient, err = awesome.NewAgentPoolsClient(cfg.SubscriptionID, &auth.DummyCredential{}, optionsToUse) if err != nil { return nil, err } - klog.V(5).Infof("Created awesome agent pool client %v", agentPoolClient) + klog.Infof("Created awesome agent pool client %v", agentPoolClient) - agentPoolClient = apClient skuClient.Authorizer = &auth.DummyCredential{} } else { credAuth, err := auth.NewCredentialAuth(ctx, cfg) @@ -114,12 +106,11 @@ func NewAZClient(ctx context.Context, cfg *auth.Config) (*AZClient, error) { if err != nil { return nil, err } - klog.V(5).Infof("Created agent pool client %v using token credential", agentPoolClient) + klog.Infof("Created agent pool client %v using token credential", agentPoolClient) // TODO: this one is not enabled for rate limiting / throttling ... // TODO Move this over to track 2 when skewer is migrated skuClient.Authorizer = credAuth.Authorizer - klog.V(5).Infof("Created sku client with authorizer: %v", skuClient) - + klog.Infof("Created sku client with authorizer: %v", skuClient) } return &AZClient{ @@ -127,33 +118,3 @@ func NewAZClient(ctx context.Context, cfg *auth.Config) (*AZClient, error) { SKUClient: skuClient, }, nil } - -func SetArmClientOptions() *arm.ClientOptions { - opt := new(arm.ClientOptions) - - opt.PerCallPolicies = append(opt.PerCallPolicies, - PolicySetHeaders{ - "Referer": []string{RPReferer}, - }, - PolicySetHeaders{ - "x-ms-correlation-request-id": []string{uuid.New().String()}, - }, - ) - opt.Cloud.Services = maps.Clone(opt.Cloud.Services) // we need this because map is a reference type - opt.Cloud.Services[cloud.ResourceManager] = cloud.ServiceConfiguration{ - Audience: cloud.AzurePublic.Services[cloud.ResourceManager].Audience, - Endpoint: "https://" + RPReferer, - } - return opt -} - -// PolicySetHeaders sets http header -type PolicySetHeaders http.Header - -func (p PolicySetHeaders) Do(req *policy.Request) (*http.Response, error) { - header := req.Raw().Header - for k, v := range p { - header[k] = v - } - return req.Next() -}