I am new to flux and kustomize. Here is my repo setup:
total 32
drwxrwxr-x 14 user user 4096 May 1 17:01 base
-rw-rw-r-- 1 user user 143 May 15 10:42 kustomization.yaml
drwxrwxr-x 2 user user 4096 May 1 22:48 policy
drwxrwxr-x 4 user user 4096 May 15 10:26 dev
drwxrwxr-x 4 user user 4096 May 15 10:26 staging
The base
folder has the base configuration for each app. The policy
folder contains all my rego policies. The dev
and staging
folders have a ton of *.yaml
files to deploy my applications. The most important thing is that dev
and staging
are mirroring each other.
I would like to render all the yaml files in each environment and run conftest against the kustomization.yaml file which is at the root of my project. So my kustom file looks like this:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- staging/*
- production/*
Then I run kustomize build | conftest test -
The error I get:
Error: accumulating resources: 2 errors occurred:
* accumulateFile error: "accumulating resources from 'staging/*': evalsymlink failure on '/home/user/staging/*' : lstat /home/user/staging/*: no such file or directory"
* loader.New error: "error loading staging/* with git: url lacks host: staging/*, dir: evalsymlink failure on '/home/user/staging/*' : lstat /home/user/staging/*: no such file or directory, get: invalid source string: staging/*"
7 tests, 7 passed, 0 warnings, 0 failures, 0 exceptions
I am not so sure what I doing wrong and would appreciate some feedback. Thanks