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

Started treating the efs-utils config dir stateful and also handles the static files installed at image build time #212

Merged
merged 3 commits into from
Jul 14, 2020

Conversation

jqmichael
Copy link
Contributor

@jqmichael jqmichael commented Jul 9, 2020

Is this a bug fix or adding new feature?
/feature

What is this PR about? / Why do we need it?
This PR added #196 back by only patching node.yaml in the dev overlay.

This PR also start treating the efs-utils config directory stateful and handles static files installed at image build time.

At image build time, static files installed by efs-utils in the config directory, i.e. CAs file, need to be saved in another place so that the other stateful files created at runtime, i.e. private key for client certificate, in the same config directory can be persisted to host with a host path volume. Otherwise creating a host path volume for that directory will clean up everything inside at the first time. Those static files need to be copied back to the config directory when the driver starts up.

What testing is done?
Tested by verifying both tls and non-tls mount installed by 0.3.0 driver can be safely upgraded to the latest driver code without much interruption (other than during the downtime of the old driver).

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 9, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @jqmichael. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 9, 2020
@jqmichael jqmichael changed the title Make config dir stateful Started treating the efs-utils config dir stateful and also handles the static files installed at image build time Jul 9, 2020
@wongma7 wongma7 self-assigned this Jul 10, 2020
@wongma7
Copy link
Contributor

wongma7 commented Jul 10, 2020

/ok-to-test

@jqmichael jqmichael force-pushed the makeConfigDirStateful branch from 196d946 to ef73e41 Compare July 10, 2020 20:47
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 10, 2020
@wongma7
Copy link
Contributor

wongma7 commented Jul 10, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 10, 2020
@jqmichael jqmichael force-pushed the makeConfigDirStateful branch from ef73e41 to fbe58a9 Compare July 10, 2020 21:15
version = flag.Bool("version", false, "Print the version and exit")
endpoint = flag.String("endpoint", "unix://tmp/csi.sock", "CSI Endpoint")
version = flag.Bool("version", false, "Print the version and exit")
efsUtilsCfgDirPath = flag.String("efs-utils-config-dir-path", "/etc/amazon/efs/", "The path to efs-utils config directory")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm are these flags needed, would a user ever want to change them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was expecting users would like to change them when running the driver locally for testing (in order to do that we should not talk to IMDS always, instead passing instanceId and region from a flag).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

efs-utils will always read from /etc/amazon/efs, I think this is just going to confuse people because changing it doesn't actually do anything. All that happens is the driver will copy the files from static path to a different path. But I only know that from looking at the code, a user is not going to know or care

@jqmichael jqmichael force-pushed the makeConfigDirStateful branch from fbe58a9 to 2859933 Compare July 10, 2020 21:20
@wongma7
Copy link
Contributor

wongma7 commented Jul 10, 2020

lgtm, just having second thoughts about the flags if they are needed only for debugging purposes or what

@jqmichael jqmichael force-pushed the makeConfigDirStateful branch from 2859933 to 277a5c9 Compare July 10, 2020 22:08
@wongma7
Copy link
Contributor

wongma7 commented Jul 13, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 13, 2020
@wongma7
Copy link
Contributor

wongma7 commented Jul 13, 2020

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jqmichael, wongma7

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 13, 2020
@k8s-ci-robot k8s-ci-robot merged commit 3027849 into kubernetes-sigs:master Jul 14, 2020
@wongma7 wongma7 mentioned this pull request Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants