resource

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MsgKubectlConnection = "kubectl connection error\n"
)

Functions

This section is empty.

Types

type Deployment

type Deployment struct {
	// contains filtered or unexported fields
}

func NewDeployment

func NewDeployment(name string, ns string, deadline time.Duration) *Deployment

func (*Deployment) CheckStatus added in v0.39.0

func (d *Deployment) CheckStatus(ctx context.Context, cfg kubectl.Config)

func (*Deployment) Deadline

func (d *Deployment) Deadline() time.Duration

func (*Deployment) HasEncounteredUnrecoverableError added in v1.7.1

func (d *Deployment) HasEncounteredUnrecoverableError() bool

HasEncounteredUnrecoverableError goes through all pod statuses and return true if any cannot be recovered

func (*Deployment) IsStatusCheckCompleteOrCancelled added in v1.7.1

func (d *Deployment) IsStatusCheckCompleteOrCancelled() bool

func (*Deployment) MarkComplete added in v1.7.1

func (d *Deployment) MarkComplete()

func (*Deployment) Name

func (d *Deployment) Name() string

func (*Deployment) ReportSinceLastUpdated added in v1.7.1

func (d *Deployment) ReportSinceLastUpdated(isMuted bool) string

ReportSinceLastUpdated returns a string representing deployment status along with tab header e.g.

  • testNs:deployment/leeroy-app: waiting for rollout to complete. (1/2) pending
  • testNs:pod/leeroy-app-xvbg : error pulling container image

func (*Deployment) Status

func (d *Deployment) Status() Status

func (*Deployment) StatusCode added in v1.7.1

func (d *Deployment) StatusCode() proto.StatusCode

StatusCode() returns the deployment status code if the status check is cancelled or if no pod data exists for this deployment. If pods are fetched, this function returns the error code a pod container encountered.

func (*Deployment) StatusMessage added in v1.7.1

func (d *Deployment) StatusMessage() string

func (*Deployment) String

func (d *Deployment) String() string

func (*Deployment) UpdateStatus

func (d *Deployment) UpdateStatus(ae proto.ActionableErr)

func (*Deployment) WithPodStatuses added in v1.7.1

func (d *Deployment) WithPodStatuses(scs []proto.StatusCode) *Deployment

func (*Deployment) WithValidator added in v1.7.1

func (d *Deployment) WithValidator(pd diag.Diagnose) *Deployment

type Status

type Status struct {
	// contains filtered or unexported fields
}

func (Status) ActionableError added in v1.7.1

func (rs Status) ActionableError() proto.ActionableErr

func (Status) Equal added in v0.39.0

func (rs Status) Equal(other Status) bool

func (Status) Error

func (rs Status) Error() error

func (Status) String

func (rs Status) String() string

Jump to

Keyboard shortcuts

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