-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Is your feature request related to a problem? Please describe.
From the source code, it was identified that:
- identifier for a cluster is
metadata.uid
for the namespacekube-system
- identifier for other namespaced resource is the
metadata.uid
of the namespace the resource belongs to
We have a use-case where the K8s assets in a workspace are ephemeral in nature. That is, we create a cluster and scan it before destroying it.
The problem is they all show up in console with the same cluster name. However, the intention is to have the cluster name as a unique identifier. And when a scan is performed by passing the identifier as a argument, the result in console should be a rescan of the cluster, rather than a new cluster asset.
Describe the solution you'd like
A clear and concise description of what you want to happen.
When a k8s cluster is scanned using cnspec scan k8s
, there must be an option to pass an argument that overrides the identification of a cluster from namespace UID to something defined by the user.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Currently, a hacky method is used where etcd
snapshot of a cluster is used to restore it so that the UIDs of the namespace remain consistent