Add fix command to mutate and update IaC (#746)
* added fix command * update fix command to walk through the folder to find all files * added ability to add comment * fix comment prefix * trim whitespaces to the line * refactor update mutated file * remove filepath as is not needed anymore * remove filepath as is not needed anymore * remove timestamp and status if creation is null * added comments and fix tests * remove hardcoded mutation in config * revert comment deletion * separate mutated to success files * read multiple resources in a file and update both * Remove mutation in config.yaml
Showing
+289 -13
cmd/polaris/fix.go
0 → 100644
... | ... | @@ -19,6 +19,7 @@ require ( |
github.com/stretchr/testify v1.7.0 | ||
github.com/thoas/go-funk v0.9.1 | ||
golang.org/x/text v0.3.7 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b | ||
k8s.io/api v0.22.2 | ||
k8s.io/apimachinery v0.22.2 | ||
... | ... |
test/checks/cpuLimitsMissing/mutated.yaml
0 → 100644
test/checks/cpuRequestsMissing/mutated.yaml
0 → 100644
test/checks/hostIPCSet/mutated.yaml
0 → 100644
Please register or sign in to comment