Documentation
¶
Overview ¶
pkg/common/client.go
Index ¶
- Variables
- func BuildFullDumpYAML(cd *ClusterData) string
- func BuildHTMLReport(data *ReportData, tpl string) string
- func BuildKubeClient() (*kubernetes.Clientset, bool)
- func BuildValuesYAML(d *ReportData) string
- func GenerateOutput(sizingReportData *ReportData, inCluster bool)
- func WriteToConfigMap(htmlContent, helmValuesContent, fullDumpContent string)
- func WriteToDisk(htmlContent, helmValuesContent, fullDumpContent string)
- type ClusterData
- type ClusterDetails
- type NodeInfoSummary
- type ReportData
- type SizingResult
Constants ¶
This section is empty.
Variables ¶
View Source
var PrerequisitesReportHTML string
Functions ¶
func BuildFullDumpYAML ¶
func BuildFullDumpYAML(cd *ClusterData) string
func BuildHTMLReport ¶
func BuildHTMLReport(data *ReportData, tpl string) string
func BuildKubeClient ¶
func BuildKubeClient() (*kubernetes.Clientset, bool)
func BuildValuesYAML ¶
func BuildValuesYAML(d *ReportData) string
func GenerateOutput ¶
func GenerateOutput(sizingReportData *ReportData, inCluster bool)
func WriteToConfigMap ¶
func WriteToConfigMap(htmlContent, helmValuesContent, fullDumpContent string)
func WriteToDisk ¶
func WriteToDisk(htmlContent, helmValuesContent, fullDumpContent string)
Types ¶
type ClusterData ¶
type ClusterData struct { Nodes []corev1.Node Pods []corev1.Pod Services []corev1.Service Deployments []appsv1.Deployment ReplicaSets []appsv1.ReplicaSet StatefulSets []appsv1.StatefulSet DaemonSets []appsv1.DaemonSet Jobs []batchv1.Job CronJobs []batchv1.CronJob ClusterDetails ClusterDetails NodeInfoSummaries NodeInfoSummary }
ClusterData aggregates everything we collect from the cluster.
func CollectClusterData ¶
func CollectClusterData(ctx context.Context, clientset *kubernetes.Clientset) (*ClusterData, error)
type ClusterDetails ¶
type ClusterDetails struct { Name string Version string CloudProvider string K8sDistribution string TotalNodeCount int TotalVCPUCount int }
ClusterDetails stores metadata about the cluster
type NodeInfoSummary ¶
type ReportData ¶
type ReportData struct { TotalResources int MaxNodeCPUCapacity int MaxNodeMemoryMB int LargestContainerImageMB int DefaultResourceAllocations map[string]map[string]string FinalResourceAllocations map[string]map[string]string KubernetesVersion string CloudProvider string K8sDistribution string TotalNodeCount int TotalVCPUCount int GenerationTime string HasAnyAdjustments bool NodeOSSummary string NodeArchSummary string NodeKernelVersionSummary string NodeOSImageSummary string NodeContainerRuntimeSummary string NodeKubeletVersionSummary string NodeKubeProxyVersionSummary string FullClusterData *ClusterData PVProvisioningMessage string }
func BuildReportData ¶
func BuildReportData(cd *ClusterData, sr *SizingResult) *ReportData
type SizingResult ¶
type SizingResult struct { TotalResources int MaxNodeCPUCapacity int MaxNodeMemoryMB int LargestContainerImageMB int // Final recommended resource allocations for each component FinalResourceAllocations map[string]map[string]string // Default resource allocations (if you need them, or remove if not) DefaultResourceAllocations map[string]map[string]string // Whether any resource changed from default HasAnyAdjustments bool }
Click to show internal directories.
Click to hide internal directories.