Documentation ¶
Index ¶
- Constants
- func AddAllDeploymentConfigsDeploymentEdges(g osgraph.MutableUniqueGraph)
- func AddAllTriggerDeploymentConfigsEdges(g osgraph.MutableUniqueGraph)
- func AddAllVolumeClaimEdges(g osgraph.Graph)
- func AddDeploymentConfigsDeploymentEdges(g osgraph.MutableUniqueGraph, node *appsgraph.DeploymentConfigNode) *appsgraph.DeploymentConfigNode
- func AddTriggerDeploymentConfigsEdges(g osgraph.MutableUniqueGraph, node *appsgraph.DeploymentConfigNode) *appsgraph.DeploymentConfigNode
- func AddVolumeClaimEdges(g osgraph.Graph, dcNode *appsgraph.DeploymentConfigNode)
- func BelongsToDeploymentConfig(config *appsv1.DeploymentConfig, b *corev1.ReplicationController) bool
- func EachTemplateImage(pod *corev1.PodSpec, triggerFn TriggeredByFunc, fn func(TemplateImage, error))
- func RelevantDeployments(g osgraph.Graph, dcNode *appsgraph.DeploymentConfigNode) (*kubegraph.ReplicationControllerNode, []*kubegraph.ReplicationControllerNode)
- type RecentDeploymentReferences
- type TemplateImage
- type TriggeredByFunc
Constants ¶
const ( // TriggersDeploymentEdgeKind points from DeploymentConfigs to ImageStreamTags that trigger the deployment TriggersDeploymentEdgeKind = "TriggersDeployment" // UsedInDeploymentEdgeKind points from DeploymentConfigs to DockerImageReferences that are used in the deployment UsedInDeploymentEdgeKind = "UsedInDeployment" // DeploymentEdgeKind points from DeploymentConfigs to the ReplicationControllers that are fulfilling the deployment DeploymentEdgeKind = "Deployment" // VolumeClaimEdgeKind goes from DeploymentConfigs to PersistentVolumeClaims indicating a request for persistent storage. VolumeClaimEdgeKind = "VolumeClaim" // ManagedByControllerEdgeKind goes from Pod to controller when the Pod satisfies a controller's label selector ManagedByControllerEdgeKind = "ManagedByController" )
Variables ¶
This section is empty.
Functions ¶
func AddAllDeploymentConfigsDeploymentEdges ¶
func AddAllDeploymentConfigsDeploymentEdges(g osgraph.MutableUniqueGraph)
func AddAllTriggerDeploymentConfigsEdges ¶
func AddAllTriggerDeploymentConfigsEdges(g osgraph.MutableUniqueGraph)
func AddAllVolumeClaimEdges ¶
func AddDeploymentConfigsDeploymentEdges ¶
func AddDeploymentConfigsDeploymentEdges(g osgraph.MutableUniqueGraph, node *appsgraph.DeploymentConfigNode) *appsgraph.DeploymentConfigNode
func AddTriggerDeploymentConfigsEdges ¶
func AddTriggerDeploymentConfigsEdges(g osgraph.MutableUniqueGraph, node *appsgraph.DeploymentConfigNode) *appsgraph.DeploymentConfigNode
AddTriggerDeploymentConfigsEdges creates edges that point to named container image repositories for each image used in the deployment.
func AddVolumeClaimEdges ¶
func AddVolumeClaimEdges(g osgraph.Graph, dcNode *appsgraph.DeploymentConfigNode)
func BelongsToDeploymentConfig ¶
func BelongsToDeploymentConfig(config *appsv1.DeploymentConfig, b *corev1.ReplicationController) bool
func EachTemplateImage ¶
func EachTemplateImage(pod *corev1.PodSpec, triggerFn TriggeredByFunc, fn func(TemplateImage, error))
EachTemplateImage iterates a pod spec, looking for triggers that match each container and invoking fn with each located image.
func RelevantDeployments ¶
func RelevantDeployments(g osgraph.Graph, dcNode *appsgraph.DeploymentConfigNode) (*kubegraph.ReplicationControllerNode, []*kubegraph.ReplicationControllerNode)
RelevantDeployments returns the active deployment and a list of inactive deployments (in order from newest to oldest)
Types ¶
type RecentDeploymentReferences ¶
type RecentDeploymentReferences []*kubegraph.ReplicationControllerNode
func (RecentDeploymentReferences) Len ¶
func (m RecentDeploymentReferences) Len() int
func (RecentDeploymentReferences) Less ¶
func (m RecentDeploymentReferences) Less(i, j int) bool
func (RecentDeploymentReferences) Swap ¶
func (m RecentDeploymentReferences) Swap(i, j int)
type TemplateImage ¶
type TemplateImage struct { Image string Ref *reference.DockerImageReference From *corev1.ObjectReference Container *corev1.Container }
TemplateImage is a structure for helping a caller iterate over a PodSpec
func IgnoreTriggers ¶
func IgnoreTriggers(container *corev1.Container) (TemplateImage, bool)
IgnoreTriggers ignores the triggers
func TemplateImageForContainer ¶
func TemplateImageForContainer(pod *corev1.PodSpec, triggerFn TriggeredByFunc, containerName string) (TemplateImage, error)
TemplateImageForContainer locates the requested container in a pod spec, returning information about the trigger (if it exists), or an error.
type TriggeredByFunc ¶
type TriggeredByFunc func(container *corev1.Container) (TemplateImage, bool)
TriggeredByFunc returns a TemplateImage or error from the provided container
func DeploymentConfigHasTrigger ¶
func DeploymentConfigHasTrigger(config *appsv1.DeploymentConfig) TriggeredByFunc
DeploymentConfigHasTrigger returns a function that can identify the image for each container.