Skip to content

Commit 89e385c

Browse files
author
Winnie Kwon
committed
Update multitenancy doc
- Remove apiVersion from sourceidentityRef as there is no apiVersion field. - Remove a paragraph mentioning capa-eks-control-plane-system namespace, which is not used anymore with EKS feature graduation. - Fix test name and description of awscontrolleridentity controller
1 parent 3e7adcb commit 89e385c

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

docs/book/src/topics/multitenancy.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ spec:
158158
roleARN: arn:aws:iam::11122233344:role/multi-tenancy-role
159159
sessionName: multi-tenancy-role-session
160160
sourceidentityRef:
161-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
162161
kind: AWSClusterControllerIdentity
163162
name: default
164163
---
@@ -172,18 +171,15 @@ spec:
172171
roleARN: arn:aws:iam::11122233355:role/multi-tenancy-nested-role
173172
sessionName: multi-tenancy-nested-role-session
174173
sourceidentityRef:
175-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
176174
kind: AWSClusterRoleIdentity
177175
name: multi-tenancy-role
178176
```
179177

180-
## Secure Access to Identitys
181-
`allowedNamespaces` field is used to grant access to the namespaces to use Identitys.
178+
## Secure Access to Identities
179+
`allowedNamespaces` field is used to grant access to the namespaces to use Identities.
182180
Only AWSClusters that are created in one of the Identity's allowed namespaces can use that Identity.
183181
`allowedNamespaces` are defined by providing either a list of namespaces or label selector to select namespaces.
184182

185-
Note that the `capa-eks-control-plane-system` namespace will need to be included in the allow namespace list and/or have labels added to allow access to identities used by AWSClusters.
186-
187183
### Examples
188184

189185
An empty `allowedNamespaces` indicates that the Identity can be used by all namespaces.
@@ -245,7 +241,7 @@ allowedNamespaces:
245241
selector: {}
246242
```
247243

248-
**Important** The default behaviour of an empty label selector is to match all objects, however here we do not follow that behavior to avoid unintended access to the identitys.
244+
**Important** The default behaviour of an empty label selector is to match all objects, however here we do not follow that behavior to avoid unintended access to the identities.
249245
This is consistent with core cluster API selectors, e.g., Machine and ClusterResourceSet selectors. The result of matchLabels and matchExpressions are ANDed.
250246

251247

exp/controlleridentitycreator/awscontrolleridentity_controller_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import (
2929
infrav1 "sigs.k8s.io/cluster-api-provider-aws/api/v1beta1"
3030
)
3131

32-
func TestAWSInstanceStateController(t *testing.T) {
33-
t.Run("should maintain list of cluster queue URLs and reconcile failing machines", func(t *testing.T) {
32+
func TestAWSControllerIdentityController(t *testing.T) {
33+
t.Run("should create AWSClusterControllerIdentity when identityRef is not specified", func(t *testing.T) {
3434
g := NewWithT(t)
3535
ctx := context.Background()
3636

0 commit comments

Comments
 (0)