Calamari icon indicating copy to clipboard operation
Calamari copied to clipboard

Make KOS able to handle resources without namespaces

Open ghost opened this issue 2 years ago • 1 comments

Sometimes customers need to deploy resources that are cluster-scoped, which do not have namespaces. Currently these resources result in a kubectl get <kind> <name> -n command being sent, which is invalid because the namespace argument -n must have a value.

This PR fixes this issue by filtering out the resources that are cluster-scoped. When we have cluster-scoped resources, we exclude them from the KOS and do not show them to the customer. Instead we note them down in the task log, and tell the customer that those are not checked against.

Assuming we are using this YAML which deploys a cluster-scoped resource: Screenshot 2023-08-29 at 3 00 33 PM

Before

Screenshot 2023-08-29 at 3 32 27 PM

After

Screenshot 2023-08-29 at 4 29 13 PM

ghost avatar Aug 29 '23 06:08 ghost

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Yihao seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Nov 30 '23 14:11 CLAassistant