Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 081d584

Browse files
committed
AKSCluster now only supports managed identities
Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
1 parent 76b1c39 commit 081d584

9 files changed

Lines changed: 120 additions & 223 deletions

File tree

apis/compute/v1alpha3/types.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,24 @@ type AKSClusterParameters struct {
8181
// cluster.
8282
// +optional
8383
DisableRBAC bool `json:"disableRBAC,omitempty"`
84+
85+
// Identity is the managed identity configuration for the control-plane.
86+
// +kubebuilder:validation:Required
87+
Identity Identity `json:"identity"`
88+
}
89+
90+
type Identity struct {
91+
// Type specifies the type of the managed identity to be used by
92+
// the control-plane. Allowed values are: `SystemAssigned` or
93+
// `UserAssigned`.
94+
// +required
95+
// +kubebuilder:validation:Enum=SystemAssigned;UserAssigned
96+
Type string `json:"type"`
97+
// IdentityNames are the names of the user-assigned managed identity
98+
// resources to be used by the control-plane.
99+
// Required if Type is `UserAssigned`.
100+
// +optional
101+
IdentityNames []string `json:"identityNames,omitempty"`
84102
}
85103

86104
// An AKSClusterSpec defines the desired state of a AKSCluster.

apis/compute/v1alpha3/zz_generated.deepcopy.go

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/v1beta1/zz_generated.deepcopy.go

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.16
44

55
require (
66
github.com/Azure/azure-pipeline-go v0.2.2 // indirect
7-
github.com/Azure/azure-sdk-for-go v61.4.0+incompatible
7+
github.com/Azure/azure-sdk-for-go v62.3.0+incompatible
88
github.com/Azure/azure-sdk-for-go/sdk/azcore v0.22.0
99
github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.13.2
1010
github.com/Azure/azure-storage-blob-go v0.7.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7
2525
github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4=
2626
github.com/Azure/azure-pipeline-go v0.2.2 h1:6oiIS9yaG6XCCzhgAgKFfIWyo4LLCiDhZot6ltoThhY=
2727
github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc=
28-
github.com/Azure/azure-sdk-for-go v61.4.0+incompatible h1:BF2Pm3aQWIa6q9KmxyF1JYKYXtVw67vtvu2Wd54NGuY=
29-
github.com/Azure/azure-sdk-for-go v61.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
28+
github.com/Azure/azure-sdk-for-go v62.3.0+incompatible h1:Ctfsn9UoA/BB4HMYQlbPPgNXdX0tZ4tmb85+KFb2+RE=
29+
github.com/Azure/azure-sdk-for-go v62.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
3030
github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.0/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM=
3131
github.com/Azure/azure-sdk-for-go/sdk/azcore v0.22.0 h1:zBJcBJwte0x6PcPK7XaWDMvK2o2ZM2f1sMaqNNavQ5g=
3232
github.com/Azure/azure-sdk-for-go/sdk/azcore v0.22.0/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM=

package/crds/azure.crossplane.io_providerconfigs.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ spec:
4444
spec:
4545
description: A ProviderConfigSpec defines the desired state of a ProviderConfig.
4646
properties:
47+
armEndpoint:
48+
description: ARMEndpoint is the Azure Resource Manager endpoint to
49+
use. Defaults to ARM public cloud endpoint.
50+
type: string
4751
clientID:
4852
description: ClientID is the user-assigned managed identity's ID when
4953
Credentials.Source is `InjectedIdentity`. If unset and Credentials.Source
@@ -102,6 +106,11 @@ spec:
102106
required:
103107
- source
104108
type: object
109+
subscriptionID:
110+
description: SubscriptionID is the Azure subscription ID to be used.
111+
If unset, subscription ID from Credentials will be used. Required
112+
if Credentials.Source is not Secret.
113+
type: string
105114
required:
106115
- credentials
107116
type: object

package/crds/compute.azure.crossplane.io_aksclusters.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,28 @@ spec:
7474
to the Kubernetes API when managing containers after creating the
7575
cluster.
7676
type: string
77+
identity:
78+
description: Identity is the managed identity configuration for the
79+
control-plane.
80+
properties:
81+
identityNames:
82+
description: IdentityNames are the names of the user-assigned
83+
managed identity resources to be used by the control-plane.
84+
Required if Type is `UserAssigned`.
85+
items:
86+
type: string
87+
type: array
88+
type:
89+
description: 'Type specifies the type of the managed identity
90+
to be used by the control-plane. Allowed values are: `SystemAssigned`
91+
or `UserAssigned`.'
92+
enum:
93+
- SystemAssigned
94+
- UserAssigned
95+
type: string
96+
required:
97+
- type
98+
type: object
7799
location:
78100
description: Location is the Azure location that the cluster will
79101
be created in
@@ -193,6 +215,7 @@ spec:
193215
- namespace
194216
type: object
195217
required:
218+
- identity
196219
- location
197220
- version
198221
type: object

0 commit comments

Comments
 (0)