-
Notifications
You must be signed in to change notification settings - Fork 457
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
Enhance helper Pod interface and configuration. #166
Enhance helper Pod interface and configuration. #166
Conversation
helperPod.Spec.Containers[0].Args = []string{"-p", filepath.Join(parentDir, volumeDir), | ||
"-s", strconv.FormatInt(sizeInBytes, 10), | ||
"-m", volumeMode} |
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.
This is a breaking change! The helper script options have been replaced by environment variables.
Reading these options within a setup
/teardown
script is pretty cumbersome as the previous examples show.
Also I'd like to avoid redundant code within these scripts and therefore be able to simply call the setup
script from the teardown
script as within my cache
example - in the absence of a common
script that both scripts could use.
Therefore I propose to use environment variables for these parameters instead. Also env vars potentially provide better backward compatibility than options (imagine sb builds a binary using a CLI framework: it would fail by default when new/unknown options are added while, when using env vars, this is not a problem).
I adjusted the examples correspondingly.
Alternatively we could leave the options here for now in addition to the env vars, deprecate the options somehow and remove them later. Though eventually we can remove them now since the feature is pretty young anyway and not many people may rely on it yet.
@nicktming this affects the changes you introduced in #127.
WDYT?
FlagConfigMapName = "configmap-name" | ||
EnvConfigMapName = "CONFIGMAP_NAME" | ||
FlagHelperPodFile = "helper-pod-file" | ||
DefaultHelperPodFile = "helper-pod.yaml" |
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.
This is another breaking change: renamed helperPod.yaml
to helper-pod.yaml
. I could revert that one but the lower case notation is more convenient for a file name than the camel case notation and if we break sth here already we might as well break this one now.
9201b02
to
0dbf8c9
Compare
6320315
to
9818353
Compare
@yasker please have a look |
a124294
to
e821731
Compare
I just rebased this PR and resolved the conflicts. |
Thanks for the contribution. It looks you want to solve several issues or enhancements, so I would suggest to seperate this PR first, so we can focus on each problem you are resolving and it will be better for review. |
@innobead okay. Now I created the following separate PRs:
Once #176 and #177 are merged I'll rebase and refine this PR or create another PR for #164 and eventually add the example from this PR to it (using more compact setup/teardown scripts). |
8c77288
to
654c7bd
Compare
* Make the helper Pod receive only environment variables instead of args (this changes the interface in a non-backward compatible way but is simpler to use and potentially provides more backward compatibility in the future). * Adds the manager options `--pvc-annotation[-required]` to pass through annotations from the PVC to the PV and to the helper Pod. * Merge the helper Pod's `data` VolumeMount with the one provided with the template to be able to specify `mountPropagation` within the template. * Rename `helperPod.yaml` to `helper-pod.yaml` (more convenient and if we break sth we can break this as well). * Expose `--helper-pod-timeout` option. * Provide a basic usage example of the new features (`examples/cache`). * Support forceful termination of the manager binary (2xCtrl+c - since this is annoying during development otherwise). Closes rancher#164 Closes rancher#165 Signed-off-by: Max Goltzsche <[email protected]>
654c7bd
to
4e7b93f
Compare
* Replaces local-path-provisioner since its maintainers didn't merge any of my PRs, see rancher/local-path-provisioner#166. * Adds manifest that includes an image registry.
In regards to #177 having been merged. I'm getting the following err: In the local-path helper Sure enough I haven't provided this Thank you very much. |
Thanks for your finding. The reason is that the You can please use |
Yeah! That made it work! Thank you very much @derekbit |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
This PR was closed because it has been stalled for 10 days with no activity. |
--pvc-annotation[-required]
to pass through annotations from the PVC to the PV and to the helper Pod (Pass through PVC annotations to the helper Pod as env vars #164).data
VolumeMount with the one provided with the template to be able to specifymountPropagation
within the template (Allow to configure helper Pod's data volume mount propagation #165).helperPod.yaml
tohelper-pod.yaml
(more convenient and if we break sth we can break this as well).--helper-pod-timeout
option (Make the helper Pod timeout configurable #178).examples/cache
).Closes #164.
Closes #165.
Closes #175.
Closes #178.
Relates to #179.
Relates to #127.