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

glob matching does not support files nested in subdirectories #3499

Closed
jessesuen opened this issue Feb 13, 2025 · 2 comments · Fixed by #3513
Closed

glob matching does not support files nested in subdirectories #3499

jessesuen opened this issue Feb 13, 2025 · 2 comments · Fixed by #3513

Comments

@jessesuen
Copy link
Member

Description

I have the following GitOps directory structure. I would like my Warehouse to create Freight on any changes under env/* including files in subdirectories.

.
├── base
│   ├── guestbook-deploy.yaml
│   ├── guestbook-ns.yaml
│   ├── guestbook-svc.yaml
│   └── kustomization.yaml
├── env
│   ├── dev
│   │   └── kustomization.yaml
│   ├── prod
│   │   ├── increase-replicas.yaml
│   │   └── kustomization.yaml
│   └── staging
│       ├── increase-replicas.yaml
│       └── kustomization.yaml

I tried the following in include paths: glob:env/*, but it did not detect a change I made to env/prod/increase-replicas.yaml, which is in a subdirectory of env.

apiVersion: kargo.akuity.io/v1alpha1
kind: Warehouse
metadata:
  name: config
  namespace: kargo-rendered-branches
spec:
  subscriptions:
  - git:
      repoURL: https://github.com/jessesuen/kargo-rendered-branches.git
      branch: main
      includePaths:
      - glob:env/*

Steps to Reproduce

The above Warehouse will not detect changes to env/xxxxx/modified-file.yaml

Workaround is to use regex

Version

v1.2.2

Logs

Paste any relevant application logs here.
@jessesuen
Copy link
Member Author

Workaround is to use regex:

apiVersion: kargo.akuity.io/v1alpha1
kind: Warehouse
metadata:
  name: config
  namespace: kargo-rendered-branches
spec:
  subscriptions:
  - git:
      repoURL: https://github.com/jessesuen/kargo-rendered-branches.git
      branch: main
      includePaths:
      - regex:env/.*

@krancour
Copy link
Member

@hiddeco assigned you tentatively, because I believe you already have all the context on this one, but this isn't higher priority than anything currently on our plate.

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

Successfully merging a pull request may close this issue.

3 participants