<p>I could not understand what the package can do, the offical doc show nothing about <code>unstructured</code>. What the package used for ? Is it used for converting map[string]interface{} to K8S Obj ?</p>

<p><a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" rel="nofollow noreferrer">https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured</a></p>

<p>As @kseniia-churiumova suggested it is used when you don't know the object type. Here is the use case to understand it better. Let us say your organisation has a policy that all Kubernetes object must have annotation &quot;owner&quot; with value pointing to email ID of a person or group. You have tasked with finding all the resources that violates this policy.</p>
<p>You can have a configuration file that has list of <code>GroupVersionKind</code> and use unstructured to query them. If a new type needs a check you can add to configuration without changing the code.</p>
<p><strong>Note:</strong> This is just an example. In production you will have to use something like Gatekeeper that implements OPA specification to enforce policies.</p>
