-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #488 from kbasv/docUpdate
Update cross account mount example with specs and add missing setup step
- Loading branch information
Showing
7 changed files
with
116 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...bernetes/cross_account_mount/iam-policy-examples/cross-account-assume-policy-example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": { | ||
"Effect": "Allow", | ||
"Action": "sts:AssumeRole", | ||
"Resource": "arn:aws:iam::123456789012:role/EFSCrossAccountAccessRole" | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...les/kubernetes/cross_account_mount/iam-policy-examples/describe-mount-target-example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Sid" : "Stmt1DescribeMountTargets", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"elasticfilesystem:DescribeMountTargets" | ||
], | ||
"Resource": "arn:aws:elasticfilesystem:us-west-2:123456789012:file-system/file-system-ID" | ||
}, | ||
{ | ||
"Sid" : "Stmt2AdditionalEC2PermissionsToDescribeMountTarget", | ||
"Effect": "Allow", | ||
"Action": [ | ||
"ec2:DescribeSubnets", | ||
"ec2:DescribeNetworkInterfaces" | ||
], | ||
"Resource": "*" | ||
} | ||
] | ||
} |
15 changes: 15 additions & 0 deletions
15
...kubernetes/cross_account_mount/iam-policy-examples/node-deamonset-iam-policy-example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"elasticfilesystem:ClientMount", | ||
"elasticfilesystem:ClientRootAccess", | ||
"elasticfilesystem:ClientWrite", | ||
"elasticfilesystem:DescribeMountTargets" | ||
], | ||
"Resource": "*" | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
examples/kubernetes/cross_account_mount/iam-policy-examples/trust-relationship-example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Principal": { | ||
"AWS": "arn:aws:iam::<Aws-accountId-A>:root" | ||
}, | ||
"Action": "sts:AssumeRole", | ||
"Condition": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: efs-claim | ||
spec: | ||
accessModes: | ||
- ReadWriteMany | ||
storageClassName: efs-sc | ||
resources: | ||
requests: | ||
storage: 5Gi | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: efs-app | ||
spec: | ||
containers: | ||
- name: app | ||
image: centos | ||
command: ["/bin/sh"] | ||
args: ["-c", "while true; do echo $(date -u) >> /data/out; sleep 5; done"] | ||
volumeMounts: | ||
- name: persistent-storage | ||
mountPath: /data | ||
volumes: | ||
- name: persistent-storage | ||
persistentVolumeClaim: | ||
claimName: efs-claim |
15 changes: 15 additions & 0 deletions
15
examples/kubernetes/cross_account_mount/specs/storageclass.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
kind: StorageClass | ||
apiVersion: storage.k8s.io/v1 | ||
metadata: | ||
name: efs-sc | ||
provisioner: efs.csi.aws.com | ||
parameters: | ||
provisioningMode: efs-ap | ||
fileSystemId: fs-92107410 | ||
directoryPerms: "700" | ||
gidRangeStart: "1000" # optional | ||
gidRangeEnd: "2000" # optional | ||
basePath: "/dynamic_provisioning" # optional | ||
az: us-east-1a | ||
csi.storage.k8s.io/provisioner-secret-name: x-account | ||
csi.storage.k8s.io/provisioner-secret-namespace: kube-system |