-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
deployment path as local dir #545
base: main
Are you sure you want to change the base?
Conversation
I'm trying to understand your initial requirement here. What do you mean with "additional" processing? |
In the example (additional processing) means I do load some vars files. Regarding patch: Understand today, the deployment.yml must be one folder above the kustomization.yml code (they can't co-exist in the same folder). I will post some example this week. Assume I have some "shared" folder ("to/some") with generic service deployment that I will refer from some For a good reason I dont want to structure my folders "to/some/kustomization" just because deplyment.yml must be one folder above, so it can by path: ./xxx refer the place where kustomization.yml is. |
minor fix force-pushed in.. |
The way I understand you is that you want to have a shared kustimization with a set of shared variables attached to it, all while NOT having the kustomization below a sub-deployment (with just a deployment.yaml and the vars). Is this correct? I'm not sure that his is worth the additional effort and risks being introduced. For example, the templating engine currently expects to work on deployment-item (a kustomization) level, meaning that it renders the whole directly in one go. At the same time, the When we start to mix sub-deployments with deployment-items, we'd start to render files multiple times. This can easily lead to unexpected behaviour. |
Based on what I wrote before: Right now, it is not explicitly forbidden to mix deployment-items and sub-deployments, it simply fails at some point. This should also be re-considered. |
Well you made good point. Certainly I little experiment with structuring the repo/model input for kluctl. First aimed to two approaches:
That's why is required for simplicity. I anyway have workaround for the below as
To answer you problem with mixing sub-deployments. Yes I have hit that (they just render once, or render each time depends how configured). And you are right this is not good pattern. Today I dont mix subdeployments and if then it;s for different target/cluster. The reason for "experiment with structuring the repo/model input" is that I tend to have configuration parameters (vars) somewhere at top level, rather then partially in each deployment.yml across several folders for these reasons:
Top-down approach requires me to introduce some "patch" that will to "all" apps introduce some certain config (like ingress config or storageClass/persistence setup). While application deployment code remains simple, prone to extra templating, having space for others to reuse my "app deployment example" on their deployments with (their overrides) without having to deal with resources they dont need or interpolation/params they are not interested with. (as mentioned, will share some deployment repo with you this week, possibly we could have some short zoom call to discuss) |
@codablock pls check "non-working" export from "working" setup": |
This is what is requested to work: |
looks like I will need to rebase this.. |
Description
Allow this on deployment.yml so the folder with code can be referenced either as include while allowing additional processing). I use this for shared artefacts.
In one folder to have:
deployment.yml
kustomization.yml
The future improvements could be to translate "." to actual folder (include path name). I wanted to have this MR simple as possible, so avoided for now.
Type of change
Please delete options that are not relevant.
I count to post some examples with the deployment later to example repo. Does not need dedicated documentation change. IMO.