Skip to content

[Feature Request]: Collect extra-manifests recursive #1313

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

Closed
markusheinemann opened this issue Apr 8, 2024 · 2 comments
Closed

[Feature Request]: Collect extra-manifests recursive #1313

markusheinemann opened this issue Apr 8, 2024 · 2 comments

Comments

@markusheinemann
Copy link
Contributor

markusheinemann commented Apr 8, 2024

Background

I want to deploy multiple initial workloads on my new cluster after creation. They need to be deployed in different namespaces. This can be archived with a kustomize feature by using a common base. So I leveraged a folder structure for my extra-manifests:

.
├── extra-manifests/
│   ├── app1/
│   │   └── kustomization.yaml.tpl
│   ├── app2/
│   │   └── kustomization.yaml.tpl
│   └── kustomization.yaml.tpl
└── kube.tf

The purpose of extra-manifests/kustomization.yaml.tpl is to import extra-manifests/app1/kustomization.yaml.tpl and extra-manifests/app2/kustomization.yaml.tpl

Issue

Unfortunately, kube-hetzner does not copy subfolders from extra-manifests to the nodes which results in an error when executing the custom manifests:

error: accumulating resources: accumulation err='accumulating resources from 'app1': evalsymlink failure on '/var/user_kustomize/app1' : lstat /var/user_kustomize/app1: no such file or directory': must build at directory: not a valid directory: evalsymlink failure on '/var/user_kustomize/app1' : lstat /var/user_kustomize/app1: no such file or directory

Proposal

Recursive consideration of user-defined kubernetes manifests so that files from subfolders are copied correctly.

I think this feature can be implemented very easily by updating the respective fileset tofileset("extra-manifests", "**/*.yaml.tpl"):

user_kustomization_templates = try(fileset("extra-manifests", "*.yaml.tpl"), toset([]))

@markusheinemann
Copy link
Contributor Author

I will test the changes and create PR to validate the solution

@markusheinemann
Copy link
Contributor Author

markusheinemann commented May 2, 2024

Solved with #1314

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

No branches or pull requests

1 participant