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

Ignore swap (.swp) files in manifests folder #280

Closed
dnoland1 opened this issue Mar 29, 2019 · 3 comments
Closed

Ignore swap (.swp) files in manifests folder #280

dnoland1 opened this issue Mar 29, 2019 · 3 comments
Assignees
Labels
kind/enhancement An improvement to existing functionality
Milestone

Comments

@dnoland1
Copy link
Contributor

dnoland1 commented Mar 29, 2019

Describe the bug
I created a manifest in /var/lib/rancher/k3s/server/manifests/test.yaml and started k3s in server mode. Decided to edit the file using vi, which generates a .swp file in the same folder. This caused the following error message about every 15 seconds:

ERRO[2019-03-29T05:16:53.428115408Z] failed to process config: failed to process /var/lib/rancher/k3s/server/manifests/.test.yaml.swp: yaml: control characters are not allowed
ERRO[2019-03-29T05:17:08.429939965Z] failed to process config: failed to process /var/lib/rancher/k3s/server/manifests/.test.yaml.swp: yaml: control characters are not allowed

To Reproduce
See above

Expected behavior
Would be nice if .swp files were ignored. Not sure if it would make sense to have a whitelist of extensions like ".yml", ".yaml", etc. or a blacklist of extensions to ignore like ".swp", ".bak", etc.

Additional context
Discovered while testing #222

@erikwilson erikwilson added the kind/enhancement An improvement to existing functionality label Mar 29, 2019
@deniseschannon
Copy link

We should do the reverse in look for only .yml, .yaml and .json only files.

@deniseschannon
Copy link

and ignore any files that start with .

@deniseschannon deniseschannon added this to the v0.5.0 milestone Apr 11, 2019
@dnoland1 dnoland1 changed the title Ignore swap (.swp) files in manifest folders Ignore swap (.swp) files in manifests folder Apr 11, 2019
@dnoland1
Copy link
Contributor Author

dnoland1 commented May 3, 2019

Tested on v0.5.0-rc3 (21a9dbe). Successfully deployed files named test.yaml and test.yml by placing in /var/lib/rancher/k3s/server/manifests. Confirmed files with .swp and .txt were ignored. .test.yml was also ignored. Working as expected, closing issue.

@dnoland1 dnoland1 closed this as completed May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement An improvement to existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants