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

Add Kustomization that requires source filtering #487

Closed
wants to merge 1 commit into from

Conversation

allenporter
Copy link
Owner

Issue #483

@allenporter
Copy link
Owner Author

Without --sources

# flux-local get ks --path tests/testdata/cluster7/ 
NAME            PATH                                     
apps            tests/testdata/cluster7/flux/apps        
charts          tests/testdata/cluster7/flux/charts      
crds            tests/testdata/cluster7/flux/crds        
crds-traefik    tests/testdata/cluster7                  
flux-system     tests/testdata/cluster7/clusters/home    

With --sources

# flux-local get ks --path tests/testdata/cluster7/ --sources flux-system
NAME           PATH                                     
apps           tests/testdata/cluster7/flux/apps        
charts         tests/testdata/cluster7/flux/charts      
crds           tests/testdata/cluster7/flux/crds        
flux-system    tests/testdata/cluster7/clusters/home    

Copy link
Contributor

github-actions bot commented Jan 2, 2024

--- tests/testdata/cluster7/clusters/home Kustomization: flux-system/flux-system Kustomization: flux-system/crds

+++ tests/testdata/cluster7/clusters/home Kustomization: flux-system/flux-system Kustomization: flux-system/crds

@@ -0,0 +1,17 @@

+---
+apiVersion: kustomize.toolkit.fluxcd.io/v1
+kind: Kustomization
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: flux-system
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: crds
+  namespace: flux-system
+spec:
+  interval: 10m0s
+  path: /tests/testdata/cluster7/flux/crds
+  prune: true
+  sourceRef:
+    kind: GitRepository
+    name: flux-system
+
--- tests/testdata/cluster7/flux/crds Kustomization: flux-system/crds GitRepository: flux-system/traefik-source

+++ tests/testdata/cluster7/flux/crds Kustomization: flux-system/crds GitRepository: flux-system/traefik-source

@@ -0,0 +1,20 @@

+---
+apiVersion: source.toolkit.fluxcd.io/v1
+kind: GitRepository
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: crds
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: traefik-source
+  namespace: flux-system
+spec:
+  ignore: |
+    # exclude all
+    /*
+    # include crd directory
+    !/traefik/crds
+  interval: 12h
+  ref:
+    tag: v26.0.0
+  url: https://github.com/traefik/traefik-helm-chart.git
+
--- tests/testdata/cluster7/flux/crds Kustomization: flux-system/crds Kustomization: flux-system/crds-traefik

+++ tests/testdata/cluster7/flux/crds Kustomization: flux-system/crds Kustomization: flux-system/crds-traefik

@@ -0,0 +1,17 @@

+---
+apiVersion: kustomize.toolkit.fluxcd.io/v1
+kind: Kustomization
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: crds
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: crds-traefik
+  namespace: flux-system
+spec:
+  interval: 30m
+  prune: false
+  sourceRef:
+    kind: GitRepository
+    name: traefik-source
+  wait: true
+

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

Successfully merging this pull request may close these issues.

1 participant