Documentation ¶
Index ¶
- Constants
- Variables
- func Cmd() *cobra.Command
- func InformKubeObjects(ctx context.Context, pub pubsub.Publisher, informer cache.SharedIndexInformer, ...)
- func InformersFactoryFromCtx(ctx context.Context) informers.SharedInformerFactory
- func RookClientFromCtx(ctx context.Context) *rookclientset.Clientset
- type Config
- type ConfigNodes
- type ConfigStorage
- type Exclude
- type ExcludeNodeStorage
- type ExcludeNodesStorage
- type ExcludeRules
- type QuerierCluster
- type QuerierNodes
- type QuerierStorage
- type RegistryGPUDevice
- type RegistryGPUDevices
- type RegistryGPUVendor
- type RegistryGPUVendors
- type RemotePodCommandExecutor
- type Watcher
Constants ¶
View Source
const ( FlagAPITimeout = "api-timeout" FlagQueryTimeout = "query-timeout" FlagRESTPort = "rest-port" FlagGRPCPort = "grpc-port" FlagPodName = "pod-name" FlagPodNamespace = "pod-namespace" FlagConfig = "config" FlagProviderConfigsURL = "provider-configs-url" FlagPciDbURL = "provider-pcidb-url" FlagRegistryQueryPeriod = "registry-query-period" FlagDiscoveryImage = "discovery-image" )
View Source
const ( CtxKeyRookClientSet = fromctx.Key("rook-clientset") CtxKeyStorage = fromctx.Key("storage") CtxKeyFeatureDiscovery = fromctx.Key("feature-discovery") CtxKeyInformersFactory = fromctx.Key("informers-factory") CtxKeyHwInfo = fromctx.Key("hardware-info") CtxKeyClusterState = fromctx.Key("cluster-state") CtxKeyConfig = fromctx.Key("config") )
Variables ¶
View Source
var (
ErrMetricsUnsupportedRequest = errors.New("unsupported request method")
)
Functions ¶
func InformKubeObjects ¶
func InformersFactoryFromCtx ¶
func InformersFactoryFromCtx(ctx context.Context) informers.SharedInformerFactory
func RookClientFromCtx ¶
func RookClientFromCtx(ctx context.Context) *rookclientset.Clientset
Types ¶
type Config ¶
type Config struct { Version semver.Version `json:"version" yaml:"version"` ClusterStorage []string `json:"cluster_storage" yaml:"cluster_storage"` Exclude Exclude `json:"exclude" yaml:"exclude"` // contains filtered or unexported fields }
func ConfigFromCtx ¶
func (*Config) FilterOutStorageClasses ¶
func (*Config) HasStorageClass ¶
func (*Config) StorageClassesForNode ¶
func (*Config) UnmarshalYAML ¶
type ConfigNodes ¶
type ConfigNodes struct {
Exclude ExcludeRules `json:"exclude" yaml:"exclude"`
}
type ConfigStorage ¶
type ConfigStorage struct {
Exclude ExcludeRules `json:"exclude" yaml:"exclude"`
}
type Exclude ¶
type Exclude struct { Nodes ExcludeRules `json:"nodes" yaml:"nodes"` NodeStorage ExcludeNodesStorage `json:"node_storage" yaml:"node_storage"` }
func (*Exclude) IsNodeExcluded ¶
type ExcludeNodeStorage ¶
type ExcludeNodeStorage struct { NodeFilter *regexp.Regexp `json:"node_filter" yaml:"node_filter"` Classes []string `json:"classes" yaml:"classes"` }
func (*ExcludeNodeStorage) Copy ¶
func (nd *ExcludeNodeStorage) Copy() ExcludeNodeStorage
func (*ExcludeNodeStorage) UnmarshalYAML ¶
func (nd *ExcludeNodeStorage) UnmarshalYAML(node *yaml.Node) error
type ExcludeNodesStorage ¶
type ExcludeNodesStorage []ExcludeNodeStorage
func (*ExcludeNodesStorage) Copy ¶
func (nd *ExcludeNodesStorage) Copy() ExcludeNodesStorage
type ExcludeRules ¶
func (*ExcludeRules) Copy ¶
func (nd *ExcludeRules) Copy() ExcludeRules
func (*ExcludeRules) UnmarshalYAML ¶
func (nd *ExcludeRules) UnmarshalYAML(node *yaml.Node) error
type QuerierCluster ¶
func ClusterStateFromCtx ¶
func ClusterStateFromCtx(ctx context.Context) QuerierCluster
type QuerierNodes ¶
func FeatureDiscoveryFromCtx ¶
func FeatureDiscoveryFromCtx(ctx context.Context) QuerierNodes
type QuerierStorage ¶
type QuerierStorage interface{}
func NewRancher ¶
func NewRancher(ctx context.Context) (QuerierStorage, error)
func StorageFromCtx ¶
func StorageFromCtx(ctx context.Context) []QuerierStorage
type RegistryGPUDevice ¶
type RegistryGPUDevices ¶
type RegistryGPUDevices map[string]RegistryGPUDevice
type RegistryGPUVendor ¶
type RegistryGPUVendor struct { Name string `json:"name"` Devices RegistryGPUDevices `json:"devices"` }
type RegistryGPUVendors ¶
type RegistryGPUVendors map[string]RegistryGPUVendor
type RemotePodCommandExecutor ¶
type RemotePodCommandExecutor interface { ExecWithOptions(ctx context.Context, options rookexec.ExecOptions) (string, string, error) ExecCommandInContainerWithFullOutput(ctx context.Context, appLabel, containerName, namespace string, cmd ...string) (string, string, error) // ExecCommandInContainerWithFullOutputWithTimeout uses 15s hard-coded timeout ExecCommandInContainerWithFullOutputWithTimeout(ctx context.Context, appLabel, containerName, namespace string, cmd ...string) (string, string, error) }
func NewRemotePodCommandExecutor ¶
func NewRemotePodCommandExecutor(restcfg *rest.Config, clientset kubernetes.Interface) RemotePodCommandExecutor
Click to show internal directories.
Click to hide internal directories.