Documentation ¶
Index ¶
- Variables
- func GetResourceSetFromSlice(resourceSlice []string) (map[ResourceType]bool, error)
- func ResourceToHeader(r ResourceType) string
- type APIResource
- type APIResourceList
- func (r *APIResourceList) FromRuntime(obj interface{}, config CtorConfig)
- func (r *APIResourceList) GetFieldSelectors() map[string]string
- func (r *APIResourceList) GetLabels() map[string]string
- func (r *APIResourceList) GetNamespace() string
- func (r *APIResourceList) HasChanged(k K8sResource) bool
- func (r *APIResourceList) ToStrings() []string
- type ConfigMap
- type CronJob
- type CtorConfig
- type DaemonSet
- type Deployment
- type Endpoints
- type HorizontalPodAutoscaler
- type Ingress
- type Job
- type K8sResource
- func NewConfigMapFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewCronJobFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewDaemonSetFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewDeploymentFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewEndpointsFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewHorizontalPodAutoscalerFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewIngressFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewJobFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewNamespaceFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewNodeFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewPersistentVolumeClaimFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewPersistentVolumeFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewPodFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewReplicaSetFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewSecretFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewServiceAccountFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewServiceFromRuntime(obj interface{}, config CtorConfig) K8sResource
- func NewStatefulSetFromRuntime(obj interface{}, config CtorConfig) K8sResource
- type Namespace
- type Node
- type PersistentVolume
- type PersistentVolumeClaim
- type Pod
- type ReplicaSet
- type ResourceCtor
- type ResourceMeta
- func (r *ResourceMeta) FromDynamicMeta(u *unstructured.Unstructured, config CtorConfig)
- func (r *ResourceMeta) FromObjectMeta(meta metav1.ObjectMeta, config CtorConfig)
- func (r *ResourceMeta) GetFieldSelectors() map[string]string
- func (r *ResourceMeta) GetLabels() map[string]string
- func (r *ResourceMeta) GetNamespace() string
- type ResourceType
- type Secret
- type Service
- type ServiceAccount
- type StatefulSet
- type UnknownResourceError
Constants ¶
This section is empty.
Variables ¶
var ExcludedLabels = map[string]string{"pod-template-generation": "",
"app.kubernetes.io/name": "", "controller-revision-hash": "",
"app.kubernetes.io/managed-by": "", "pod-template-hash": "",
"statefulset.kubernetes.io/pod-name": "",
"controler-uid": ""}
ExcludedLabels is a list of excluded label/selector from the dump
Functions ¶
func GetResourceSetFromSlice ¶
func GetResourceSetFromSlice(resourceSlice []string) (map[ResourceType]bool, error)
func ResourceToHeader ¶
func ResourceToHeader(r ResourceType) string
Types ¶
type APIResource ¶
type APIResource struct { Name string Shortnames []string Version string Namespaced bool Kind string }
APIResource is the summary of a kubernetes pod
func (*APIResource) ToStrings ¶
func (a *APIResource) ToStrings() []string
type APIResourceList ¶
type APIResourceList struct { ApiResources []APIResource GroupVersion string }
APIResource is the summary of a kubernetes pod
func (*APIResourceList) FromRuntime ¶
func (r *APIResourceList) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*APIResourceList) GetFieldSelectors ¶
func (r *APIResourceList) GetFieldSelectors() map[string]string
func (*APIResourceList) GetLabels ¶
func (r *APIResourceList) GetLabels() map[string]string
func (*APIResourceList) GetNamespace ¶
func (r *APIResourceList) GetNamespace() string
func (*APIResourceList) HasChanged ¶
func (r *APIResourceList) HasChanged(k K8sResource) bool
func (*APIResourceList) ToStrings ¶
func (r *APIResourceList) ToStrings() []string
ToString serializes the object to strings
type ConfigMap ¶
type ConfigMap struct {
ResourceMeta
}
ConfigMap is the summary of a kubernetes configMap
func (*ConfigMap) FromRuntime ¶
func (c *ConfigMap) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*ConfigMap) HasChanged ¶
func (c *ConfigMap) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
type CronJob ¶
type CronJob struct { ResourceMeta Schedule string LastSchedule string Containers []string }
CronJob is the summary of a kubernetes cronJob
func (*CronJob) FromRuntime ¶
func (c *CronJob) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*CronJob) HasChanged ¶
func (c *CronJob) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
type CtorConfig ¶
CtorConfig is the configuration passed to all resource constructors
type DaemonSet ¶
type DaemonSet struct { ResourceMeta Desired string Current string Ready string Containers []string LabelSelector []string }
DaemonSet is the summary of a kubernetes daemonset
func (*DaemonSet) FromRuntime ¶
func (d *DaemonSet) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*DaemonSet) HasChanged ¶
func (d *DaemonSet) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
type Deployment ¶
type Deployment struct { ResourceMeta DesiredReplicas string AvailableReplicas string UpdatedReplicas string CurrentReplicas string }
Deployment is the summary of a kubernetes deployment
func (*Deployment) FromRuntime ¶
func (d *Deployment) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*Deployment) HasChanged ¶
func (d *Deployment) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
func (*Deployment) ToStrings ¶
func (d *Deployment) ToStrings() []string
ToString serializes the object to strings
type Endpoints ¶
type Endpoints struct { ResourceMeta ReadyIps []string ReadyPods []string NotReadyIps []string NotReadyPods []string }
Endpoint is the summary of a kubernetes endpoints
func (*Endpoints) FromRuntime ¶
func (e *Endpoints) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*Endpoints) HasChanged ¶
func (e *Endpoints) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
type HorizontalPodAutoscaler ¶
type HorizontalPodAutoscaler struct { ResourceMeta Reference string Targets string MinPods string MaxPods string CurrentReplicas string }
HorizontalPodAutoscaler is the summary of a kubernetes horizontal pod autoscaler
func (*HorizontalPodAutoscaler) FromRuntime ¶
func (h *HorizontalPodAutoscaler) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*HorizontalPodAutoscaler) HasChanged ¶
func (h *HorizontalPodAutoscaler) HasChanged(k K8sResource) bool
HasChanged returns true if the resource'h dump needs to be updated
func (*HorizontalPodAutoscaler) ToStrings ¶
func (h *HorizontalPodAutoscaler) ToStrings() []string
ToString serializes the object to strings
type Ingress ¶
type Ingress struct { ResourceMeta Address []string }
Ingress is the summary of a kubernetes ingress
func (*Ingress) FromRuntime ¶
func (ingress *Ingress) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*Ingress) HasChanged ¶
func (ingress *Ingress) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
type Job ¶
type Job struct { ResourceMeta Completions string Containers []string }
Job is the summary of a kubernetes Job
func (*Job) FromRuntime ¶
func (j *Job) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*Job) HasChanged ¶
func (j *Job) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
type K8sResource ¶
type K8sResource interface { GetNamespace() string GetLabels() map[string]string GetFieldSelectors() map[string]string HasChanged(k K8sResource) bool ToStrings() []string FromRuntime(obj interface{}, config CtorConfig) }
K8sResource is the generic information of a k8s entity
func NewConfigMapFromRuntime ¶
func NewConfigMapFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewConfigMapFromRuntime builds a pod from informer result
func NewCronJobFromRuntime ¶
func NewCronJobFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewCronJobFromRuntime builds a cronJob from informer result
func NewDaemonSetFromRuntime ¶
func NewDaemonSetFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewDaemonSetFromRuntime builds a daemonset from informer result
func NewDeploymentFromRuntime ¶
func NewDeploymentFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewDeploymentFromRuntime builds a k8sresource from informer result
func NewEndpointsFromRuntime ¶
func NewEndpointsFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewEndpointsFromRuntime builds a k8s resource from informer result
func NewHorizontalPodAutoscalerFromRuntime ¶
func NewHorizontalPodAutoscalerFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewHorizontalPodAutoscalerFromRuntime builds a pod from informer result
func NewIngressFromRuntime ¶
func NewIngressFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewIngressFromRuntime builds a pod from informer result
func NewJobFromRuntime ¶
func NewJobFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewJobFromRuntime builds a Job from informer result
func NewNamespaceFromRuntime ¶
func NewNamespaceFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewNamespaceFromRuntime builds a pod from informer result
func NewNodeFromRuntime ¶
func NewNodeFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewNodeFromRuntime builds a k8sresoutce from informer result
func NewPersistentVolumeClaimFromRuntime ¶
func NewPersistentVolumeClaimFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewPersistentVolumeClaimFromRuntime builds a pod from informer result
func NewPersistentVolumeFromRuntime ¶
func NewPersistentVolumeFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewPersistentVolumeFromRuntime builds a pod from informer result
func NewPodFromRuntime ¶
func NewPodFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewPodFromRuntime builds a pod from informer result
func NewReplicaSetFromRuntime ¶
func NewReplicaSetFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewReplicaSetFromRuntime builds a k8sresource from informer result
func NewSecretFromRuntime ¶
func NewSecretFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewSecretFromRuntime builds a secret from informer result
func NewServiceAccountFromRuntime ¶
func NewServiceAccountFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewServiceAccountFromRuntime builds a pod from informer result
func NewServiceFromRuntime ¶
func NewServiceFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewServiceFromRuntime builds a pod from informer result
func NewStatefulSetFromRuntime ¶
func NewStatefulSetFromRuntime(obj interface{}, config CtorConfig) K8sResource
NewStatefulSetFromRuntime builds a k8sresource from informer result
type Namespace ¶
type Namespace struct {
ResourceMeta
}
Namespace is the summary of a kubernetes configMap
func (*Namespace) FromRuntime ¶
func (c *Namespace) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*Namespace) HasChanged ¶
func (c *Namespace) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
type Node ¶
type Node struct { ResourceMeta Roles []string Status string InstanceType string Zone string InstanceID string InternalIP string Taints []string }
Node is the summary of a kubernetes node
func (*Node) FromRuntime ¶
func (n *Node) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*Node) HasChanged ¶
func (n *Node) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
type PersistentVolume ¶
type PersistentVolume struct { ResourceMeta Status string Claim string Volume string Zone string Spec string Affinities []string StorageClass string }
PersistentVolume is the summary of a kubernetes persistent volume
func (*PersistentVolume) FromRuntime ¶
func (pv *PersistentVolume) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*PersistentVolume) HasChanged ¶
func (pv *PersistentVolume) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
func (*PersistentVolume) ToStrings ¶
func (pv *PersistentVolume) ToStrings() []string
ToString serializes the object to strings
type PersistentVolumeClaim ¶
type PersistentVolumeClaim struct { ResourceMeta Status string VolumeName string Capacity string StorageClass string }
PersistentVolumeClaim is the summary of a kubernetes physical volume claim
func (*PersistentVolumeClaim) FromRuntime ¶
func (pvc *PersistentVolumeClaim) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*PersistentVolumeClaim) HasChanged ¶
func (pvc *PersistentVolumeClaim) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
func (*PersistentVolumeClaim) ToStrings ¶
func (pvc *PersistentVolumeClaim) ToStrings() []string
ToString serializes the object to strings
type Pod ¶
type Pod struct { ResourceMeta HostIP string PodIP string NodeName string Tolerations []string Containers []string Claims []string Phase string QosClass string Resource string }
Pod is the summary of a kubernetes pod
func (*Pod) FromRuntime ¶
func (p *Pod) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*Pod) GetFieldSelectors ¶
func (*Pod) HasChanged ¶
func (p *Pod) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
type ReplicaSet ¶
type ReplicaSet struct { ResourceMeta Replicas string ReadyReplicas string AvailableReplicas string Selectors []string }
ReplicaSet is the summary of a kubernetes replicaSet
func (*ReplicaSet) FromRuntime ¶
func (r *ReplicaSet) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*ReplicaSet) HasChanged ¶
func (r *ReplicaSet) HasChanged(k K8sResource) bool
HasChanged returns true if the resource'r dump needs to be updated
func (*ReplicaSet) ToStrings ¶
func (r *ReplicaSet) ToStrings() []string
ToString serializes the object to strings
type ResourceCtor ¶
type ResourceCtor func(obj interface{}, config CtorConfig) K8sResource
func ResourceTypeToCtor ¶
func ResourceTypeToCtor(resourceType ResourceType) ResourceCtor
type ResourceMeta ¶
type ResourceMeta struct { Name string Namespace string // Namespace can be None Labels map[string]string CreationTime time.Time }
ResourceMeta is the generic information of a k8s entity
func (*ResourceMeta) FromDynamicMeta ¶
func (r *ResourceMeta) FromDynamicMeta(u *unstructured.Unstructured, config CtorConfig)
FromDynamicMeta copies meta information to the object
func (*ResourceMeta) FromObjectMeta ¶
func (r *ResourceMeta) FromObjectMeta(meta metav1.ObjectMeta, config CtorConfig)
FromObjectMeta copies meta information to the object
func (*ResourceMeta) GetFieldSelectors ¶
func (r *ResourceMeta) GetFieldSelectors() map[string]string
func (*ResourceMeta) GetLabels ¶
func (r *ResourceMeta) GetLabels() map[string]string
func (*ResourceMeta) GetNamespace ¶
func (r *ResourceMeta) GetNamespace() string
type ResourceType ¶
type ResourceType int64
const ( ResourceTypeApiResource ResourceType = iota ResourceTypeConfigMap ResourceTypeCronJob ResourceTypeDaemonSet ResourceTypeDeployment ResourceTypeEndpoints ResourceTypeHorizontalPodAutoscaler ResourceTypeIngress ResourceTypeJob ResourceTypeNamespace ResourceTypeNode ResourceTypePod ResourceTypePersistentVolume ResourceTypePersistentVolumeClaim ResourceTypeReplicaSet ResourceTypeSecret ResourceTypeService ResourceTypeServiceAccount ResourceTypeStatefulSet ResourceTypeUnknown )
func GetResourceType ¶
func GetResourceType(cmdUse string, args []string) ResourceType
func ParseResourceType ¶
func ParseResourceType(s string) ResourceType
func (ResourceType) IsNamespaced ¶ added in v3.0.3
func (r ResourceType) IsNamespaced() bool
func (ResourceType) String ¶
func (r ResourceType) String() string
type Secret ¶
type Secret struct { ResourceMeta SecretType string Data string }
Secret is the summary of a kubernetes secret
func (*Secret) FromRuntime ¶
func (s *Secret) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*Secret) HasChanged ¶
func (s *Secret) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
type Service ¶
type Service struct { ResourceMeta ServiceType string ClusterIP string Ports []string Selectors []string }
Service is the summary of a kubernetes service
func (*Service) FromRuntime ¶
func (s *Service) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*Service) HasChanged ¶
func (s *Service) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
type ServiceAccount ¶
type ServiceAccount struct { ResourceMeta NumberSecrets string }
ServiceAccount is the summary of a kubernetes service account
func (*ServiceAccount) FromRuntime ¶
func (s *ServiceAccount) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*ServiceAccount) HasChanged ¶
func (s *ServiceAccount) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
func (*ServiceAccount) ToStrings ¶
func (s *ServiceAccount) ToStrings() []string
ToString serializes the object to strings
type StatefulSet ¶
type StatefulSet struct { ResourceMeta // contains filtered or unexported fields }
StatefulSet is the summary of a kubernetes statefulset
func (*StatefulSet) FromRuntime ¶
func (s *StatefulSet) FromRuntime(obj interface{}, config CtorConfig)
FromRuntime builds object from the informer's result
func (*StatefulSet) HasChanged ¶
func (s *StatefulSet) HasChanged(k K8sResource) bool
HasChanged returns true if the resource's dump needs to be updated
func (*StatefulSet) ToStrings ¶
func (s *StatefulSet) ToStrings() []string
ToString serializes the object to strings
type UnknownResourceError ¶
type UnknownResourceError struct {
ResourceStr string
}
func (UnknownResourceError) Error ¶
func (u UnknownResourceError) Error() string
Source Files ¶
- api_resource.go
- common.go
- configmap.go
- cronjob.go
- daemonset.go
- deployment.go
- endpoint.go
- horizontal_pod_autoscaling.go
- ingress.go
- init.go
- job.go
- k8s_resources.go
- namespace.go
- node.go
- physical_volume.go
- physical_volume_claim.go
- pod.go
- replicaset.go
- resource_type.go
- secret.go
- service.go
- service_account.go
- statefulset.go