livelint

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Apiv1EndpointsInterface added in v0.1.0

type Apiv1EndpointsInterface = apiv1.EndpointsInterface

type Apiv1EventInterface added in v0.1.0

type Apiv1EventInterface = apiv1.EventInterface

type Apiv1Interface added in v0.1.0

type Apiv1Interface = apiv1.CoreV1Interface

type Apiv1NodeInterface added in v0.1.0

type Apiv1NodeInterface = apiv1.NodeInterface

type Apiv1PVCInterface added in v0.1.0

type Apiv1PVCInterface = apiv1.PersistentVolumeClaimInterface

type Apiv1PodInterface added in v0.1.0

type Apiv1PodInterface = apiv1.PodInterface

type Apiv1ServiceInterface added in v0.1.0

type Apiv1ServiceInterface = apiv1.ServiceInterface

type Appsv1Interface added in v0.1.0

type Appsv1Interface = appsv1.AppsV1Interface

type BubbleteaUI added in v0.1.0

type BubbleteaUI struct {
	*tea.Program
	// contains filtered or unexported fields
}

func NewBubbleTeaUI added in v0.1.0

func NewBubbleTeaUI(program *tea.Program) *BubbleteaUI

func (*BubbleteaUI) AddCheckResult added in v0.1.0

func (s *BubbleteaUI) AddCheckResult(checkResult CheckResult)

func (*BubbleteaUI) AskYesNo added in v0.1.0

func (ui *BubbleteaUI) AskYesNo(question string) bool

func (*BubbleteaUI) CompleteCheck added in v0.1.0

func (s *BubbleteaUI) CompleteCheck(outcome summaryMsg)

func (*BubbleteaUI) DisplayCheckCompletion added in v0.1.0

func (ui *BubbleteaUI) DisplayCheckCompletion(completionMsg string, kind SummaryType)

func (*BubbleteaUI) DisplayCheckResult added in v0.1.0

func (ui *BubbleteaUI) DisplayCheckResult(checkResult CheckResult)

func (*BubbleteaUI) DisplayCheckStart added in v0.1.0

func (ui *BubbleteaUI) DisplayCheckStart(checkMsg string)

func (*BubbleteaUI) DisplayContext added in v0.1.0

func (ui *BubbleteaUI) DisplayContext(contextMsg string)

func (*BubbleteaUI) DisplayError added in v0.1.0

func (ui *BubbleteaUI) DisplayError(errorMsg error)

func (*BubbleteaUI) SetVerbose added in v0.1.0

func (ui *BubbleteaUI) SetVerbose()

func (*BubbleteaUI) StartCheck added in v0.1.0

func (s *BubbleteaUI) StartCheck(title string)

func (*BubbleteaUI) StartSpinner added in v0.1.0

func (ui *BubbleteaUI) StartSpinner()

func (*BubbleteaUI) StopSpinner added in v0.1.0

func (ui *BubbleteaUI) StopSpinner()

type CheckResult

type CheckResult struct {
	HasFailed    bool
	Message      string
	Details      []string
	Instructions string
}

type DeploymentInterface added in v0.1.0

type DeploymentInterface = appsv1.DeploymentInterface

type ForwardedPorts added in v0.1.0

type ForwardedPorts struct {
	HTTP       int32
	HTTPFound  bool
	HTTPS      int32
	HTTPSFound bool
}

type IngressInterface added in v0.1.0

type IngressInterface = netv1.IngressInterface

type KubernetesInterface added in v0.1.0

type KubernetesInterface = kubernetes.Interface

type Livelint

type Livelint struct {
	K8s kubernetes.Interface

	HTTP *http.Client
	// contains filtered or unexported fields
}

func New

func New(k8s kubernetes.Interface, config *rest.Config, ui UserInteraction) *Livelint

New creates a livelint application.

func (*Livelint) CheckAreResourceQuotasHit added in v0.1.0

func (n *Livelint) CheckAreResourceQuotasHit(namespace string, deploymentName string) CheckResult

func (*Livelint) CheckAreThereRestartCyclingPods added in v0.1.0

func (n *Livelint) CheckAreThereRestartCyclingPods(pods []apiv1.Pod) CheckResult

func (*Livelint) CheckCanSeeBackends added in v0.1.0

func (n *Livelint) CheckCanSeeBackends(ingress netv1.Ingress, namespace string) CheckResult

func (*Livelint) CheckCanSeeEndpoints added in v0.1.0

func (n *Livelint) CheckCanSeeEndpoints(serviceName string, namespace string) CheckResult

func (*Livelint) CheckCanVisitPublicApp added in v0.1.0

func (n *Livelint) CheckCanVisitPublicApp(namespace string, services []apiv1.Service) CheckResult

func (*Livelint) CheckContainerLogs added in v0.1.0

func (n *Livelint) CheckContainerLogs(pod apiv1.Pod, containerName string) CheckResult

func (*Livelint) CheckFailedMount added in v0.1.0

func (n *Livelint) CheckFailedMount(pod apiv1.Pod) CheckResult

func (*Livelint) CheckForgottenCMDInDockerfile added in v0.1.0

func (n *Livelint) CheckForgottenCMDInDockerfile(c apiv1.Container) CheckResult

func (*Livelint) CheckIsClusterFull added in v0.1.0

func (n *Livelint) CheckIsClusterFull(pods []apiv1.Pod) CheckResult

func (*Livelint) CheckIsMountingPendingPVC added in v0.1.0

func (n *Livelint) CheckIsMountingPendingPVC(pods []apiv1.Pod, namespace string) CheckResult

func (*Livelint) CheckIsNumberOfReplicasCorrect added in v0.1.0

func (n *Livelint) CheckIsNumberOfReplicasCorrect(namespace string, deploymentName string) CheckResult

func (*Livelint) CheckReadinessProbe added in v0.1.0

func (n *Livelint) CheckReadinessProbe(pods []apiv1.Pod) CheckResult

func (*Livelint) RunChecks

func (n *Livelint) RunChecks(namespace, deploymentName string, verbose bool) error

RunChecks checks for potential issues with a deployment.

type Model added in v0.1.0

type Model struct {
	YesNoResponse chan int
	// contains filtered or unexported fields
}

func InitialModel added in v0.1.0

func InitialModel() Model

func (Model) Init added in v0.1.0

func (m Model) Init() tea.Cmd

func (Model) Update added in v0.1.0

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View added in v0.1.0

func (m Model) View() string

type NetworkingV1Interface added in v0.1.0

type NetworkingV1Interface = netv1.NetworkingV1Interface

type ReplicaSetInterface added in v0.1.0

type ReplicaSetInterface = appsv1.ReplicaSetInterface

type SummaryType added in v0.1.0

type SummaryType int

type UserInteraction added in v0.1.0

type UserInteraction interface {
	DisplayContext(contextMsg string)
	DisplayCheckStart(checkMsg string)
	DisplayCheckResult(checkResult CheckResult)
	DisplayCheckCompletion(completionMsg string, kind SummaryType)
	DisplayError(errorMsg error)
	AskYesNo(question string) bool
	SetVerbose()
	StartSpinner()
	StopSpinner()
}

Source Files

Jump to

Keyboard shortcuts

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