Skip to content
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

Adds capability to provision directories on the EFS dynamically #732

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Commits on Aug 12, 2023

  1. Places AccessPointProvisioning behind a provisioner interface

    As a first step towards introducing a new provisioning method we
    need to introduce a new Interface called Provisioner. This allows us
    to simply call the Provision() method on structs that implement this
    interface, meaning we can expand the supported methods. This also
    means we can pull the GidAllocator out of the driver and into the
    AccessPointProvisioner which necessitated some test changes.
    
    GidAllocator may well move back into the driver later on as we may
    well need to share it across the different provisioners.
    jonathanrainer committed Aug 12, 2023
    Configuration menu
    Copy the full SHA
    beba66e View commit details
    Browse the repository at this point in the history
  2. Pulling the same trick with the DeleteVolume side of AccessPointProvi…

    …sioning
    
    Now that we have the interface we can move Deletion behind an interface method too.
    Now the stage is set to start refactoring the tests in controller_test.go as they
    cover a lot that isn't actually necessary and could be tested via the provisioner
    jonathanrainer committed Aug 12, 2023
    Configuration menu
    Copy the full SHA
    a80b71b View commit details
    Browse the repository at this point in the history
  3. Pulled out the GID/UID parsing mechanism into a FileSystemIdentityMan…

    …ager
    
    This way provisioning doesn't need to be concerned with how those the UID/GID
    are derived it can just take them on trust. Further it means that dealing
    with the GidAllocator is all done in one place and gets rid of lots
    of controller tests that were actually testing parsing logic effectively.
    jonathanrainer committed Aug 12, 2023
    Configuration menu
    Copy the full SHA
    fcc77f7 View commit details
    Browse the repository at this point in the history
  4. Moved tests that related to specific provisioning functionality to pr…

    …ovisioner_test.go
    
    Now that controller.go is smaller we don't need as many tests there and they're better
    served closer to the logic being tested. Now we've done this we can actually start
    adding new functionality and we may well expand/move further around the tests
    in controller_test.go if it becomes clear they're more suited to being tested
    by provisioners not the controller itself.
    jonathanrainer committed Aug 12, 2023
    Configuration menu
    Copy the full SHA
    9c03641 View commit details
    Browse the repository at this point in the history
  5. Adding first attempt at directory provisioning and moving controller …

    …tests closer to the provisioner
    jonathanrainer committed Aug 12, 2023
    Configuration menu
    Copy the full SHA
    167d896 View commit details
    Browse the repository at this point in the history
  6. Splitting up provisioner into the requisite parts

    Now we have an AccessPoint and Directory provisioner they should live in different files with their own tests.
    We also need an OsClient to stop us having to run the tests as root which could cause issues in CI/CD.
    
    Sets the directory permissions to 777 by default and doesn't set an
    owner to fix the problem of how users would know what UID/GID to use.
    Further fixes a problem where if an unmount failed it would delete the
    contents of the EFS.
    jonathanrainer committed Aug 12, 2023
    Configuration menu
    Copy the full SHA
    bc312cb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    8c6f5f5 View commit details
    Browse the repository at this point in the history
  8. Minor fixes

    jonathanrainer committed Aug 12, 2023
    Configuration menu
    Copy the full SHA
    10ffc84 View commit details
    Browse the repository at this point in the history