-
Notifications
You must be signed in to change notification settings - Fork 122
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
Bug #1993439 - Changing search depth and output to mount scripts if needed via ConfigMap #121
Conversation
… a ConfigMap or in sub-directories to consider them as well and run them according the process_extending_files() function. That will allow users to mount custom scripts in Kubernetes via ConfigMap and thus prevent specific builds to add the necessary scripts.
Can one of the admins verify this patch? |
2 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
[test] |
@phracek are you able to review this case ? |
[test-all] |
[test-openshift-4] |
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.
@sreber84 Can you please explain your changes a bit more?
@@ -120,7 +120,7 @@ function get_matched_files() { | |||
default_dir="$2" | |||
files_matched="$3" | |||
find "$default_dir" -maxdepth 1 -type f -name "$files_matched" -printf "%f\n" | |||
[ -d "$custom_dir" ] && find "$custom_dir" -maxdepth 1 -type f -name "$files_matched" -printf "%f\n" | |||
[ -d "$custom_dir" ] && find "$custom_dir" -maxdepth 5 -type f -name "$files_matched" -printf "%p\n" |
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.
@sreber84 Why did you increase the depth to 1? I don't follow this. Can you please explain it a bit more?
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.
What about using some recursive approach instead of increasing maxdepth?
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 validated certain changes and found this most feasible as it it does not change the code too much and helps to overcome the fact that we need to look into sub directories when mounting a ConfigMap
or secret
with the data. But I can certainly also check for a more feasible approach that takes recursive search into consideration.
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.
@sreber84 Any update so we can merge it?
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.
@sreber84 How can I validate, that your change works well?
[test-openshift] |
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.
LGTM
@sreber84 Please rebase this pull request including |
[test-all] |
RHBZ #1993439 changing search to make sure we find files mounted from a ConfigMap or in sub-directories to consider them as well and run them according the process_extending_files() function. That will allow users to mount custom scripts in Kubernetes via ConfigMap and thus prevent specific builds to add the necessary scripts.