Skip to content

Possibility to exclude folders and/or part of files #169

@steled

Description

@steled

Problem Statement

It would be great if you could exclude certain files specifically for drift detection.
It would also be great if you could exclude only certain parts of files, perhaps using regular expressions or something similar.

Proposed Solution

Currently our drift detection produces the following output:

--- infrastructure/environments/01-tst/01-kubeone-root/.envrc
+++ infrastructure/environments/00-dev/01-kubeone-root/.envrc
@@ -1,4 +1,4 @@
-export KUBECONFIG=kkp-tst-root-kubeconfig
+export KUBECONFIG=kkp-dev-root-kubeconfig
 source ../secrets/credentials.sh
 chmod 0600 ../secrets/kone-key-ecdsa
 /usr/bin/keychain --clear ../secrets/kone-key-ecdsa

For us it would be great to be able to exclude the file .envrc in both (source and target).
I think this could be also useful for terraform.tfvars file as they are environment specific directly in the folder.

Alternatives Considered

One "alternative" could be to have a whitelist per folder via - targetPaths: but I think this is not really useable for a lot of files.

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions