Skip to content

Commit 3f2e01c

Browse files
Merge pull request #5495 from bryan-cox/OCPBUGS-48688
OCPBUGS-48688: Add Tenant ID to Azure API & Remove Credentials from CPO
2 parents daebc00 + 3bc8faf commit 3f2e01c

File tree

41 files changed

+180
-134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+180
-134
lines changed

api/hypershift/v1beta1/azure.go

+5
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,11 @@ type AzurePlatformSpec struct {
428428
// +kubebuilder:validation:Required
429429
// +openshift:enable:FeatureGate=AROHCPManagedIdentities
430430
ManagedIdentities AzureResourceManagedIdentities `json:"managedIdentities,omitempty"`
431+
432+
// tenantID is a unique identifier for the tenant where Azure resources will be created and managed in.
433+
//
434+
// +required
435+
TenantID string `json:"tenantID"`
431436
}
432437

433438
// ManagedAzureKeyVault is an Azure Key Vault on the management cluster.

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/AAA_ungated.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3113,6 +3113,10 @@ spec:
31133113
x-kubernetes-validations:
31143114
- message: SubscriptionID is immutable
31153115
rule: self == oldSelf
3116+
tenantID:
3117+
description: tenantID is a unique identifier for the tenant
3118+
where Azure resources will be created and managed in.
3119+
type: string
31163120
vnetID:
31173121
description: |-
31183122
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3133,6 +3137,7 @@ spec:
31333137
- securityGroupID
31343138
- subnetID
31353139
- subscriptionID
3140+
- tenantID
31363141
- vnetID
31373142
type: object
31383143
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/AROHCPManagedIdentities.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3368,6 +3368,10 @@ spec:
33683368
x-kubernetes-validations:
33693369
- message: SubscriptionID is immutable
33703370
rule: self == oldSelf
3371+
tenantID:
3372+
description: tenantID is a unique identifier for the tenant
3373+
where Azure resources will be created and managed in.
3374+
type: string
33713375
vnetID:
33723376
description: |-
33733377
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3389,6 +3393,7 @@ spec:
33893393
- securityGroupID
33903394
- subnetID
33913395
- subscriptionID
3396+
- tenantID
33923397
- vnetID
33933398
type: object
33943399
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/AutoNodeKarpenter.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3154,6 +3154,10 @@ spec:
31543154
x-kubernetes-validations:
31553155
- message: SubscriptionID is immutable
31563156
rule: self == oldSelf
3157+
tenantID:
3158+
description: tenantID is a unique identifier for the tenant
3159+
where Azure resources will be created and managed in.
3160+
type: string
31573161
vnetID:
31583162
description: |-
31593163
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3174,6 +3178,7 @@ spec:
31743178
- securityGroupID
31753179
- subnetID
31763180
- subscriptionID
3181+
- tenantID
31773182
- vnetID
31783183
type: object
31793184
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/DynamicResourceAllocation.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3130,6 +3130,10 @@ spec:
31303130
x-kubernetes-validations:
31313131
- message: SubscriptionID is immutable
31323132
rule: self == oldSelf
3133+
tenantID:
3134+
description: tenantID is a unique identifier for the tenant
3135+
where Azure resources will be created and managed in.
3136+
type: string
31333137
vnetID:
31343138
description: |-
31353139
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3150,6 +3154,7 @@ spec:
31503154
- securityGroupID
31513155
- subnetID
31523156
- subscriptionID
3157+
- tenantID
31533158
- vnetID
31543159
type: object
31553160
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ExternalOIDC.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3351,6 +3351,10 @@ spec:
33513351
x-kubernetes-validations:
33523352
- message: SubscriptionID is immutable
33533353
rule: self == oldSelf
3354+
tenantID:
3355+
description: tenantID is a unique identifier for the tenant
3356+
where Azure resources will be created and managed in.
3357+
type: string
33543358
vnetID:
33553359
description: |-
33563360
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3371,6 +3375,7 @@ spec:
33713375
- securityGroupID
33723376
- subnetID
33733377
- subscriptionID
3378+
- tenantID
33743379
- vnetID
33753380
type: object
33763381
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/HCPPodsLabels.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3122,6 +3122,10 @@ spec:
31223122
x-kubernetes-validations:
31233123
- message: SubscriptionID is immutable
31243124
rule: self == oldSelf
3125+
tenantID:
3126+
description: tenantID is a unique identifier for the tenant
3127+
where Azure resources will be created and managed in.
3128+
type: string
31253129
vnetID:
31263130
description: |-
31273131
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3142,6 +3146,7 @@ spec:
31423146
- securityGroupID
31433147
- subnetID
31443148
- subscriptionID
3149+
- tenantID
31453150
- vnetID
31463151
type: object
31473152
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ImageStreamImportMode.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3127,6 +3127,10 @@ spec:
31273127
x-kubernetes-validations:
31283128
- message: SubscriptionID is immutable
31293129
rule: self == oldSelf
3130+
tenantID:
3131+
description: tenantID is a unique identifier for the tenant
3132+
where Azure resources will be created and managed in.
3133+
type: string
31303134
vnetID:
31313135
description: |-
31323136
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3147,6 +3151,7 @@ spec:
31473151
- securityGroupID
31483152
- subnetID
31493153
- subscriptionID
3154+
- tenantID
31503155
- vnetID
31513156
type: object
31523157
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/NetworkDiagnosticsConfig.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3261,6 +3261,10 @@ spec:
32613261
x-kubernetes-validations:
32623262
- message: SubscriptionID is immutable
32633263
rule: self == oldSelf
3264+
tenantID:
3265+
description: tenantID is a unique identifier for the tenant
3266+
where Azure resources will be created and managed in.
3267+
type: string
32643268
vnetID:
32653269
description: |-
32663270
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3281,6 +3285,7 @@ spec:
32813285
- securityGroupID
32823286
- subnetID
32833287
- subscriptionID
3288+
- tenantID
32843289
- vnetID
32853290
type: object
32863291
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/OpenStack.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3109,6 +3109,10 @@ spec:
31093109
x-kubernetes-validations:
31103110
- message: SubscriptionID is immutable
31113111
rule: self == oldSelf
3112+
tenantID:
3113+
description: tenantID is a unique identifier for the tenant
3114+
where Azure resources will be created and managed in.
3115+
type: string
31123116
vnetID:
31133117
description: |-
31143118
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3129,6 +3133,7 @@ spec:
31293133
- securityGroupID
31303134
- subnetID
31313135
- subscriptionID
3136+
- tenantID
31323137
- vnetID
31333138
type: object
31343139
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/AAA_ungated.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3015,6 +3015,10 @@ spec:
30153015
x-kubernetes-validations:
30163016
- message: SubscriptionID is immutable
30173017
rule: self == oldSelf
3018+
tenantID:
3019+
description: tenantID is a unique identifier for the tenant
3020+
where Azure resources will be created and managed in.
3021+
type: string
30183022
vnetID:
30193023
description: |-
30203024
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3035,6 +3039,7 @@ spec:
30353039
- securityGroupID
30363040
- subnetID
30373041
- subscriptionID
3042+
- tenantID
30383043
- vnetID
30393044
type: object
30403045
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/AROHCPManagedIdentities.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3270,6 +3270,10 @@ spec:
32703270
x-kubernetes-validations:
32713271
- message: SubscriptionID is immutable
32723272
rule: self == oldSelf
3273+
tenantID:
3274+
description: tenantID is a unique identifier for the tenant
3275+
where Azure resources will be created and managed in.
3276+
type: string
32733277
vnetID:
32743278
description: |-
32753279
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3291,6 +3295,7 @@ spec:
32913295
- securityGroupID
32923296
- subnetID
32933297
- subscriptionID
3298+
- tenantID
32943299
- vnetID
32953300
type: object
32963301
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/AutoNodeKarpenter.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3056,6 +3056,10 @@ spec:
30563056
x-kubernetes-validations:
30573057
- message: SubscriptionID is immutable
30583058
rule: self == oldSelf
3059+
tenantID:
3060+
description: tenantID is a unique identifier for the tenant
3061+
where Azure resources will be created and managed in.
3062+
type: string
30593063
vnetID:
30603064
description: |-
30613065
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3076,6 +3080,7 @@ spec:
30763080
- securityGroupID
30773081
- subnetID
30783082
- subscriptionID
3083+
- tenantID
30793084
- vnetID
30803085
type: object
30813086
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/DynamicResourceAllocation.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3032,6 +3032,10 @@ spec:
30323032
x-kubernetes-validations:
30333033
- message: SubscriptionID is immutable
30343034
rule: self == oldSelf
3035+
tenantID:
3036+
description: tenantID is a unique identifier for the tenant
3037+
where Azure resources will be created and managed in.
3038+
type: string
30353039
vnetID:
30363040
description: |-
30373041
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3052,6 +3056,7 @@ spec:
30523056
- securityGroupID
30533057
- subnetID
30543058
- subscriptionID
3059+
- tenantID
30553060
- vnetID
30563061
type: object
30573062
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/ExternalOIDC.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3253,6 +3253,10 @@ spec:
32533253
x-kubernetes-validations:
32543254
- message: SubscriptionID is immutable
32553255
rule: self == oldSelf
3256+
tenantID:
3257+
description: tenantID is a unique identifier for the tenant
3258+
where Azure resources will be created and managed in.
3259+
type: string
32563260
vnetID:
32573261
description: |-
32583262
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3273,6 +3277,7 @@ spec:
32733277
- securityGroupID
32743278
- subnetID
32753279
- subscriptionID
3280+
- tenantID
32763281
- vnetID
32773282
type: object
32783283
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/ImageStreamImportMode.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3029,6 +3029,10 @@ spec:
30293029
x-kubernetes-validations:
30303030
- message: SubscriptionID is immutable
30313031
rule: self == oldSelf
3032+
tenantID:
3033+
description: tenantID is a unique identifier for the tenant
3034+
where Azure resources will be created and managed in.
3035+
type: string
30323036
vnetID:
30333037
description: |-
30343038
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3049,6 +3053,7 @@ spec:
30493053
- securityGroupID
30503054
- subnetID
30513055
- subscriptionID
3056+
- tenantID
30523057
- vnetID
30533058
type: object
30543059
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/NetworkDiagnosticsConfig.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3163,6 +3163,10 @@ spec:
31633163
x-kubernetes-validations:
31643164
- message: SubscriptionID is immutable
31653165
rule: self == oldSelf
3166+
tenantID:
3167+
description: tenantID is a unique identifier for the tenant
3168+
where Azure resources will be created and managed in.
3169+
type: string
31663170
vnetID:
31673171
description: |-
31683172
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3183,6 +3187,7 @@ spec:
31833187
- securityGroupID
31843188
- subnetID
31853189
- subscriptionID
3190+
- tenantID
31863191
- vnetID
31873192
type: object
31883193
ibmcloud:

api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/OpenStack.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -3011,6 +3011,10 @@ spec:
30113011
x-kubernetes-validations:
30123012
- message: SubscriptionID is immutable
30133013
rule: self == oldSelf
3014+
tenantID:
3015+
description: tenantID is a unique identifier for the tenant
3016+
where Azure resources will be created and managed in.
3017+
type: string
30143018
vnetID:
30153019
description: |-
30163020
VnetID is the ID of an existing VNET to use in creating VMs. The VNET can exist in a different resource group
@@ -3031,6 +3035,7 @@ spec:
30313035
- securityGroupID
30323036
- subnetID
30333037
- subscriptionID
3038+
- tenantID
30343039
- vnetID
30353040
type: object
30363041
ibmcloud:

client/applyconfiguration/hypershift/v1beta1/azureplatformspec.go

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/cluster/azure/create.go

+1
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ func (o *CreateOptions) ApplyPlatformSpecifics(cluster *hyperv1.HostedCluster) e
270270
Azure: &hyperv1.AzurePlatformSpec{
271271
Credentials: corev1.LocalObjectReference{Name: credentialSecret(cluster.Namespace, cluster.Name).Name},
272272
SubscriptionID: o.creds.SubscriptionID,
273+
TenantID: o.creds.TenantID,
273274
Location: o.infra.Location,
274275
ResourceGroupName: o.infra.ResourceGroupName,
275276
VnetID: o.infra.VNetID,

cmd/cluster/azure/testdata/zz_fixture_TestCreateCluster_complicated_invocation_from_bryan.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ spec:
111111
securityGroupID: fakeSecurityGroupID
112112
subnetID: fakeSubnetID
113113
subscriptionID: fakeSubscriptionID
114+
tenantID: fakeTenantID
114115
vnetID: fakeVNetID
115116
type: Azure
116117
pullSecret:

cmd/cluster/azure/testdata/zz_fixture_TestCreateCluster_create_with_a_ure_marketplace_image.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ spec:
7878
securityGroupID: fakeSecurityGroupID
7979
subnetID: fakeSubnetID
8080
subscriptionID: fakeSubscriptionID
81+
tenantID: fakeTenantID
8182
vnetID: fakeVNetID
8283
type: Azure
8384
pullSecret:

cmd/cluster/azure/testdata/zz_fixture_TestCreateCluster_minimal_flags_necessary_to_render.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ spec:
111111
securityGroupID: fakeSecurityGroupID
112112
subnetID: fakeSubnetID
113113
subscriptionID: fakeSubscriptionID
114+
tenantID: fakeTenantID
114115
vnetID: fakeVNetID
115116
type: Azure
116117
pullSecret:

cmd/cluster/azure/testdata/zz_fixture_TestCreateCluster_with_availability_ones.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ spec:
111111
securityGroupID: fakeSecurityGroupID
112112
subnetID: fakeSubnetID
113113
subscriptionID: fakeSubscriptionID
114+
tenantID: fakeTenantID
114115
vnetID: fakeVNetID
115116
type: Azure
116117
pullSecret:

0 commit comments

Comments
 (0)