graphview

package
v3.10.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllDaemonSets

func AllDaemonSets(g osgraph.Graph, excludeNodeIDs IntSet) ([]DaemonSet, IntSet)

AllDaemonSets returns all the DaemonSets that aren't in the excludes set and the set of covered NodeIDs

func AllDeploymentConfigPipelines

func AllDeploymentConfigPipelines(g osgraph.Graph, excludeNodeIDs IntSet) ([]DeploymentConfigPipeline, IntSet)

AllDeploymentConfigPipelines returns all the DCPipelines that aren't in the excludes set and the set of covered NodeIDs

func AllDeployments

func AllDeployments(g osgraph.Graph, excludeNodeIDs IntSet) ([]Deployment, IntSet)

AllDeployments returns all the Deployments that aren't in the excludes set and the set of covered NodeIDs

func AllImagePipelinesFromBuildConfig

func AllImagePipelinesFromBuildConfig(g osgraph.Graph, excludeNodeIDs IntSet) ([]ImagePipeline, IntSet)

func AllPods

func AllPods(g osgraph.Graph, excludeNodeIDs IntSet) ([]Pod, IntSet)

AllPods returns all Pods and the set of covered NodeIDs

func AllReplicaSets

func AllReplicaSets(g osgraph.Graph, excludeNodeIDs IntSet) ([]ReplicaSet, IntSet)

func AllReplicationControllers

func AllReplicationControllers(g osgraph.Graph, excludeNodeIDs IntSet) ([]ReplicationController, IntSet)

AllReplicationControllers returns all the ReplicationControllers that aren't in the excludes set and the set of covered NodeIDs

func AllServiceGroups

func AllServiceGroups(g osgraph.Graph, excludeNodeIDs IntSet) ([]ServiceGroup, IntSet)

AllServiceGroups returns all the ServiceGroups that aren't in the excludes set and the set of covered NodeIDs

func AllStatefulSets

func AllStatefulSets(g osgraph.Graph, excludeNodeIDs IntSet) ([]StatefulSet, IntSet)

AllStatefulSets returns all the StatefulSets that aren't in the excludes set and the set of covered NodeIDs

func CompareImagePipeline

func CompareImagePipeline(a, b *ImagePipeline) bool

func CompareObjectMeta

func CompareObjectMeta(a, b *metav1.ObjectMeta) bool

func MaxRecentContainerRestartsForRC

func MaxRecentContainerRestartsForRC(g osgraph.Graph, rcNode *kubegraph.ReplicationControllerNode) int32

MaxRecentContainerRestartsForRC returns the maximum container restarts in pods in the replication controller node for the last 10 minutes.

func MaxRecentContainerRestartsForRS

func MaxRecentContainerRestartsForRS(g osgraph.Graph, rsNode *kubegraph.ReplicaSetNode) int32

func NewDaemonSet

func NewDaemonSet(g osgraph.Graph, node *kubegraph.DaemonSetNode) (DaemonSet, IntSet)

NewDaemonSet returns the DaemonSet and a set of all the NodeIDs covered by the DaemonSet

func NewDeployment

func NewDeployment(g osgraph.Graph, node *kubegraph.DeploymentNode) (Deployment, IntSet)

NewDeployment returns the Deployment and a set of all the NodeIDs covered by the Deployment

func NewDeploymentConfigPipeline

func NewDeploymentConfigPipeline(g osgraph.Graph, dcNode *appsgraph.DeploymentConfigNode) (DeploymentConfigPipeline, IntSet)

NewDeploymentConfigPipeline returns the DeploymentConfigPipeline and a set of all the NodeIDs covered by the DeploymentConfigPipeline

func NewImagePipelineFromBuildConfigNode

func NewImagePipelineFromBuildConfigNode(g osgraph.Graph, bcNode *buildgraph.BuildConfigNode) (ImagePipeline, IntSet)

NewImagePipeline attempts to locate a build flow from the provided node. If no such build flow can be located, false is returned.

func NewImagePipelineFromImageTagLocation

func NewImagePipelineFromImageTagLocation(g osgraph.Graph, node graph.Node, imageTagLocation ImageTagLocation) (ImagePipeline, IntSet)

NewImagePipelineFromImageTagLocation returns the ImagePipeline and all the nodes contributing to it

func NewPod

func NewPod(g osgraph.Graph, podNode *kubegraph.PodNode) (Pod, IntSet)

NewPod returns the Pod and a set of all the NodeIDs covered by the Pod

func NewReplicaSet

func NewReplicaSet(g osgraph.Graph, rsNode *kubegraph.ReplicaSetNode) (ReplicaSet, IntSet)

NewReplicationController returns the ReplicationController and a set of all the NodeIDs covered by the ReplicationController

func NewReplicationController

func NewReplicationController(g osgraph.Graph, rcNode *kubegraph.ReplicationControllerNode) (ReplicationController, IntSet)

NewReplicationController returns the ReplicationController and a set of all the NodeIDs covered by the ReplicationController

func NewServiceGroup

func NewServiceGroup(g osgraph.Graph, serviceNode *kubegraph.ServiceNode) (ServiceGroup, IntSet)

NewServiceGroup returns the ServiceGroup and a set of all the NodeIDs covered by the service

func NewStatefulSet

func NewStatefulSet(g osgraph.Graph, node *kubegraph.StatefulSetNode) (StatefulSet, IntSet)

NewStatefulSet returns the StatefulSet and a set of all the NodeIDs covered by the StatefulSet

Types

type DaemonSet

type DaemonSet struct {
	DaemonSet *kubegraph.DaemonSetNode

	OwnedPods   []*kubegraph.PodNode
	CreatedPods []*kubegraph.PodNode

	Images []ImagePipeline
}

type Deployment

type Deployment struct {
	Deployment *kubegraph.DeploymentNode

	ActiveDeployment    *kubegraph.ReplicaSetNode
	InactiveDeployments []*kubegraph.ReplicaSetNode

	Images []ImagePipeline
}

type DeploymentConfigPipeline

type DeploymentConfigPipeline struct {
	DeploymentConfig *appsgraph.DeploymentConfigNode

	ActiveDeployment    *kubegraph.ReplicationControllerNode
	InactiveDeployments []*kubegraph.ReplicationControllerNode

	Images []ImagePipeline
}

type ImagePipeline

type ImagePipeline struct {
	Image               ImageTagLocation
	DestinationResolved bool
	ScheduledImport     bool

	Build *buildgraph.BuildConfigNode

	LastSuccessfulBuild   *buildgraph.BuildNode
	LastUnsuccessfulBuild *buildgraph.BuildNode
	ActiveBuilds          []*buildgraph.BuildNode

	// If set, the base image used by the build
	BaseImage ImageTagLocation
	// if set, the build config names that produces the base image
	BaseBuilds []string
	// If set, the source repository that inputs to the build
	Source SourceLocation
}

ImagePipeline represents a build, its output, and any inputs. The input to a build may be another ImagePipeline.

type ImageTagLocation

type ImageTagLocation interface {
	ID() int
	ImageSpec() string
	ImageTag() string
}

ImageTagLocation identifies the source or destination of an image. Represents both a tag in a Docker image repository, as well as a tag in an OpenShift image stream.

type IntSet

type IntSet map[int]sets.Empty

func NewIntSet

func NewIntSet(items ...int) IntSet

NewIntSet creates a IntSet from a list of values.

func (IntSet) Delete

func (s IntSet) Delete(items ...int)

Delete removes all items from the set.

func (IntSet) Has

func (s IntSet) Has(item int) bool

Has returns true iff item is contained in the set.

func (IntSet) Insert

func (s IntSet) Insert(items ...int)

Insert adds items to the set.

func (IntSet) List

func (s IntSet) List() []int

List returns the contents as a sorted string slice.

type Pod

type Pod struct {
	Pod *kubegraph.PodNode
}

type ReplicaSet

type ReplicaSet struct {
	RS *kubegraph.ReplicaSetNode

	OwnedPods   []*kubegraph.PodNode
	CreatedPods []*kubegraph.PodNode
}

func (*ReplicaSet) MaxRecentContainerRestarts

func (rs *ReplicaSet) MaxRecentContainerRestarts() int32

MaxRecentContainerRestarts returns the maximum container restarts for all pods

type ReplicationController

type ReplicationController struct {
	RC *kubegraph.ReplicationControllerNode

	OwnedPods   []*kubegraph.PodNode
	CreatedPods []*kubegraph.PodNode

	ConflictingRCs        []*kubegraph.ReplicationControllerNode
	ConflictingRCIDToPods map[int][]*kubegraph.PodNode
}

func (*ReplicationController) MaxRecentContainerRestarts

func (rc *ReplicationController) MaxRecentContainerRestarts() int32

MaxRecentContainerRestarts returns the maximum container restarts for all pods in replication controller.

type ServiceGroup

type ServiceGroup struct {
	Service *kubegraph.ServiceNode

	DeploymentConfigPipelines []DeploymentConfigPipeline
	ReplicationControllers    []ReplicationController
	ReplicaSets               []ReplicaSet
	DaemonSets                []DaemonSet
	Deployments               []Deployment
	StatefulSets              []StatefulSet

	// TODO: this has to stop
	FulfillingStatefulSets []*kubegraph.StatefulSetNode
	FulfillingDeployments  []*kubegraph.DeploymentNode
	FulfillingDCs          []*appsgraph.DeploymentConfigNode
	FulfillingRCs          []*kubegraph.ReplicationControllerNode
	FulfillingRSs          []*kubegraph.ReplicaSetNode
	FulfillingPods         []*kubegraph.PodNode
	FulfillingDSs          []*kubegraph.DaemonSetNode

	ExposingRoutes []*routegraph.RouteNode
}

ServiceGroup is a service, the DeploymentConfigPipelines it covers, and lists of the other nodes that fulfill it

type ServiceGroupByObjectMeta

type ServiceGroupByObjectMeta []ServiceGroup

func (ServiceGroupByObjectMeta) Len

func (m ServiceGroupByObjectMeta) Len() int

func (ServiceGroupByObjectMeta) Less

func (m ServiceGroupByObjectMeta) Less(i, j int) bool

func (ServiceGroupByObjectMeta) Swap

func (m ServiceGroupByObjectMeta) Swap(i, j int)

type SortedDeploymentConfigPipeline

type SortedDeploymentConfigPipeline []DeploymentConfigPipeline

func (SortedDeploymentConfigPipeline) Len

func (SortedDeploymentConfigPipeline) Less

func (SortedDeploymentConfigPipeline) Swap

func (m SortedDeploymentConfigPipeline) Swap(i, j int)

type SortedImagePipelines

type SortedImagePipelines []ImagePipeline

func (SortedImagePipelines) Len

func (m SortedImagePipelines) Len() int

func (SortedImagePipelines) Less

func (m SortedImagePipelines) Less(i, j int) bool

func (SortedImagePipelines) Swap

func (m SortedImagePipelines) Swap(i, j int)

type SourceLocation

type SourceLocation interface {
	ID() int
}

SourceLocation identifies a repository that is an input to a build.

type StatefulSet

type StatefulSet struct {
	StatefulSet *kubegraph.StatefulSetNode

	OwnedPods   []*kubegraph.PodNode
	CreatedPods []*kubegraph.PodNode

	Images []ImagePipeline
}

Jump to

Keyboard shortcuts

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