Documentation ¶
Index ¶
- Variables
- func AggregatePodWatcher(namespaces []string, aggregate chan<- watch.Event) (func(), error)
- func TopLevelOwnerKey(obj metav1.Object, kind string) string
- func WaitForDeploymentToStabilize(ctx context.Context, c kubernetes.Interface, ns, name string, ...) error
- func WaitForPodInitialized(ctx context.Context, pods corev1.PodInterface, podName string) error
- func WaitForPodSucceeded(ctx context.Context, pods corev1.PodInterface, podName string, ...) error
- type ColorPicker
- type ImageList
- type LogAggregator
- type PodErr
- type PodSelector
- type PodStatus
Constants ¶
This section is empty.
Variables ¶
var ( Client = getClientset DynamicClient = getDynamicClient )
for tests
Functions ¶
func AggregatePodWatcher ¶ added in v0.22.0
AggregatePodWatcher returns a watcher for multiple namespaces.
func TopLevelOwnerKey ¶ added in v0.37.0
TopLevelOwnerKey returns a key associated with the top level owner of a Kubernetes resource in the form Kind-Name
func WaitForDeploymentToStabilize ¶ added in v0.3.0
func WaitForDeploymentToStabilize(ctx context.Context, c kubernetes.Interface, ns, name string, timeout time.Duration) error
WaitForDeploymentToStabilize waits until the Deployment has a matching generation/replica count between spec and status.
func WaitForPodInitialized ¶ added in v0.16.0
WaitForPodInitialized waits until init containers have started running
func WaitForPodSucceeded ¶ added in v0.32.0
func WaitForPodSucceeded(ctx context.Context, pods corev1.PodInterface, podName string, timeout time.Duration) error
WaitForPodSucceeded waits until the Pod status is Succeeded.
Types ¶
type ColorPicker ¶ added in v0.4.0
ColorPicker is used to associate colors for with pods so that the container logs can be output to the terminal with a consistent color being used to identify logs from each pod.
func NewColorPicker ¶ added in v0.4.0
func NewColorPicker(baseImageNames []string) ColorPicker
NewColorPicker creates a new ColorPicker. For each artifact, a color will be selected sequentially from `colorCodes`. If all colors are used, the first color will be used again. The formatter for the associated color will then be returned by `Pick` each time it is called for the artifact and can be used to write to out in that color.
type ImageList ¶ added in v0.4.0
ImageList implements PodSelector based on a list of images names.
func NewImageList ¶ added in v0.4.0
func NewImageList() *ImageList
NewImageList creates a new ImageList.
type LogAggregator ¶ added in v0.3.0
type LogAggregator struct {
// contains filtered or unexported fields
}
LogAggregator aggregates the logs for all the deployed pods.
func NewLogAggregator ¶ added in v0.3.0
func NewLogAggregator(out io.Writer, cli *kubectl.CLI, baseImageNames []string, podSelector PodSelector, namespaces []string) *LogAggregator
NewLogAggregator creates a new LogAggregator for a given output.
func (*LogAggregator) IsMuted ¶ added in v0.3.0
func (a *LogAggregator) IsMuted() bool
IsMuted says if the logs are to be muted.
func (*LogAggregator) SetSince ¶ added in v0.33.0
func (a *LogAggregator) SetSince(t time.Time)
func (*LogAggregator) Start ¶ added in v0.3.0
func (a *LogAggregator) Start(ctx context.Context) error
Start starts a logger that listens to pods and tail their logs if they are matched by the `podSelector`.
func (*LogAggregator) Unmute ¶ added in v0.3.0
func (a *LogAggregator) Unmute()
Unmute unmutes the logs.
type PodSelector ¶ added in v0.4.0
PodSelector is used to choose which pods to log.
type PodStatus ¶ added in v0.40.0
type PodStatus struct {
// contains filtered or unexported fields
}
func GetPodDetails ¶ added in v0.40.0
func GetPodDetails(client kubernetes.Interface, ns string, podName string) PodStatus