Documentation ¶
Index ¶
- Constants
- Variables
- func IsPauseImageName(imageName string) bool
- func NewEventStore(watch Watch, keyFunc cache.KeyFunc) cache.Store
- func NewLogReadCloser(readClosersWithLabel map[io.ReadCloser]string) io.ReadCloser
- type Client
- type ClientConfig
- type CronJob
- type DaemonSet
- type Deployment
- type Event
- type Job
- type Meta
- type NamespaceResource
- type PersistentVolume
- type PersistentVolumeClaim
- type Pod
- type Reporter
- func (r *Reporter) CaptureCronJob(f func(xfer.Request, string, string) xfer.Response) func(xfer.Request) xfer.Response
- func (r *Reporter) CaptureDaemonSet(f func(xfer.Request, string, string) xfer.Response) func(xfer.Request) xfer.Response
- func (r *Reporter) CaptureDeployment(f func(xfer.Request, string, string) xfer.Response) func(xfer.Request) xfer.Response
- func (r *Reporter) CaptureJob(f func(xfer.Request, string, string) xfer.Response) func(xfer.Request) xfer.Response
- func (r *Reporter) CapturePersistentVolume(f func(xfer.Request, string) xfer.Response) func(xfer.Request) xfer.Response
- func (r *Reporter) CapturePersistentVolumeClaim(f func(xfer.Request, string, string, string) xfer.Response) func(xfer.Request) xfer.Response
- func (r *Reporter) CapturePod(f func(xfer.Request, string, string, []string) xfer.Response) func(xfer.Request) xfer.Response
- func (r *Reporter) CaptureService(f func(xfer.Request, string, string) xfer.Response) func(xfer.Request) xfer.Response
- func (r *Reporter) CaptureStatefulSet(f func(xfer.Request, string, string) xfer.Response) func(xfer.Request) xfer.Response
- func (r *Reporter) CaptureStorageClass(f func(xfer.Request, string) xfer.Response) func(xfer.Request) xfer.Response
- func (r *Reporter) CaptureVolumeSnapshot(f func(xfer.Request, string, string, string, string) xfer.Response) func(xfer.Request) xfer.Response
- func (r *Reporter) CaptureVolumeSnapshotData(f func(xfer.Request, string) xfer.Response) func(xfer.Request) xfer.Response
- func (r *Reporter) Describe() func(xfer.Request) xfer.Response
- func (r *Reporter) GetLogs(req xfer.Request, namespaceID, podID string, containerNames []string) xfer.Response
- func (Reporter) Name() string
- func (r *Reporter) Report() (report.Report, error)
- func (r *Reporter) ScaleDown(req xfer.Request, namespace, id string) xfer.Response
- func (r *Reporter) ScaleUp(req xfer.Request, namespace, id string) xfer.Response
- func (r *Reporter) Stop()
- type Service
- type StatefulSet
- type StorageClass
- type Tagger
- type VolumeSnapshot
- type VolumeSnapshotData
- type Watch
Constants ¶
const ( CloneVolumeSnapshot = report.KubernetesCloneVolumeSnapshot CreateVolumeSnapshot = report.KubernetesCreateVolumeSnapshot GetLogs = report.KubernetesGetLogs Describe = report.KubernetesDescribe DeletePod = report.KubernetesDeletePod DeleteVolumeSnapshot = report.KubernetesDeleteVolumeSnapshot ScaleUp = report.KubernetesScaleUp ScaleDown = report.KubernetesScaleDown )
Control IDs used by the kubernetes integration.
const ( SnapshotGroupName = "volumesnapshot.external-storage.k8s.io" SnapshotVersion = "v1" )
GroupName and version used by CRDs
const ( Schedule = report.KubernetesSchedule Suspended = report.KubernetesSuspended LastScheduled = report.KubernetesLastScheduled ActiveJobs = report.KubernetesActiveJobs )
These constants are keys used in node metadata
const ( UpdatedReplicas = report.KubernetesUpdatedReplicas AvailableReplicas = report.KubernetesAvailableReplicas Strategy = report.KubernetesStrategy )
These constants are keys used in node metadata
const ( Name = report.KubernetesName Namespace = report.KubernetesNamespace Created = report.KubernetesCreated LabelPrefix = "kubernetes_labels_" VolumeClaimName = report.KubernetesVolumeClaim )
These constants are keys used in node metadata
const ( State = report.KubernetesState IsInHostNetwork = report.KubernetesIsInHostNetwork RestartCount = report.KubernetesRestartCount )
These constants are keys used in node metadata
const ( StateDeleted = "deleted" StateFailed = "Failed" )
Pod states we handle specially
const ( IP = report.KubernetesIP ObservedGeneration = report.KubernetesObservedGeneration Replicas = report.KubernetesReplicas DesiredReplicas = report.KubernetesDesiredReplicas NodeType = report.KubernetesNodeType Type = report.KubernetesType Ports = report.KubernetesPorts VolumeClaim = report.KubernetesVolumeClaim StorageClassName = report.KubernetesStorageClassName AccessModes = report.KubernetesAccessModes ReclaimPolicy = report.KubernetesReclaimPolicy Status = report.KubernetesStatus Message = report.KubernetesMessage VolumeName = report.KubernetesVolumeName Provisioner = report.KubernetesProvisioner StorageDriver = report.KubernetesStorageDriver VolumeSnapshotName = report.KubernetesVolumeSnapshotName SnapshotData = report.KubernetesSnapshotData VolumeCapacity = report.KubernetesVolumeCapacity )
These constants are keys used in node metadata
const (
// BetaStorageClassAnnotation is the annotation for default storage class
BetaStorageClassAnnotation = "volume.beta.kubernetes.io/storage-class"
)
const (
Capacity = "capacity"
)
Capacity is the annotation key which provides the storage size
const (
MisscheduledReplicas = report.KubernetesMisscheduledReplicas
)
These constants are keys used in node metadata
const (
PublicIP = report.KubernetesPublicIP
)
These constants are keys used in node metadata
const (
SnapshotPVName = "SnapshotMetadata-PVName"
)
SnapshotPVName is the label key which provides PV name
Variables ¶
var ( PodMetadataTemplates = report.MetadataTemplates{ State: {ID: State, Label: "State", From: report.FromLatest, Priority: 2}, IP: {ID: IP, Label: "IP", From: report.FromLatest, Datatype: report.IP, Priority: 3}, report.Container: {ID: report.Container, Label: "# Containers", From: report.FromCounters, Datatype: report.Number, Priority: 4}, Namespace: {ID: Namespace, Label: "Namespace", From: report.FromLatest, Priority: 5}, Created: {ID: Created, Label: "Created", From: report.FromLatest, Datatype: report.DateTime, Priority: 6}, RestartCount: {ID: RestartCount, Label: "Restart #", From: report.FromLatest, Priority: 7}, } PodMetricTemplates = docker.ContainerMetricTemplates ServiceMetadataTemplates = report.MetadataTemplates{ Namespace: {ID: Namespace, Label: "Namespace", From: report.FromLatest, Priority: 2}, Created: {ID: Created, Label: "Created", From: report.FromLatest, Datatype: report.DateTime, Priority: 3}, PublicIP: {ID: PublicIP, Label: "Public IP", From: report.FromLatest, Datatype: report.IP, Priority: 4}, IP: {ID: IP, Label: "Internal IP", From: report.FromLatest, Datatype: report.IP, Priority: 5}, report.Pod: {ID: report.Pod, Label: "# Pods", From: report.FromCounters, Datatype: report.Number, Priority: 6}, Type: {ID: Type, Label: "Type", From: report.FromLatest, Priority: 7}, Ports: {ID: Ports, Label: "Ports", From: report.FromLatest, Priority: 8}, } ServiceMetricTemplates = PodMetricTemplates DeploymentMetadataTemplates = report.MetadataTemplates{ NodeType: {ID: NodeType, Label: "Type", From: report.FromLatest, Priority: 1}, Namespace: {ID: Namespace, Label: "Namespace", From: report.FromLatest, Priority: 2}, Created: {ID: Created, Label: "Created", From: report.FromLatest, Datatype: report.DateTime, Priority: 3}, ObservedGeneration: {ID: ObservedGeneration, Label: "Observed gen.", From: report.FromLatest, Datatype: report.Number, Priority: 4}, DesiredReplicas: {ID: DesiredReplicas, Label: "Desired replicas", From: report.FromLatest, Datatype: report.Number, Priority: 5}, report.Pod: {ID: report.Pod, Label: "# Pods", From: report.FromCounters, Datatype: report.Number, Priority: 6}, Strategy: {ID: Strategy, Label: "Strategy", From: report.FromLatest, Priority: 7}, } DeploymentMetricTemplates = PodMetricTemplates DaemonSetMetadataTemplates = report.MetadataTemplates{ NodeType: {ID: NodeType, Label: "Type", From: report.FromLatest, Priority: 1}, Namespace: {ID: Namespace, Label: "Namespace", From: report.FromLatest, Priority: 2}, Created: {ID: Created, Label: "Created", From: report.FromLatest, Datatype: report.DateTime, Priority: 3}, DesiredReplicas: {ID: DesiredReplicas, Label: "Desired replicas", From: report.FromLatest, Datatype: report.Number, Priority: 4}, report.Pod: {ID: report.Pod, Label: "# Pods", From: report.FromCounters, Datatype: report.Number, Priority: 5}, } DaemonSetMetricTemplates = PodMetricTemplates StatefulSetMetadataTemplates = report.MetadataTemplates{ NodeType: {ID: NodeType, Label: "Type", From: report.FromLatest, Priority: 1}, Namespace: {ID: Namespace, Label: "Namespace", From: report.FromLatest, Priority: 2}, Created: {ID: Created, Label: "Created", From: report.FromLatest, Datatype: report.DateTime, Priority: 3}, ObservedGeneration: {ID: ObservedGeneration, Label: "Observed gen.", From: report.FromLatest, Datatype: report.Number, Priority: 4}, DesiredReplicas: {ID: DesiredReplicas, Label: "Desired replicas", From: report.FromLatest, Datatype: report.Number, Priority: 5}, report.Pod: {ID: report.Pod, Label: "# Pods", From: report.FromCounters, Datatype: report.Number, Priority: 6}, } StatefulSetMetricTemplates = PodMetricTemplates CronJobMetadataTemplates = report.MetadataTemplates{ NodeType: {ID: NodeType, Label: "Type", From: report.FromLatest, Priority: 1}, Namespace: {ID: Namespace, Label: "Namespace", From: report.FromLatest, Priority: 2}, Created: {ID: Created, Label: "Created", From: report.FromLatest, Datatype: report.DateTime, Priority: 3}, Schedule: {ID: Schedule, Label: "Schedule", From: report.FromLatest, Priority: 4}, LastScheduled: {ID: LastScheduled, Label: "Last scheduled", From: report.FromLatest, Datatype: report.DateTime, Priority: 5}, Suspended: {ID: Suspended, Label: "Suspended", From: report.FromLatest, Priority: 6}, ActiveJobs: {ID: ActiveJobs, Label: "# Jobs", From: report.FromLatest, Datatype: report.Number, Priority: 7}, report.Pod: {ID: report.Pod, Label: "# Pods", From: report.FromCounters, Datatype: report.Number, Priority: 8}, } CronJobMetricTemplates = PodMetricTemplates PersistentVolumeMetadataTemplates = report.MetadataTemplates{ NodeType: {ID: NodeType, Label: "Type", From: report.FromLatest, Priority: 1}, VolumeClaim: {ID: VolumeClaim, Label: "Volume claim", From: report.FromLatest, Priority: 2}, StorageClassName: {ID: StorageClassName, Label: "Storage class", From: report.FromLatest, Priority: 3}, AccessModes: {ID: AccessModes, Label: "Access modes", From: report.FromLatest, Priority: 5}, Status: {ID: Status, Label: "Status", From: report.FromLatest, Priority: 6}, StorageDriver: {ID: StorageDriver, Label: "Storage driver", From: report.FromLatest, Priority: 7}, } PersistentVolumeClaimMetadataTemplates = report.MetadataTemplates{ NodeType: {ID: NodeType, Label: "Type", From: report.FromLatest, Priority: 1}, Namespace: {ID: Namespace, Label: "Namespace", From: report.FromLatest, Priority: 2}, Status: {ID: Status, Label: "Status", From: report.FromLatest, Priority: 3}, VolumeName: {ID: VolumeName, Label: "Volume", From: report.FromLatest, Priority: 4}, StorageClassName: {ID: StorageClassName, Label: "Storage class", From: report.FromLatest, Priority: 5}, VolumeCapacity: {ID: VolumeCapacity, Label: "Capacity", From: report.FromLatest, Priority: 6}, } StorageClassMetadataTemplates = report.MetadataTemplates{ NodeType: {ID: NodeType, Label: "Type", From: report.FromLatest, Priority: 1}, Name: {ID: Name, Label: "Name", From: report.FromLatest, Priority: 2}, Provisioner: {ID: Provisioner, Label: "Provisioner", From: report.FromLatest, Priority: 3}, } VolumeSnapshotMetadataTemplates = report.MetadataTemplates{ NodeType: {ID: NodeType, Label: "Type", From: report.FromLatest, Priority: 1}, Namespace: {ID: Namespace, Label: "Name", From: report.FromLatest, Priority: 2}, VolumeClaim: {ID: VolumeClaim, Label: "Persistent volume claim", From: report.FromLatest, Priority: 3}, SnapshotData: {ID: SnapshotData, Label: "Volume snapshot data", From: report.FromLatest, Priority: 4}, } VolumeSnapshotDataMetadataTemplates = report.MetadataTemplates{ NodeType: {ID: NodeType, Label: "Type", From: report.FromLatest, Priority: 1}, VolumeName: {ID: VolumeName, Label: "Persistent volume", From: report.FromLatest, Priority: 2}, VolumeSnapshotName: {ID: VolumeSnapshotName, Label: "Volume snapshot", From: report.FromLatest, Priority: 3}, } JobMetadataTemplates = report.MetadataTemplates{ NodeType: {ID: NodeType, Label: "Type", From: report.FromLatest, Priority: 1}, Name: {ID: Name, Label: "Name", From: report.FromLatest, Priority: 2}, Namespace: {ID: Namespace, Label: "Namespace", From: report.FromLatest, Priority: 3}, Created: {ID: Created, Label: "Created", From: report.FromLatest, Datatype: report.DateTime, Priority: 4}, report.Pod: {ID: report.Pod, Label: "# Pods", From: report.FromCounters, Datatype: report.Number, Priority: 5}, } JobMetricTemplates = PodMetricTemplates TableTemplates = report.TableTemplates{ LabelPrefix: { ID: LabelPrefix, Label: "Kubernetes labels", Type: report.PropertyListType, Prefix: LabelPrefix, }, } ScalingControls = []report.Control{ { ID: ScaleDown, Human: "Scale down", Icon: "fa fa-minus", Rank: 0, }, { ID: ScaleUp, Human: "Scale up", Icon: "fa fa-plus", Rank: 1, }, } DescribeControl = report.Control{ ID: Describe, Human: "Describe", Icon: "fa fa-file-text", Rank: 2, } )
Exposed for testing
var GetLocalPodUIDs = func(kubeletHost string) (map[string]struct{}, error) { url := fmt.Sprintf("http://%s/pods/", kubeletHost) resp, err := http.Get(url) if err != nil { return nil, err } defer resp.Body.Close() var localPods podList if err := codec.NewDecoder(resp.Body, &codec.JsonHandle{}).Decode(&localPods); err != nil { return nil, err } result := make(map[string]struct{}, len(localPods.Items)) for _, pod := range localPods.Items { result[pod.Metadata.UID] = struct{}{} } return result, nil }
GetLocalPodUIDs obtains the UID of the pods run locally (it's just exported for testing)
var ResourceMap = map[string]schema.GroupKind{ "Pod": {Group: apiv1.GroupName, Kind: "Pod"}, "Service": {Group: apiv1.GroupName, Kind: "Service"}, "Deployment": {Group: apiappsv1.GroupName, Kind: "Deployment"}, "DaemonSet": {Group: apiappsv1.GroupName, Kind: "DaemonSet"}, "StatefulSet": {Group: apiappsv1.GroupName, Kind: "StatefulSet"}, "Job": {Group: apibatchv1.GroupName, Kind: "Job"}, "CronJob": {Group: apibatchv1.GroupName, Kind: "CronJob"}, "Node": {Group: apiv1.GroupName, Kind: "Node"}, "PersistentVolume": {Group: apiv1.GroupName, Kind: "PersistentVolume"}, "PersistentVolumeClaim": {Group: apiv1.GroupName, Kind: "PersistentVolumeClaim"}, "StorageClass": {Group: storagev1.GroupName, Kind: "StorageClass"}, }
ResourceMap is the mapping of resource and their GroupKind
Functions ¶
func IsPauseImageName ¶
IsPauseImageName indicates whether an image name corresponds to a kubernetes pause container image.
func NewEventStore ¶
NewEventStore creates a new Store which triggers watch whenever an object is added, removed or updated.
func NewLogReadCloser ¶
func NewLogReadCloser(readClosersWithLabel map[io.ReadCloser]string) io.ReadCloser
NewLogReadCloser reads from multiple io.ReadCloser, where data is available, and annotates each line with the reader's label
Types ¶
type Client ¶
type Client interface { Stop() WalkPods(f func(Pod) error) error WalkServices(f func(Service) error) error WalkDeployments(f func(Deployment) error) error WalkDaemonSets(f func(DaemonSet) error) error WalkStatefulSets(f func(StatefulSet) error) error WalkCronJobs(f func(CronJob) error) error WalkNamespaces(f func(NamespaceResource) error) error WalkPersistentVolumes(f func(PersistentVolume) error) error WalkPersistentVolumeClaims(f func(PersistentVolumeClaim) error) error WalkStorageClasses(f func(StorageClass) error) error WalkVolumeSnapshots(f func(VolumeSnapshot) error) error WalkVolumeSnapshotData(f func(VolumeSnapshotData) error) error WalkJobs(f func(Job) error) error WatchPods(f func(Event, Pod)) CloneVolumeSnapshot(namespaceID, volumeSnapshotID, persistentVolumeClaimID, capacity string) error CreateVolumeSnapshot(namespaceID, persistentVolumeClaimID, capacity string) error GetLogs(namespaceID, podID string, containerNames []string) (io.ReadCloser, error) Describe(namespaceID, resourceID string, groupKind schema.GroupKind, restMapping apimeta.RESTMapping) (io.ReadCloser, error) DeletePod(namespaceID, podID string) error DeleteVolumeSnapshot(namespaceID, volumeSnapshotID string) error ScaleUp(namespaceID, id string) error ScaleDown(namespaceID, id string) error }
Client keeps track of running kubernetes pods and services
func NewClient ¶
func NewClient(config ClientConfig) (Client, error)
NewClient returns a usable Client. Don't forget to Stop it.
type ClientConfig ¶
type ClientConfig struct { CertificateAuthority string ClientCertificate string ClientKey string Cluster string Context string Insecure bool Kubeconfig string Password string Server string Token string User string Username string }
ClientConfig establishes the configuration for the kubernetes client
type CronJob ¶
type CronJob interface { Meta Selectors() ([]labels.Selector, error) GetNode(probeID string) report.Node }
CronJob represents a Kubernetes cron job
type DaemonSet ¶
type DaemonSet interface { Meta Selector() (labels.Selector, error) GetNode(probeID string) report.Node }
DaemonSet represents a Kubernetes daemonset
func NewDaemonSet ¶
func NewDaemonSet(d *apiv1beta1.DaemonSet) DaemonSet
NewDaemonSet creates a new daemonset
type Deployment ¶
type Deployment interface { Meta Selector() (labels.Selector, error) GetNode(probeID string) report.Node }
Deployment represents a Kubernetes deployment
func NewDeployment ¶
func NewDeployment(d *apiv1beta1.Deployment) Deployment
NewDeployment creates a new Deployment
type Meta ¶
type Meta interface { UID() string Name() string Namespace() string Created() string Labels() map[string]string MetaNode(id string) report.Node }
Meta represents a metadata information about a Kubernetes object
type NamespaceResource ¶
NamespaceResource represents a Kubernetes namespace `Namespace` is already taken in meta.go
func NewNamespace ¶
func NewNamespace(ns *apiv1.Namespace) NamespaceResource
NewNamespace creates a new Namespace
type PersistentVolume ¶
type PersistentVolume interface { Meta GetNode(probeID string) report.Node GetAccessMode() string GetVolume() string GetStorageDriver() string }
PersistentVolume represent kubernetes PersistentVolume interface
func NewPersistentVolume ¶
func NewPersistentVolume(p *apiv1.PersistentVolume) PersistentVolume
NewPersistentVolume returns new persistentVolume type
type PersistentVolumeClaim ¶
type PersistentVolumeClaim interface { Meta Selector() (labels.Selector, error) GetNode(string) report.Node GetStorageClass() string GetCapacity() string }
PersistentVolumeClaim represents kubernetes PVC interface
func NewPersistentVolumeClaim ¶
func NewPersistentVolumeClaim(p *apiv1.PersistentVolumeClaim) PersistentVolumeClaim
NewPersistentVolumeClaim returns new Persistent Volume Claim type
type Pod ¶
type Pod interface { Meta AddParent(topology, id string) NodeName() string GetNode(probeID string) report.Node RestartCount() uint ContainerNames() []string VolumeClaimNames() []string }
Pod represents a Kubernetes pod
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
Reporter generate Reports containing Container and ContainerImage topologies
func NewReporter ¶
func NewReporter(client Client, pipes controls.PipeClient, probeID string, hostID string, probe *probe.Probe, handlerRegistry *controls.HandlerRegistry, nodeName string, kubeletPort uint) *Reporter
NewReporter makes a new Reporter
func (*Reporter) CaptureCronJob ¶
func (r *Reporter) CaptureCronJob(f func(xfer.Request, string, string) xfer.Response) func(xfer.Request) xfer.Response
CaptureCronJob is exported for testing
func (*Reporter) CaptureDaemonSet ¶
func (r *Reporter) CaptureDaemonSet(f func(xfer.Request, string, string) xfer.Response) func(xfer.Request) xfer.Response
CaptureDaemonSet is exported for testing
func (*Reporter) CaptureDeployment ¶
func (r *Reporter) CaptureDeployment(f func(xfer.Request, string, string) xfer.Response) func(xfer.Request) xfer.Response
CaptureDeployment is exported for testing
func (*Reporter) CaptureJob ¶
func (r *Reporter) CaptureJob(f func(xfer.Request, string, string) xfer.Response) func(xfer.Request) xfer.Response
CaptureJob is exported for testing
func (*Reporter) CapturePersistentVolume ¶
func (r *Reporter) CapturePersistentVolume(f func(xfer.Request, string) xfer.Response) func(xfer.Request) xfer.Response
CapturePersistentVolume will return name of PV
func (*Reporter) CapturePersistentVolumeClaim ¶
func (r *Reporter) CapturePersistentVolumeClaim(f func(xfer.Request, string, string, string) xfer.Response) func(xfer.Request) xfer.Response
CapturePersistentVolumeClaim will return name, namespace and capacity of PVC
func (*Reporter) CapturePod ¶
func (r *Reporter) CapturePod(f func(xfer.Request, string, string, []string) xfer.Response) func(xfer.Request) xfer.Response
CapturePod is exported for testing
func (*Reporter) CaptureService ¶
func (r *Reporter) CaptureService(f func(xfer.Request, string, string) xfer.Response) func(xfer.Request) xfer.Response
CaptureService is exported for testing
func (*Reporter) CaptureStatefulSet ¶
func (r *Reporter) CaptureStatefulSet(f func(xfer.Request, string, string) xfer.Response) func(xfer.Request) xfer.Response
CaptureStatefulSet is exported for testing
func (*Reporter) CaptureStorageClass ¶
func (r *Reporter) CaptureStorageClass(f func(xfer.Request, string) xfer.Response) func(xfer.Request) xfer.Response
CaptureStorageClass is exported for testing
func (*Reporter) CaptureVolumeSnapshot ¶
func (r *Reporter) CaptureVolumeSnapshot(f func(xfer.Request, string, string, string, string) xfer.Response) func(xfer.Request) xfer.Response
CaptureVolumeSnapshot will return name, pvc name, namespace and capacity of volume snapshot
func (*Reporter) CaptureVolumeSnapshotData ¶
func (r *Reporter) CaptureVolumeSnapshotData(f func(xfer.Request, string) xfer.Response) func(xfer.Request) xfer.Response
CaptureVolumeSnapshotData will return name of volume snapshot data
func (*Reporter) Describe ¶
Describe will parse the nodeID and return response according to the node (resource) type.
func (*Reporter) GetLogs ¶
func (r *Reporter) GetLogs(req xfer.Request, namespaceID, podID string, containerNames []string) xfer.Response
GetLogs is the control to get the logs for a kubernetes pod
func (*Reporter) Report ¶
Report generates a Report containing Container and ContainerImage topologies
type Service ¶
type Service interface { Meta GetNode(probeID string) report.Node Selector() labels.Selector ClusterIP() string }
Service represents a Kubernetes service
type StatefulSet ¶
type StatefulSet interface { Meta Selector() (labels.Selector, error) GetNode(probeID string) report.Node }
StatefulSet represents a Kubernetes statefulset
func NewStatefulSet ¶
func NewStatefulSet(s *v1beta1.StatefulSet) StatefulSet
NewStatefulSet creates a new statefulset
type StorageClass ¶
StorageClass represent kubernetes StorageClass interface
func NewStorageClass ¶
func NewStorageClass(p *storagev1.StorageClass) StorageClass
NewStorageClass returns new Storage Class type
type VolumeSnapshot ¶
type VolumeSnapshot interface { Meta GetNode(probeID string) report.Node GetVolumeName() string GetCapacity() string }
VolumeSnapshot represent kubernetes VolumeSnapshot interface
func NewVolumeSnapshot ¶
func NewVolumeSnapshot(p *snapshotv1.VolumeSnapshot) VolumeSnapshot
NewVolumeSnapshot returns new Volume Snapshot type
type VolumeSnapshotData ¶
VolumeSnapshotData represent kubernetes VolumeSnapshotData interface
func NewVolumeSnapshotData ¶
func NewVolumeSnapshotData(p *snapshotv1.VolumeSnapshotData) VolumeSnapshotData
NewVolumeSnapshotData returns new Volume Snapshot Data type