-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add ability to use EFS access points #339
Conversation
85a14a5
to
5c417b3
Compare
examples/deadline/All-In-AWS-Infrastructure-Basic/python/package/lib/service_tier.py
Show resolved
Hide resolved
5c417b3
to
f87543e
Compare
@@ -75,6 +98,23 @@ export class MountableEfs implements IMountableLinuxFilesystem { | |||
throw new Error('Target instance must be Linux.'); | |||
} | |||
|
|||
target.node.addDependency(this.props.filesystem.mountTargetsAvailable); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work if it's target.node?.
? Or, alternatively, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty ?
Then we don't have to change the definition of IMountingInstance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think MountableEfs
already requires a construct, unless I'm mistaken. It needs to be able to modify the IMountingInstance
's user data, right? On that basis, there should be no harm in this addition. Perhaps I'm missing some corner case though...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember there was a reason that I didn't put IConstruct
in the original definition. I don't recall what that reason was... some corner case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I should be able to use Construct.isConstruct(...)
. Changing to that....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one inconsistency in an upgrade doc example, otherwise it looks good to me!
- Allows instances to access EFS with a specified UID/GID BREAKING CHANGE: Repository constructs supplied with an EFS file-system must also pass an EFS Access Point - If your application provides an EFS file-system to a Repository construct, it must now also pass an EFS Access Point to work properly with the Deadline container images. - Consult https://github.com/aws/aws-rfdk/blob/v0.27.0/packages/aws-rfdk/docs/upgrade/upgrading-0.27.md for detailed instructions on how to upgrade
f87543e
to
8735690
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Thanks Josh!
Summary
This change modifies the
MountableEfs
class to accept an optionalaccessPoint
property. When specified, the construct will generate user data that mounts the EFS file-system using the access point.This allows the process accessing the file-system to use a UID/GID different than what UID/GID of the user running the process on the file-system mount.
Additional Changes
The AWS-all-in-basic examples were modified to use EFS access points.
Testing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license