apputil

package
v0.0.0-...-14bfc43 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePodInfoByRowID

func ComparePodInfoByRowID(a gsc.PodInfo, b gsc.PodInfo) int

func CopySQLiteDB

func CopySQLiteDB(srcDBPath, dstDBPath string) error

func CreateLandscapeClient

func CreateLandscapeClient(kubeconfigPath string, mode gsh.ExecutionMode) (*kubernetes.Clientset, error)

func DetermineMode

func DetermineMode() (gsh.ExecutionMode, error)

func DetermineReportDir

func DetermineReportDir(mode gsh.ExecutionMode) (reportDir string)

func DirExists

func DirExists(filepath string) bool

func DownloadDBFromApp

func DownloadDBFromApp(dbPath string) error

func DownloadReportFromApp

func DownloadReportFromApp(reportPath string) error

func FileExists

func FileExists(filepath string) bool

func FilenameWithoutExtension

func FilenameWithoutExtension(fp string) string

func GetAdminKubeconfig

func GetAdminKubeconfig(ctx context.Context, landscapeClient *kubernetes.Clientset, landscapeName, projectName, shootName string) (string, error)

func GetClusterName

func GetClusterName(replayReportPath string) (fullClusterName string, err error)

func GetClusterNameFromCAReportPath

func GetClusterNameFromCAReportPath(caReportPath string) string

func GetLandscapeKubeconfigs

func GetLandscapeKubeconfigs(mode gsh.ExecutionMode) (map[string]string, error)

func GetNodeName

func GetNodeName(n gsc.NodeInfo, _ int) string

func GetPodCondition

func GetPodCondition(status *corev1.PodStatus, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)

GetPodCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.

func GetPodConditionFromList

func GetPodConditionFromList(conditions []corev1.PodCondition, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)

GetPodConditionFromList extracts the provided condition from the given list of condition and returns the index of the condition and the condition. Returns -1 and nil if the condition is not present.

func GetSRReportPath

func GetSRReportPath(dir, caReportFileName string) string

func GetSeedName

func GetSeedName(ctx context.Context, landscapeClient *kubernetes.Clientset, projectName string, shootName string) (seedName string, err error)

func GetViewerKubeconfig

func GetViewerKubeconfig(ctx context.Context, landscapeClient *kubernetes.Clientset, landscapeName, projectName, shootName string) (string, error)

func GuessProvider

func GuessProvider(s gsh.Scenario) (string, error)

func IsNodeReady

func IsNodeReady(node *corev1.Node) bool

IsNodeReady to check if a node is Ready (Running)

func ListAllReplayReportPairs

func ListAllReplayReportPairs(dir string) (reportPathPairs map[string][]string, err error)

ListAllReplayReportPairs lists all sr and ca reports

func NodeHasMatchingName

func NodeHasMatchingName(name string) func(n gsc.NodeInfo) bool

func PodName

func PodName(p gsc.PodInfo) string

func PodUID

func PodUID(p gsc.PodInfo) string

func SortFileInfosByLastModifiedDesc

func SortFileInfosByLastModifiedDesc(fileInfos []gsh.FileInfo)

func SortPodInfoByCreationTimestamp

func SortPodInfoByCreationTimestamp(a, b gsc.PodInfo) int

func SortPodInfoForDeployment

func SortPodInfoForDeployment(a, b gsc.PodInfo) int

SortPodInfoForDeployment sorts the given podInfos so that kube-system and higher priority pods are sorted first.

func SortPodInfosForReadability

func SortPodInfosForReadability(podInfos []gsc.PodInfo)

SortPodInfosForReadability sorts the given podInfos so that application pods and unscheduled pods appear first in the slice.

func UploadReport

func UploadReport(ctx context.Context, reportPath string) error

func WaitForSignalAndShutdown

func WaitForSignalAndShutdown(ctx context.Context, cancelFunc context.CancelFunc)

Types

This section is empty.

Jump to

Keyboard shortcuts

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