From 0d1c2dc21588e6ee44880f71962c4c2250eccec5 Mon Sep 17 00:00:00 2001 From: patrickdillon Date: Wed, 10 Mar 2021 15:17:38 -0500 Subject: [PATCH] config: Azure Stack Hub support Add Azure Stack Hub as a valid Azure cloud environment. config/infra: add Azure ARM Endpoint Adds ARM Endpoint to the Azure infrastructure status. This endpoint would be used with Azure Stack Hub for resource management and endpoint discovery. --- ...0_10_config-operator_01_infrastructure.crd.yaml | 5 +++++ config/v1/types_infrastructure.go | 9 ++++++++- config/v1/zz_generated.swagger_doc_generated.go | 1 + ...dns-operator_00-custom-resource-definition.yaml | 14 +++++++------- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml b/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml index 9205a4347bb..9a7e291cdc5 100644 --- a/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml +++ b/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml @@ -304,6 +304,10 @@ spec: provider. type: object properties: + armEndpoint: + description: armEndpoint specifies a URL to use for resource + management in non-soverign clouds such as Azure Stack. + type: string cloudName: description: cloudName is the name of the Azure cloud environment which can be used to configure the Azure SDK with the appropriate @@ -315,6 +319,7 @@ spec: - AzureUSGovernmentCloud - AzureChinaCloud - AzureGermanCloud + - AzureStackCloud networkResourceGroupName: description: networkResourceGroupName is the Resource Group for network resources like the Virtual Network and Subnets diff --git a/config/v1/types_infrastructure.go b/config/v1/types_infrastructure.go index 6e78d5ea6d2..5ca08dc8361 100644 --- a/config/v1/types_infrastructure.go +++ b/config/v1/types_infrastructure.go @@ -362,10 +362,14 @@ type AzurePlatformStatus struct { // If empty, the value is equal to `AzurePublicCloud`. // +optional CloudName AzureCloudEnvironment `json:"cloudName,omitempty"` + + // armEndpoint specifies a URL to use for resource management in non-soverign clouds such as Azure Stack. + // +optional + ARMEndpoint string `json:"armEndpoint,omitempty"` } // AzureCloudEnvironment is the name of the Azure cloud environment -// +kubebuilder:validation:Enum="";AzurePublicCloud;AzureUSGovernmentCloud;AzureChinaCloud;AzureGermanCloud +// +kubebuilder:validation:Enum="";AzurePublicCloud;AzureUSGovernmentCloud;AzureChinaCloud;AzureGermanCloud;AzureStackCloud type AzureCloudEnvironment string const ( @@ -380,6 +384,9 @@ const ( // AzureGermanCloud is the Azure cloud environment used in Germany. AzureGermanCloud AzureCloudEnvironment = "AzureGermanCloud" + + // AzureStackCloud is the Azure cloud environment used at the edge and on premises. + AzureStackCloud AzureCloudEnvironment = "AzureStackCloud" ) // GCPPlatformSpec holds the desired state of the Google Cloud Platform infrastructure provider. diff --git a/config/v1/zz_generated.swagger_doc_generated.go b/config/v1/zz_generated.swagger_doc_generated.go index bc552a7cc49..23bb4fbb8f3 100644 --- a/config/v1/zz_generated.swagger_doc_generated.go +++ b/config/v1/zz_generated.swagger_doc_generated.go @@ -765,6 +765,7 @@ var map_AzurePlatformStatus = map[string]string{ "resourceGroupName": "resourceGroupName is the Resource Group for new Azure resources created for the cluster.", "networkResourceGroupName": "networkResourceGroupName is the Resource Group for network resources like the Virtual Network and Subnets used by the cluster. If empty, the value is same as ResourceGroupName.", "cloudName": "cloudName is the name of the Azure cloud environment which can be used to configure the Azure SDK with the appropriate Azure API endpoints. If empty, the value is equal to `AzurePublicCloud`.", + "armEndpoint": "armEndpoint specifies a URL to use for resource management in non-soverign clouds such as Azure Stack.", } func (AzurePlatformStatus) SwaggerDoc() map[string]string { diff --git a/operator/v1/0000_70_dns-operator_00-custom-resource-definition.yaml b/operator/v1/0000_70_dns-operator_00-custom-resource-definition.yaml index b9386b0a453..89c6e756e29 100644 --- a/operator/v1/0000_70_dns-operator_00-custom-resource-definition.yaml +++ b/operator/v1/0000_70_dns-operator_00-custom-resource-definition.yaml @@ -72,13 +72,13 @@ spec: type: string tolerations: description: "tolerations is a list of tolerations applied to - DNS pods. \n If empty, the operator sets a toleration for the - \"node-role.kubernetes.io/master\" taint. This default is subject - to change. Specifying tolerations without including a toleration - for the \"node-role.kubernetes.io/master\" taint may be risky - as it could lead to an outage if all worker nodes become unavailable. - \n Note that the daemon controller adds some tolerations as - well. See https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/" + DNS pods. \n If empty, the DNS operator sets a toleration for + the \"node-role.kubernetes.io/master\" taint. This default + is subject to change. Specifying tolerations without including + a toleration for the \"node-role.kubernetes.io/master\" taint + may be risky as it could lead to an outage if all worker nodes + become unavailable. \n Note that the daemon controller adds + some tolerations as well. See https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/" type: array items: description: The pod this Toleration is attached to tolerates