Documentation ¶
Index ¶
- Variables
- func GetClientset() (kubernetes.Interface, error)
- func GetDynamicClient() (dynamic.Interface, error)
- func IsRetryableAPIError(err error) bool
- func StartPods(c kubernetes.Interface, namespace string, pod v1.Pod, waitForRunning bool) error
- func WaitForDeploymentToStabilize(c kubernetes.Interface, ns, name string, timeout time.Duration) error
- func WaitForPodComplete(pods corev1.PodInterface, podName string, timeout time.Duration) error
- func WaitForPodReady(pods corev1.PodInterface, podName string) error
- func WaitForPodsWithLabelRunning(c kubernetes.Interface, ns string, label labels.Selector) error
- func WaitForRCToStabilize(c kubernetes.Interface, ns, name string, timeout time.Duration) error
- func WaitForService(c kubernetes.Interface, namespace, name string, exist bool, ...) error
- func WaitForServiceEndpointsNum(c kubernetes.Interface, namespace, serviceName string, expectNum int, ...) error
- type ColorPicker
- type ImageList
- type LogAggregator
- type PodSelector
- type PodStore
Constants ¶
This section is empty.
Variables ¶
var Client = GetClientset
Client is for tests
var DynamicClient = GetDynamicClient
Functions ¶
func GetClientset ¶
func GetClientset() (kubernetes.Interface, error)
func GetDynamicClient ¶ added in v0.10.0
func IsRetryableAPIError ¶ added in v0.3.0
func WaitForDeploymentToStabilize ¶ added in v0.3.0
func WaitForDeploymentToStabilize(c kubernetes.Interface, ns, name string, timeout time.Duration) error
WaitForDeploymentToStabilize waits till the Deployment has a matching generation/replica count between spec and status.
func WaitForPodComplete ¶ added in v0.5.0
func WaitForPodReady ¶
func WaitForPodReady(pods corev1.PodInterface, podName string) error
func WaitForPodsWithLabelRunning ¶ added in v0.3.0
WaitForPodsWithLabelRunning waits up to 10 minutes for all matching pods to become Running and at least one matching pod exists.
func WaitForRCToStabilize ¶ added in v0.3.0
WaitForRCToStabilize waits till the RC has a matching generation/replica count between spec and status.
func WaitForService ¶ added in v0.3.0
func WaitForService(c kubernetes.Interface, namespace, name string, exist bool, interval, timeout time.Duration) error
WaitForService waits until the service appears (exist == true), or disappears (exist == false)
func WaitForServiceEndpointsNum ¶ added in v0.3.0
func WaitForServiceEndpointsNum(c kubernetes.Interface, namespace, serviceName string, expectNum int, interval, timeout time.Duration) error
WaitForServiceEndpointsNum waits until the amount of endpoints that implement service to expectNum.
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(artifacts []*v1alpha2.Artifact) ColorPicker
NewColorPicker creates a new ColorPicker. For each artfact, 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, podSelector PodSelector, colorPicker ColorPicker) *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) Start ¶ added in v0.3.0
func (a *LogAggregator) Start(ctx context.Context) error
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.