landscaper
landscaper copied to clipboard
Feature Request: per-namespace apply
I noticed that landscaper supports the --namespace
option for setting the namespace a helm chart is deployed to. To be clear - this is not what I'm after....
I would like landscaper to be able to do diffs based on a namespace.
eg.
namespace-foo>
deployment1.yaml
deployment2.yaml
namespace-bar>
deployment3.yaml
deployment4.yaml
currently, if landscaper knows about deployments1-4, there's no way to only consider/diff/apply changes to a particular namespace only.
eg. I change all of the deployments, but I only want to consider "namespace-bar" changes for landscaping right now.
I could then do
landscaper apply --only-namespace namespace-bar *.yaml
and only changes to deployment3-4 would be applied
My use case is I have multiple teams, each working in different namespaces. With landscaper currently, a mistake by one team can block deployments in another team. Applying by namespace would solve this.
thanks
James M
Hi James,
How are you organising your landscape component files? We had a similar challenge with multiple namespaces in our repository, so now we use a directory per namespace. Then our release manager landscapes each namespace independently when changes are made to that directory.
Cheers, John.
I do have a directory per namespace. However, landscaper tries to remove all deployments not in that directory/namespace if I only apply on a subset.
You can use the --disable=delete
flag. This will prevent deleting what is not in your subset.
Perhaps, but that's a manual workaround at best - not suitable for a CI process.