You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=== Forwarding logs to Amazon CloudWatch from STS enabled clusters
57
62
58
63
For clusters with AWS Security Token Service (STS) enabled, you can create an AWS service account manually or create a credentials request by using the
This procedure explains how to configure the AWS EFS CSI Driver Operator with {product-title} on AWS Secure Token Service (STS).
12
12
13
-
Perform this procedure before you have installed the AWS EFS CSI Operator, but not yet installed the AWS EFS CSI driver as part of the _Installing the AWS EFS CSI Driver Operator_ procedure.
13
+
Perform this procedure before you have installed the AWS EFS CSI Operator, but not yet installed the AWS EFS CSI driver as part of the _Installing the AWS EFS CSI Driver Operator_ procedure.
14
14
15
15
[IMPORTANT]
16
16
====
@@ -23,125 +23,152 @@ If you perform this procedure after installing the driver and creating volumes,
23
23
* AWS account credentials
24
24
* You have installed the AWS EFS CSI Operator.
25
25
26
-
.Procedure
27
-
28
-
To configure the AWS EFS CSI Driver Operator with STS:
29
26
30
-
// The on-prem version of this step is documented in the cco-ccoctl-configuring procedure.
31
-
. Extract the CCO utility (`ccoctl`) binary from the Cloud Credential Operator.
27
+
.Procedure
32
28
33
-
.. Find the pod on which the Cloud Credential Operator is running.
29
+
. Prepare the AWS account:
30
+
.. Create an IAM policy JSON file with the following content:
31
+
+
32
+
[source,json]
33
+
----
34
+
{
35
+
"Version": "2012-10-17",
36
+
"Statement": [
37
+
{
38
+
"Effect": "Allow",
39
+
"Action": [
40
+
"elasticfilesystem:DescribeAccessPoints",
41
+
"elasticfilesystem:DescribeFileSystems",
42
+
"elasticfilesystem:DescribeMountTargets",
43
+
"ec2:DescribeAvailabilityZones"
44
+
],
45
+
"Resource": "*"
46
+
},
47
+
{
48
+
"Effect": "Allow",
49
+
"Action": [
50
+
"elasticfilesystem:CreateAccessPoint"
51
+
],
52
+
"Resource": "*",
53
+
"Condition": {
54
+
"StringLike": {
55
+
"aws:RequestTag/efs.csi.aws.com/cluster": "true"
56
+
}
57
+
}
58
+
},
59
+
{
60
+
"Effect": "Allow",
61
+
"Action": "elasticfilesystem:DeleteAccessPoint",
62
+
"Resource": "*",
63
+
"Condition": {
64
+
"StringEquals": {
65
+
"aws:ResourceTag/efs.csi.aws.com/cluster": "true"
66
+
}
67
+
}
68
+
}
69
+
]
70
+
}
71
+
----
72
+
73
+
.. Create an IAM trust JSON file with the following content:
<1> Replace `policy_ARN` with the output you saved while creating the policy.
69
148
70
-
. Create and save an EFS `CredentialsRequest` YAML file, such as shown in the following example:
149
+
. Create a `Secret` YAML file for the driver operator:
71
150
+
72
-
.Example
73
151
[source,yaml]
74
152
----
75
-
apiVersion: cloudcredential.openshift.io/v1
76
-
kind: CredentialsRequest
153
+
apiVersion: v1
154
+
kind: Secret
77
155
metadata:
78
-
name: openshift-aws-efs-csi-driver
79
-
namespace: openshift-cloud-credential-operator
80
-
spec:
81
-
providerSpec:
82
-
apiVersion: cloudcredential.openshift.io/v1
83
-
kind: AWSProviderSpec
84
-
statementEntries:
85
-
- action:
86
-
- elasticfilesystem:*
87
-
effect: Allow
88
-
resource: '*'
89
-
secretRef:
90
-
name: aws-efs-cloud-credentials
91
-
namespace: openshift-cluster-csi-drivers
92
-
serviceAccountNames:
93
-
- aws-efs-csi-driver-operator
94
-
- aws-efs-csi-driver-controller-sa
95
-
----
96
-
97
-
. Run the `ccoctl` tool to generate a new IAM role in AWS, and create a YAML file for it in the local file system (`<path_to_ccoctl_output_dir>/manifests/openshift-cluster-csi-drivers-aws-efs-cloud-credentials-credentials.yaml`).
* `name=<name>` is the name used to tag any cloud resources that are created for tracking.
106
-
107
-
* `region=<aws_region>` is the AWS region where cloud resources are created.
108
-
109
-
* `dir=<path_to_directory_with_list_of_credentials_requests>/credrequests` is the directory containing the EFS CredentialsRequest file in previous step.
110
-
111
-
* `<oidc_provider_arn>` is the ARN for the OIDC provider that associates with your cluster.
0 commit comments