Skip to content

Commit fa947c4

Browse files
authored
Merge pull request #4050 from k8s-infra-cherrypick-robot/cherry-pick-4045-to-release-1.11
[release-1.11] Replace Paid SKU tier with Standard
2 parents df06a41 + 99e03bb commit fa947c4

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

api/v1beta1/azuremanagedcontrolplane_types.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,14 +262,17 @@ type AddonProfile struct {
262262
}
263263

264264
// AzureManagedControlPlaneSkuTier - Tier of a managed cluster SKU.
265-
// +kubebuilder:validation:Enum=Free;Paid
265+
// +kubebuilder:validation:Enum=Free;Paid;Standard
266266
type AzureManagedControlPlaneSkuTier string
267267

268268
const (
269269
// FreeManagedControlPlaneTier is the free tier of AKS without corresponding SLAs.
270270
FreeManagedControlPlaneTier AzureManagedControlPlaneSkuTier = "Free"
271271
// PaidManagedControlPlaneTier is the paid tier of AKS with corresponding SLAs.
272+
// Deprecated. It has been replaced with StandardManagedControlPlaneTier.
272273
PaidManagedControlPlaneTier AzureManagedControlPlaneSkuTier = "Paid"
274+
// StandardManagedControlPlaneTier is the standard tier of AKS with corresponding SLAs.
275+
StandardManagedControlPlaneTier AzureManagedControlPlaneSkuTier = "Standard"
273276
)
274277

275278
// AKSSku - AKS SKU.

api/v1beta1/azuremanagedcontrolplane_webhook.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ func (mw *azureManagedControlPlaneWebhook) Default(ctx context.Context, obj runt
9696
ctrl.Log.WithName("AzureManagedControlPlaneWebHookLogger").Error(err, "setDefaultSSHPublicKey failed")
9797
}
9898

99+
// PaidManagedControlPlaneTier has been replaced with StandardManagedControlPlaneTier since v2023-02-01.
100+
if m.Spec.SKU != nil && m.Spec.SKU.Tier == PaidManagedControlPlaneTier {
101+
m.Spec.SKU.Tier = StandardManagedControlPlaneTier
102+
ctrl.Log.WithName("AzureManagedControlPlaneWebHookLogger").Info("Paid SKU tier is deprecated and has been replaced by Standard")
103+
}
104+
99105
m.setDefaultNodeResourceGroupName()
100106
m.setDefaultVirtualNetwork()
101107
m.setDefaultSubnet()

api/v1beta1/azuremanagedcontrolplane_webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func TestDefaultingWebhook(t *testing.T) {
8787
g.Expect(amcp.Spec.NodeResourceGroupName).To(Equal("fooNodeRg"))
8888
g.Expect(amcp.Spec.VirtualNetwork.Name).To(Equal("fooVnetName"))
8989
g.Expect(amcp.Spec.VirtualNetwork.Subnet.Name).To(Equal("fooSubnetName"))
90-
g.Expect(amcp.Spec.SKU.Tier).To(Equal(PaidManagedControlPlaneTier))
90+
g.Expect(amcp.Spec.SKU.Tier).To(Equal(StandardManagedControlPlaneTier))
9191
g.Expect(*amcp.Spec.OIDCIssuerProfile.Enabled).To(BeTrue())
9292

9393
t.Logf("Testing amcp defaulting webhook with overlay")

config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ spec:
421421
enum:
422422
- Free
423423
- Paid
424+
- Standard
424425
type: string
425426
required:
426427
- tier

docs/book/src/topics/managedcluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ spec:
130130
networkPolicy: azure # or calico
131131
networkPlugin: azure # or kubenet
132132
sku:
133-
tier: Free # or Paid
133+
tier: Free # or Standard
134134
addonProfiles:
135135
- name: azureKeyvaultSecretsProvider
136136
enabled: true

0 commit comments

Comments
 (0)