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

fix(config): Ignore config files with double dot in it (#696) #984

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vlaborie
Copy link

Summary

Ignore config files with double dot in it, permit to mount Kubernetes ConfigMap as directory and ignore hidden files like ..date/filename.yaml.

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

config/config.go Outdated
@@ -176,6 +176,10 @@ func LoadConfiguration(configPath string) (*Config, error) {
if err != nil {
return fmt.Errorf("error walking path %s: %w", path, err)
}
if strings.Contains(path, "..") {
logr.Warnf("[config.LoadConfiguration] Ignore configuration from %s", path)
Copy link
Owner

Choose a reason for hiding this comment

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

Can you update the log message to say "Ignoring" instead of ignore? (I'm on mobile and my laptop is currently out for repair, I'd have made the change myself otherwise)

Copy link
Author

Choose a reason for hiding this comment

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

I have update the message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants