Documentation
¶
Index ¶
- Constants
- Variables
- func Execute(rootCmd *cobra.Command, stdin io.Reader, stdout io.Writer, stderr io.Writer) error
- func GetRootCmd() *cobra.Command
- func NewCmdCompletion(out io.Writer, parentName string) *cobra.Command
- func RunCompletion(out io.Writer, cmd *cobra.Command, args []string) error
- func Version() *cobra.Command
- type ChartLintResult
- type ClusterTimeoutError
- type ExtractedPaths
- type HelmLintResults
- type ImageExtractResults
- type ImageSummary
- type JSONLintOutput
- type LintMessage
- type LintMetadata
- type LintSummary
- type LintableResult
- type PreflightLintResult
- type PreflightLintResults
- type ResourceSummary
- type SupportBundleLintResult
- type SupportBundleLintResults
- type VM
- type VMTimeoutError
Constants ¶
const ( EndpointTypeSSH = "ssh" EndpointTypeSCP = "scp" )
const (
KubeConfigEnvVar = "KUBECONFIG"
)
Variables ¶
var ( ErrCompletionShellNotSpecified = errors.New("Shell not specified.") ErrCompletionTooMayArguments = errors.New("Too many arguments. Expected only the shell type.") )
var (
ErrCompatibilityMatrixTermsNotAccepted = errors.New("You must read and accept the Compatibility Matrix Terms of Service before using this command. To view, please visit https://vendor.replicated.com/compatibility-matrix")
)
var ErrVMWaitDurationExceeded = errors.New("wait duration exceeded")
var ErrWaitDurationExceeded = errors.New("wait duration exceeded")
Functions ¶
func Execute ¶
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func GetRootCmd ¶ added in v0.10.0
RootCmd represents the base command when called without any subcommands
func NewCmdCompletion ¶ added in v0.57.0
func RunCompletion ¶ added in v0.57.0
Types ¶
type ChartLintResult ¶ added in v0.117.0
type ChartLintResult struct {
Path string `json:"path"`
Success bool `json:"success"`
Messages []LintMessage `json:"messages"`
Summary ResourceSummary `json:"summary"`
}
ChartLintResult represents lint results for a single Helm chart
func (ChartLintResult) GetMessages ¶ added in v0.117.0
func (c ChartLintResult) GetMessages() []LintMessage
func (ChartLintResult) GetPath ¶ added in v0.117.0
func (c ChartLintResult) GetPath() string
Implement LintableResult interface for ChartLintResult
func (ChartLintResult) GetSuccess ¶ added in v0.117.0
func (c ChartLintResult) GetSuccess() bool
func (ChartLintResult) GetSummary ¶ added in v0.117.0
func (c ChartLintResult) GetSummary() ResourceSummary
type ClusterTimeoutError ¶ added in v0.107.0
func (ClusterTimeoutError) Error ¶ added in v0.107.0
func (e ClusterTimeoutError) Error() string
type ExtractedPaths ¶ added in v0.117.0
type ExtractedPaths struct {
// Helm: simple paths (Chart.yaml validation delegated to helm tool)
ChartPaths []string
// Preflight: paths with chart metadata for template rendering
Preflights []lint2.PreflightWithValues
// Support bundles: simple paths
SupportBundles []string
// Shared: HelmChart manifests (used by preflight + image extraction)
HelmChartManifests map[string]*lint2.HelmChartManifest
// Image extraction: charts with metadata (only if verbose)
ChartsWithMetadata []lint2.ChartWithMetadata
// Tool versions
HelmVersion string
PreflightVersion string
SBVersion string
// Metadata
ConfigPath string
}
ExtractedPaths contains all paths and metadata needed for linting. This struct consolidates extraction logic across all linters to avoid duplication.
type HelmLintResults ¶ added in v0.117.0
type HelmLintResults struct {
Enabled bool `json:"enabled"`
Charts []ChartLintResult `json:"charts"`
}
HelmLintResults contains all Helm chart lint results
type ImageExtractResults ¶ added in v0.117.0
type ImageExtractResults struct {
Images []imageextract.ImageRef `json:"images"`
Warnings []imageextract.Warning `json:"warnings"`
Summary ImageSummary `json:"summary"`
}
ImageExtractResults contains extracted image information
type ImageSummary ¶ added in v0.117.0
type ImageSummary struct {
TotalImages int `json:"total_images"`
UniqueImages int `json:"unique_images"`
}
ImageSummary contains summary statistics for extracted images
type JSONLintOutput ¶ added in v0.117.0
type JSONLintOutput struct {
Metadata LintMetadata `json:"metadata"`
HelmResults *HelmLintResults `json:"helm_results,omitempty"`
PreflightResults *PreflightLintResults `json:"preflight_results,omitempty"`
SupportBundleResults *SupportBundleLintResults `json:"support_bundle_results,omitempty"`
Summary LintSummary `json:"summary"`
Images *ImageExtractResults `json:"images,omitempty"` // Only if --verbose
}
JSONLintOutput represents the complete JSON output structure for lint results
type LintMessage ¶ added in v0.117.0
type LintMessage struct {
Severity string `json:"severity"` // ERROR, WARNING, INFO
Path string `json:"path,omitempty"`
Message string `json:"message"`
}
LintMessage represents a single lint issue (wraps lint2.LintMessage with JSON tags)
type LintMetadata ¶ added in v0.117.0
type LintMetadata struct {
Timestamp string `json:"timestamp"`
ConfigFile string `json:"config_file"`
HelmVersion string `json:"helm_version,omitempty"`
PreflightVersion string `json:"preflight_version,omitempty"`
SupportBundleVersion string `json:"support_bundle_version,omitempty"`
CLIVersion string `json:"cli_version"`
}
LintMetadata contains execution context and environment information
type LintSummary ¶ added in v0.117.0
type LintSummary struct {
TotalResources int `json:"total_resources"`
PassedResources int `json:"passed_resources"`
FailedResources int `json:"failed_resources"`
TotalErrors int `json:"total_errors"`
TotalWarnings int `json:"total_warnings"`
TotalInfo int `json:"total_info"`
OverallSuccess bool `json:"overall_success"`
}
LintSummary contains overall statistics across all linted resources
type LintableResult ¶ added in v0.117.0
type LintableResult interface {
GetPath() string
GetSuccess() bool
GetMessages() []LintMessage
GetSummary() ResourceSummary
}
LintableResult is an interface for types that contain lint results. This allows generic handling of chart, preflight, and support bundle results.
type PreflightLintResult ¶ added in v0.117.0
type PreflightLintResult struct {
Path string `json:"path"`
Success bool `json:"success"`
Messages []LintMessage `json:"messages"`
Summary ResourceSummary `json:"summary"`
}
PreflightLintResult represents lint results for a single Preflight spec
func (PreflightLintResult) GetMessages ¶ added in v0.117.0
func (p PreflightLintResult) GetMessages() []LintMessage
func (PreflightLintResult) GetPath ¶ added in v0.117.0
func (p PreflightLintResult) GetPath() string
Implement LintableResult interface for PreflightLintResult
func (PreflightLintResult) GetSuccess ¶ added in v0.117.0
func (p PreflightLintResult) GetSuccess() bool
func (PreflightLintResult) GetSummary ¶ added in v0.117.0
func (p PreflightLintResult) GetSummary() ResourceSummary
type PreflightLintResults ¶ added in v0.117.0
type PreflightLintResults struct {
Enabled bool `json:"enabled"`
Specs []PreflightLintResult `json:"specs"`
}
PreflightLintResults contains all Preflight spec lint results
type ResourceSummary ¶ added in v0.117.0
type ResourceSummary struct {
ErrorCount int `json:"error_count"`
WarningCount int `json:"warning_count"`
InfoCount int `json:"info_count"`
}
ResourceSummary contains counts by severity for a resource
type SupportBundleLintResult ¶ added in v0.117.0
type SupportBundleLintResult struct {
Path string `json:"path"`
Success bool `json:"success"`
Messages []LintMessage `json:"messages"`
Summary ResourceSummary `json:"summary"`
}
SupportBundleLintResult represents lint results for a single Support Bundle spec
func (SupportBundleLintResult) GetMessages ¶ added in v0.117.0
func (s SupportBundleLintResult) GetMessages() []LintMessage
func (SupportBundleLintResult) GetPath ¶ added in v0.117.0
func (s SupportBundleLintResult) GetPath() string
Implement LintableResult interface for SupportBundleLintResult
func (SupportBundleLintResult) GetSuccess ¶ added in v0.117.0
func (s SupportBundleLintResult) GetSuccess() bool
func (SupportBundleLintResult) GetSummary ¶ added in v0.117.0
func (s SupportBundleLintResult) GetSummary() ResourceSummary
type SupportBundleLintResults ¶ added in v0.117.0
type SupportBundleLintResults struct {
Enabled bool `json:"enabled"`
Specs []SupportBundleLintResult `json:"specs"`
}
SupportBundleLintResults contains all Support Bundle spec lint results
type VMTimeoutError ¶ added in v0.107.0
func (VMTimeoutError) Error ¶ added in v0.107.0
func (e VMTimeoutError) Error() string
Source Files
¶
- api.go
- api_get.go
- api_patch.go
- api_post.go
- api_put.go
- app.go
- app_create.go
- app_hostname.go
- app_hostname_ls.go
- app_ls.go
- app_rm.go
- cache_helper.go
- channel_adoption.go
- channel_counts.go
- channel_create.go
- channel_disable_semantic_versioning.go
- channel_enable_semantic_versioning.go
- channel_inspect.go
- channel_ls.go
- channel_release_demote.go
- channel_release_undemote.go
- channel_releases.go
- channel_rm.go
- cluster.go
- cluster_addon.go
- cluster_addon_create.go
- cluster_addon_create_objectstore.go
- cluster_addon_ls.go
- cluster_addon_rm.go
- cluster_create.go
- cluster_kubeconfig.go
- cluster_ls.go
- cluster_nodegroup.go
- cluster_nodegroup_ls.go
- cluster_port.go
- cluster_port_expose.go
- cluster_port_ls.go
- cluster_port_rm.go
- cluster_prepare.go
- cluster_rm.go
- cluster_shell.go
- cluster_update.go
- cluster_update_nodegroup.go
- cluster_update_ttl.go
- cluster_upgrade.go
- cluster_versions.go
- collection.go
- collection_addmodel.go
- collection_create.go
- collection_ls.go
- collection_removemodel.go
- collection_rm.go
- collector_create.go
- collector_inspect.go
- collector_ls.go
- collector_promote.go
- collector_update.go
- collectors.go
- completion.go
- config.go
- customer.go
- customer_archive.go
- customer_create.go
- customer_download_license.go
- customer_inspect.go
- customer_ls.go
- customer_update.go
- default.go
- default_clear.go
- default_clearall.go
- default_set.go
- default_show.go
- enterprise_portal_invite.go
- enterprise_portal_status.go
- enterprise_portal_user.go
- enterprise_portal_user_ls.go
- enterpriseportal.go
- enterpriseportal_status_get.go
- enterpriseportal_status_update.go
- init.go
- installer.go
- installer_create.go
- installer_ls.go
- instance.go
- instance_inspect.go
- instance_ls.go
- instance_tag.go
- lint.go
- lint_types.go
- login.go
- logout.go
- model.go
- model_ls.go
- model_pull.go
- model_push.go
- model_rm.go
- network.go
- network_create.go
- network_ls.go
- network_report.go
- network_rm.go
- network_update.go
- profile.go
- profile_add.go
- profile_edit.go
- profile_ls.go
- profile_rm.go
- profile_set_default.go
- profile_use.go
- registry.go
- registry_add.go
- registry_add_dockerhub.go
- registry_add_ecr.go
- registry_add_gar.go
- registry_add_gcr.go
- registry_add_ghcr.go
- registry_add_other.go
- registry_add_quay.go
- registry_logs.go
- registry_ls.go
- registry_rm.go
- registry_validate.go
- release_compatibility.go
- release_create.go
- release_download.go
- release_image_ls.go
- release_inspect.go
- release_lint.go
- release_ls.go
- release_promote.go
- release_update.go
- release_validate.go
- root.go
- runner.go
- version.go
- version_upgrade.go
- vm.go
- vm_create.go
- vm_endpoints.go
- vm_ls.go
- vm_port.go
- vm_port_expose.go
- vm_port_ls.go
- vm_port_rm.go
- vm_rm.go
- vm_update.go
- vm_update_ttl.go
- vm_versions.go