Skip to content

Feature Request: Support for non-standard top-level fields in CRDs (e.g. .report) in kubernetes_crd table #321

@JZacharie

Description

@JZacharie

Hello 👋,

First of all, thanks for your amazing work on Steampipe and the Kubernetes plugin.

📘 Context
I’m working with some Custom Resource Definitions (CRDs) in Kubernetes which define non-standard top-level fields such as .report, outside of the usual spec and status fields.

I noticed that the current CRDResourceInfo struct used in the plugin includes the following fields:

https://github.com/turbot/steampipe-plugin-kubernetes/blob/main/kubernetes/table_kubernetes_custom_resource.go

type CRDResourceInfo struct {
	Name              interface{}
	UID               interface{}
	CreationTimestamp interface{}
	Kind              interface{}
	APIVersion        interface{}
	Namespace         interface{}
	Annotations       interface{}
	Spec              interface{}
	Labels            interface{}
	Status            interface{}
	Path              string
	StartLine         int
	EndLine           int
	SourceType        string
	ContextName       string
}

This structure doesn’t include a way to retrieve additional custom fields like .report when querying via SQL.

💡 Feature Request
Would it be possible to add support for accessing additional top-level fields — for example by adding a new field in the struct such as:

Report interface{} … or even better, make the structure dynamic enough to include any top-level keys beyond the standard ones?

This would allow us to query CRDs like this via SQL:

select name, report from kubernetes_crd where kind = 'MyCustomResource'
🙋‍♂️ Question
Is such a change feasible within the current architecture of the plugin?

Is there a workaround today that would allow me to access .report fields or arbitrary custom fields in CRDs via Steampipe?

If not, I would be happy to contribute or test such a feature if needed.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeststaleNo recent activity has been detected on this issue/PR and it will be closed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions