k8sresources

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigMapHeader = "Namespace Name Age Labels\n"
View Source
const CronJobHeader = "Namespace Name Schedule LastSchedule Containers Age Labels\n"

CronJobHeader is the headers for cronjob files

View Source
const DaemonSetHeader = "Namespace Name Desired Current Ready LabelSelector Containers Age Labels\n"

DaemonSetHeader is the header file for daemonset

View Source
const DeploymentHeader = "Namespace Name Desired Current Up-to-date Available Age Labels\n"

DeploymentHeader is the header file for deployment

View Source
const EndpointsHeader = "Namespace Name Age ReadyIps ReadyPods NotReadyIps NotReadyPods Labels\n"
View Source
const IngressHeader = "Namespace Name Address Age Labels\n"
View Source
const JobHeader = "Namespace Name Completions Containers Age Labels\n"

JobHeader is the headers for job files

View Source
const NamespaceHeader = "Name Age Labels\n"
View Source
const NodeHeader = "Name Roles InstanceType Zone InternalIp Age Labels\n"
View Source
const PersistentVolumeClaimHeader = "Namespace Name Status Capacity VolumeName StorageClass Age Labels\n"
View Source
const PersistentVolumeHeader = "Name Status StorageClass Zone Claim Age Labels\n"
View Source
const PodHeader = "Namespace Name PodIp HostIp NodeName Phase Containers Age Labels\n"
View Source
const ReplicaSetHeader = "Namespace Name Replicas AvailableReplicas ReadyReplicas Selector Age Labels\n"
View Source
const ServiceAccountHeader = "Namespace Name Secrets Age Labels\n"
View Source
const ServiceHeader = "Namespace Name Type ClusterIp Ports Selector Age Labels\n"
View Source
const StatefulSetHeader = "Namespace Name Replicas Selector Age Labels\n"

Variables

View Source
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

This section is empty.

Types

type ConfigMap

type ConfigMap struct {
	ResourceMeta
}

ConfigMap is the summary of a kubernetes configMap

func (*ConfigMap) FromRuntime

func (c *ConfigMap) FromRuntime(obj interface{})

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

func (*ConfigMap) ToString

func (c *ConfigMap) ToString() string

ToString serializes the object to strings

type CronJob

type CronJob struct {
	ResourceMeta
	// contains filtered or unexported fields
}

CronJob is the summary of a kubernetes cronJob

func (*CronJob) FromRuntime

func (c *CronJob) FromRuntime(obj interface{})

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

func (*CronJob) ToString

func (c *CronJob) ToString() string

ToString serializes the object to strings

type DaemonSet

type DaemonSet struct {
	ResourceMeta
	// contains filtered or unexported fields
}

DaemonSet is the summary of a kubernetes daemonset

func (*DaemonSet) FromRuntime

func (d *DaemonSet) FromRuntime(obj interface{})

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

func (*DaemonSet) ToString

func (d *DaemonSet) ToString() string

ToString serializes the object to strings

type Deployment

type Deployment struct {
	ResourceMeta
	// contains filtered or unexported fields
}

Deployment is the summary of a kubernetes deployment

func (*Deployment) FromRuntime

func (d *Deployment) FromRuntime(obj interface{})

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) ToString

func (d *Deployment) ToString() string

ToString serializes the object to strings

type Endpoints

type Endpoints struct {
	ResourceMeta
	// contains filtered or unexported fields
}

Endpoints is the summary of a kubernetes endpoints

func (*Endpoints) FromRuntime

func (e *Endpoints) FromRuntime(obj interface{})

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

func (*Endpoints) ToString

func (e *Endpoints) ToString() string

ToString serializes the object to strings

type Ingress

type Ingress struct {
	ResourceMeta
	// contains filtered or unexported fields
}

Ingress is the summary of a kubernetes ingress

func (*Ingress) FromRuntime

func (ingress *Ingress) FromRuntime(obj interface{})

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

func (*Ingress) ToString

func (ingress *Ingress) ToString() string

ToString serializes the object to strings

type Job

type Job struct {
	ResourceMeta
	// contains filtered or unexported fields
}

Job is the summary of a kubernetes Job

func (*Job) FromRuntime

func (j *Job) FromRuntime(obj interface{})

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

func (*Job) ToString

func (j *Job) ToString() string

ToString serializes the object to strings

type K8sResource

type K8sResource interface {
	HasChanged(k K8sResource) bool
	ToString() string
	FromRuntime(obj interface{})
}

K8sResource is the generic information of a k8s entity

func NewConfigMapFromRuntime

func NewConfigMapFromRuntime(obj interface{}) K8sResource

NewConfigMapFromRuntime builds a pod from informer result

func NewCronJobFromRuntime

func NewCronJobFromRuntime(obj interface{}) K8sResource

NewCronJobFromRuntime builds a cronJob from informer result

func NewDaemonSetFromRuntime

func NewDaemonSetFromRuntime(obj interface{}) K8sResource

NewDaemonSetFromRuntime builds a daemonset from informer result

func NewDeploymentFromRuntime

func NewDeploymentFromRuntime(obj interface{}) K8sResource

NewDeploymentFromRuntime builds a k8sresource from informer result

func NewEndpointsFromRuntime

func NewEndpointsFromRuntime(obj interface{}) K8sResource

NewEndpointsFromRuntime builds a k8s resource from informer result

func NewIngressFromRuntime

func NewIngressFromRuntime(obj interface{}) K8sResource

NewIngressFromRuntime builds a pod from informer result

func NewJobFromRuntime

func NewJobFromRuntime(obj interface{}) K8sResource

NewJobFromRuntime builds a Job from informer result

func NewNamespaceFromRuntime

func NewNamespaceFromRuntime(obj interface{}) K8sResource

NewNamespaceFromRuntime builds a pod from informer result

func NewNodeFromRuntime

func NewNodeFromRuntime(obj interface{}) K8sResource

NewNodeFromRuntime builds a k8sresoutce from informer result

func NewPersistentVolumeClaimFromRuntime

func NewPersistentVolumeClaimFromRuntime(obj interface{}) K8sResource

NewPersistentVolumeClaimFromRuntime builds a pod from informer result

func NewPersistentVolumeFromRuntime

func NewPersistentVolumeFromRuntime(obj interface{}) K8sResource

NewPersistentVolumetime builds a pod from informer result

func NewPodFromRuntime

func NewPodFromRuntime(obj interface{}) K8sResource

NewPodFromRuntime builds a pod from informer result

func NewReplicaSetFromRuntime

func NewReplicaSetFromRuntime(obj interface{}) K8sResource

NewReplicaSetFromRuntime builds a k8sresource from informer result

func NewServiceAccountFromRuntime

func NewServiceAccountFromRuntime(obj interface{}) K8sResource

NewServiceAccountFromRuntime builds a pod from informer result

func NewServiceFromRuntime

func NewServiceFromRuntime(obj interface{}) K8sResource

NewServiceFromRuntime builds a pod from informer result

func NewStatefulSetFromRuntime

func NewStatefulSetFromRuntime(obj interface{}) 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{})

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

func (*Namespace) ToString

func (c *Namespace) ToString() string

ToString serializes the object to strings

type Node

type Node struct {
	ResourceMeta
	// contains filtered or unexported fields
}

Node is the summary of a kubernetes node

func (*Node) FromRuntime

func (n *Node) FromRuntime(obj interface{})

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

func (*Node) ToString

func (n *Node) ToString() string

ToString serializes the object to strings

type PersistentVolume

type PersistentVolume struct {
	ResourceMeta
	// contains filtered or unexported fields
}

PersistentVolume is the summary of a kubernetes physical volume

func (*PersistentVolume) FromRuntime

func (pv *PersistentVolume) FromRuntime(obj interface{})

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) ToString

func (pv *PersistentVolume) ToString() string

ToString serializes the object to strings

type PersistentVolumeClaim

type PersistentVolumeClaim struct {
	ResourceMeta
	// contains filtered or unexported fields
}

PersistentVolumeClaim is the summary of a kubernetes physical volume claim

func (*PersistentVolumeClaim) FromRuntime

func (pvc *PersistentVolumeClaim) FromRuntime(obj interface{})

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) ToString

func (pvc *PersistentVolumeClaim) ToString() string

ToString serializes the object to strings

type Pod

type Pod struct {
	ResourceMeta
	// contains filtered or unexported fields
}

Pod is the summary of a kubernetes pod

func (*Pod) FromRuntime

func (p *Pod) FromRuntime(obj interface{})

FromRuntime builds object from the informer's result

func (*Pod) HasChanged

func (p *Pod) HasChanged(k K8sResource) bool

HasChanged returns true if the resource's dump needs to be updated

func (*Pod) ToString

func (p *Pod) ToString() string

ToString serializes the object to strings

type ReplicaSet

type ReplicaSet struct {
	ResourceMeta
	// contains filtered or unexported fields
}

ReplicaSet is the summary of a kubernetes replicaSet

func (*ReplicaSet) FromRuntime

func (r *ReplicaSet) FromRuntime(obj interface{})

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) ToString

func (r *ReplicaSet) ToString() string

ToString serializes the object to strings

type ResourceMeta

type ResourceMeta struct {
	// contains filtered or unexported fields
}

ResourceMeta is the generic information of a k8s entity

func (*ResourceMeta) FromObjectMeta

func (r *ResourceMeta) FromObjectMeta(meta metav1.ObjectMeta)

FromObjectMeta copies meta information to the object

type Service

type Service struct {
	ResourceMeta
	// contains filtered or unexported fields
}

Service is the summary of a kubernetes service

func (*Service) FromRuntime

func (s *Service) FromRuntime(obj interface{})

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

func (*Service) ToString

func (s *Service) ToString() string

ToString serializes the object to strings

type ServiceAccount

type ServiceAccount struct {
	ResourceMeta
	// contains filtered or unexported fields
}

ServiceAccount is the summary of a kubernetes service account

func (*ServiceAccount) FromRuntime

func (s *ServiceAccount) FromRuntime(obj interface{})

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) ToString

func (s *ServiceAccount) ToString() 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{})

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) ToString

func (s *StatefulSet) ToString() string

ToString serializes the object to strings

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL