Documentation ¶
Index ¶
- Constants
- Variables
- func GetResourceKinds() sets.String
- func IsLabelSelectorMatching(selector map[string]string, labelSelector *v1.LabelSelector) bool
- func IsSelectorMatching(labelSelector map[string]string, testedObjectLabels map[string]string) bool
- type AgentConfig
- type ClientType
- type CloudHost
- type DockerInfo
- type DockerdConfig
- type HostRegisterConfig
- type IListMeta
- type ListMeta
- type NodeAddOption
Constants ¶
const ( DockerInfoType = "dockerInfo" DockerInfoFieldArchitecture = "architecture" DockerInfoFieldCgroupDriver = "cgroupDriver" DockerInfoFieldDebug = "debug" DockerInfoFieldDockerRootDir = "dockerRootDir" DockerInfoFieldDriver = "driver" DockerInfoFieldExperimentalBuild = "experimentalBuild" DockerInfoFieldHTTPProxy = "httpProxy" DockerInfoFieldHTTPSProxy = "httpsProxy" DockerInfoFieldIndexServerAddress = "indexServerAddress" DockerInfoFieldKernelVersion = "kernelVersion" DockerInfoFieldLabels = "labels" DockerInfoFieldLoggingDriver = "loggingDriver" DockerInfoFieldName = "name" DockerInfoFieldNoProxy = "noProxy" DockerInfoFieldOSType = "osType" DockerInfoFieldOperatingSystem = "operatingSystem" DockerInfoFieldServerVersion = "serverVersion" )
const ( ResourceKindConfigMap = "configmap" ResourceKindDaemonSet = "daemonset" ResourceKindDeployment = "deployment" ResourceKindEvent = "event" ResourceKindHorizontalPodAutoscaler = "horizontalpodautoscaler" ResourceKindIngress = "ingress" ResourceKindJob = "job" ResourceKindCronJob = "cronjob" ResourceKindLimitRange = "limitrange" ResourceKindNamespace = "namespace" ResourceKindNode = "node" ResourceKindPersistentVolumeClaim = "persistentvolumeclaim" ResourceKindPersistentVolume = "persistentvolume" ResourceKindPod = "pod" ResourceKindReplicaSet = "replicaset" ResourceKindReplicationController = "replicationcontroller" ResourceKindResourceQuota = "resourcequota" ResourceKindSecret = "secret" ResourceKindService = "service" ResourceKindStatefulSet = "statefulset" ResourceKindStorageClass = "storageclass" ResourceKindRbacRole = "role" ResourceKindRbacClusterRole = "clusterrole" ResourceKindRbacRoleBinding = "rolebinding" ResourceKindRbacClusterRoleBinding = "clusterrolebinding" ResourceKindEndpoint = "endpoint" )
List of all resource kinds supported by the UI.
const ( ClientTypeDefault = "restclient" ClientTypeExtensionClient = "extensionclient" ClientTypeAppsClient = "appsclient" ClientTypeBatchClient = "batchclient" ClientTypeBetaBatchClient = "betabatchclient" ClientTypeAutoscalingClient = "autoscalingclient" ClientTypeStorageClient = "storageclient" )
List of client types supported by the UI.
Variables ¶
var KindToAPIMapping = map[string]struct { // Kubernetes resource name. Resource string // Client type used by given resource, i.e. deployments are using extension client. ClientType ClientType // Is this object global scoped (not below a namespace). Namespaced bool }{ ResourceKindConfigMap: {"configmaps", ClientTypeDefault, true}, ResourceKindDaemonSet: {"daemonsets", ClientTypeExtensionClient, true}, ResourceKindDeployment: {"deployments", ClientTypeExtensionClient, true}, ResourceKindEvent: {"events", ClientTypeDefault, true}, ResourceKindHorizontalPodAutoscaler: {"horizontalpodautoscalers", ClientTypeAutoscalingClient, true}, ResourceKindIngress: {"ingresses", ClientTypeExtensionClient, true}, ResourceKindJob: {"jobs", ClientTypeBatchClient, true}, ResourceKindCronJob: {"cronjobs", ClientTypeBetaBatchClient, true}, ResourceKindLimitRange: {"limitrange", ClientTypeDefault, true}, ResourceKindNamespace: {"namespaces", ClientTypeDefault, false}, ResourceKindNode: {"nodes", ClientTypeDefault, false}, ResourceKindPersistentVolumeClaim: {"persistentvolumeclaims", ClientTypeDefault, true}, ResourceKindPersistentVolume: {"persistentvolumes", ClientTypeDefault, false}, ResourceKindPod: {"pods", ClientTypeDefault, true}, ResourceKindReplicaSet: {"replicasets", ClientTypeExtensionClient, true}, ResourceKindReplicationController: {"replicationcontrollers", ClientTypeDefault, true}, ResourceKindResourceQuota: {"resourcequotas", ClientTypeDefault, true}, ResourceKindSecret: {"secrets", ClientTypeDefault, true}, ResourceKindService: {"services", ClientTypeDefault, true}, ResourceKindStatefulSet: {"statefulsets", ClientTypeAppsClient, true}, ResourceKindStorageClass: {"storageclasses", ClientTypeStorageClient, false}, ResourceKindEndpoint: {"endpoints", ClientTypeDefault, true}, }
Mapping from resource kind to K8s apiserver API path. This is mostly pluralization, because K8s apiserver uses plural paths and this project singular. Must be kept in sync with the list of supported kinds.
var ListEverything = metaV1.ListOptions{ LabelSelector: labels.Everything().String(), FieldSelector: fields.Everything().String(), }
ListEverything is a list options used to list all resources without any filtering.
Functions ¶
func GetResourceKinds ¶
func IsLabelSelectorMatching ¶
func IsLabelSelectorMatching(selector map[string]string, labelSelector *v1.LabelSelector) bool
IsLabelSelectorMatching returns true when a resource with the given selector targets the same Resources(or subset) that a tested object selector with the given selector.
Types ¶
type AgentConfig ¶
type ClientType ¶
type ClientType string
ClientType represents type of client that is used to perform generic operations on resources. Different resources belong to different client, i.e. Deployments belongs to extension client and StatefulSets to apps client.
type DockerInfo ¶
type DockerInfo struct { Architecture string `json:"architecture"` CgroupDriver string `json:"cgroupDriver"` Debug bool `json:"debug"` DockerRootDir string `json:"dockerRootDir"` Driver string `json:"driver"` ExperimentalBuild bool `json:"experimentalBuild"` HTTPProxy string `json:"httpProxy"` HTTPSProxy string `json:"httpsProxy"` IndexServerAddress string `json:"indexServerAddress"` KernelVersion string `json:"kernelVersion"` Labels []string `json:"labels"` LoggingDriver string `json:"loggingDriver"` Name string `json:"name"` NoProxy string `json:"noProxy"` OSType string `json:"osType"` OperatingSystem string `json:"operatingSystem"` ServerVersion string `json:"serverVersion"` }
type DockerdConfig ¶
type HostRegisterConfig ¶
type HostRegisterConfig struct { AgentConfig AgentConfig `json:"agentConfig"` DockerdConfig DockerdConfig `json:"dockerdConfig"` }
type ListMeta ¶
type ListMeta struct { Total int `json:"total"` Limit int `json:"limit"` Offset int `json:"offset"` }
ListMeta describes list of objects, i.e. holds information about pagination options set for the list.