Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ProviderName is provider name for install. ProviderName = "query" // HelmReleaseKind is the kind of HelmRelease HelmReleaseKind = "HelmRelease" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppCollector ¶
type AppCollector struct {
// contains filtered or unexported fields
}
AppCollector collect resource created by application
func NewAppCollector ¶
func NewAppCollector(cli client.Client, opt Option) *AppCollector
NewAppCollector create a app collector
func (*AppCollector) CollectResourceFromApp ¶
func (c *AppCollector) CollectResourceFromApp() ([]Resource, error)
CollectResourceFromApp collect resources created by application
type FilterOption ¶
type FilterOption struct { Cluster string `json:"cluster,omitempty"` ClusterNamespace string `json:"clusterNamespace,omitempty"` Components []string `json:"components,omitempty"` }
FilterOption filter resource created by component
type HelmReleaseCollector ¶
type HelmReleaseCollector struct {
// contains filtered or unexported fields
}
HelmReleaseCollector HelmRelease resources collector
func NewHelmReleaseCollector ¶
func NewHelmReleaseCollector(cli client.Client, hr *unstructured.Unstructured) *HelmReleaseCollector
NewHelmReleaseCollector create a HelmRelease collector
func (*HelmReleaseCollector) CollectWorkloads ¶
func (c *HelmReleaseCollector) CollectWorkloads(cluster string) ([]*unstructured.Unstructured, error)
CollectWorkloads collect workloads of HelmRelease
type Option ¶
type Option struct { Name string `json:"name"` Namespace string `json:"namespace"` Filter FilterOption `json:"filter,omitempty"` }
Option is the query option
type PodCollector ¶
type PodCollector func(cli client.Client, obj *unstructured.Unstructured, cluster string) ([]*unstructured.Unstructured, error)
PodCollector collector pod created by workload
func NewPodCollector ¶
func NewPodCollector(gvk schema.GroupVersionKind) PodCollector
NewPodCollector create a PodCollector
type Resource ¶
type Resource struct { Cluster string `json:"cluster"` Component string `json:"component"` Revision string `json:"revision"` Object *unstructured.Unstructured `json:"object"` }
Resource refer to an object with cluster info
Click to show internal directories.
Click to hide internal directories.