Skip to content

ArtifactGenerator: exclude patterns fail to filter directories #306

Description

@noambenm

Description:
In source-watcher v2.0.3, the exclude logic in ArtifactGenerator is not working for paths other than "**/dir/**"

Environment:

  • Version: ghcr.io/fluxcd/source-watcher:v2.0.3
  • Resource: ArtifactGenerator

Reproduction Steps:

  1. Define an ArtifactGenerator with a subtree selection:
        spec:
          artifacts:
            - name: infrastructure
              copy:
                - from: "@monorepo/infrastructure/**"
                  to: "@artifact/"
                  exclude:
                    - "infrastructure/controllers/descheduler/**"
  1. Observe the generated artifact.
  2. Actual Behavior: The descheduler files are still present in the artifact and is being deployed.
  3. Expected Behavior: The files should be excluded as the pattern matches the path relative to the source alias.

I have tried every possible other path, but no success, the resources are still being deployed., I would love to know if there is another way to specify the full path of the directories and not use "**/dir/**". my repo is structured exactly like the flux2-kustomize-helm-example repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions