Documentation ¶
Index ¶
- Variables
- func ExtractConfigMap(cms *v1.ConfigMapList, version string) (v1.ConfigMap, error)
- func ExtractReleases(cms *v1.ConfigMapList) []string
- func ExtractVersions(cms *v1.ConfigMapList, release string) []string
- func NewCmdGC(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdGCActivities(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdGCGKE(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdGCHelm(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdGCPods(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdGCPreviews(commonOpts *opts.CommonOptions) *cobra.Command
- func NewCmdGCReleases(commonOpts *opts.CommonOptions) *cobra.Command
- func VersionsToDelete(versions []string, desired int) []string
- type ByVersion
- type GCActivitiesOptions
- type GCGKEFlags
- type GCGKEOptions
- type GCHelmOptions
- type GCOptions
- type GCPodsOptions
- type GCPreviewsOptions
- type GCReleasesOptions
- type Rule
- type Rules
Constants ¶
This section is empty.
Variables ¶
var ( GCActivitiesLong = templates.LongDesc(` Garbage collect the Jenkins X PipelineActivity and PipelineRun resources `) GCActivitiesExample = templates.Examples(` # garbage collect PipelineActivity and PipelineRun resources jx gc activities # dry run mode jx gc pa --dry-run `) )
var ( GCGKELong = templates.LongDesc(` Garbage collect Google Container Engine resources that are not deleted when a delete cluster is performed This command will generate the gcloud command to run and delete external loadbalancers and persistent disks that are no longer in use. `) GCGKEExample = templates.Examples(` jx garbage collect gke jx gc gke `) ServiceAccountSuffixes = []string{"-vt", "-ko", "-tf", "-dn", "-ex", "-jb", "-st", "-tk", "-vo", "-bc", "-tekton"} )
var ( GCHelmLong = templates.LongDesc(` Garbage collect Helm ConfigMaps. To facilitate rollbacks, Helm leaves a history of chart versions in place in Kubernetes and these should be pruned at intervals to avoid consuming excessive system resources. `) GCHelmExample = templates.Examples(` jx garbage collect helm jx gc helm `) )
var ( GCPodsLong = templates.LongDesc(` Garbage collect old Pods that have completed or failed `) GCPodsExample = templates.Examples(` # garbage collect old pods of the default age jx gc pods # garbage collect pods older than 10 minutes jx gc pods -a 10m `) )
var ( GCPreviewsLong = templates.LongDesc(` Garbage collect Jenkins X preview environments. If a pull request is merged or closed the associated preview environment will be deleted. `) GCPreviewsExample = templates.Examples(` jx garbage collect previews jx gc previews `) )
var ( GCReleasesLong = templates.LongDesc(` Garbage collect the Jenkins X Activity Custom Resource Definitions `) GCReleasesExample = templates.Examples(` jx garbage collect releases jx gc releases `) )
Functions ¶
func ExtractConfigMap ¶
ExtractConfigMap extracts a configmap
func ExtractReleases ¶
func ExtractReleases(cms *v1.ConfigMapList) []string
ExtractReleases Extract a set of releases from a list of ConfigMaps
func ExtractVersions ¶
func ExtractVersions(cms *v1.ConfigMapList, release string) []string
ExtractVersions Extract a set of versions of a named release from a list of ConfigMaps
func NewCmdGC ¶
func NewCmdGC(commonOpts *opts.CommonOptions) *cobra.Command
NewCmdGC creates a command object for the generic "gc" action, which retrieves one or more resources from a server.
func NewCmdGCActivities ¶
func NewCmdGCActivities(commonOpts *opts.CommonOptions) *cobra.Command
NewCmd s a command object for the "step" command
func NewCmdGCGKE ¶
func NewCmdGCGKE(commonOpts *opts.CommonOptions) *cobra.Command
NewCmdGCGKE is a command object for the "step" command
func NewCmdGCHelm ¶
func NewCmdGCHelm(commonOpts *opts.CommonOptions) *cobra.Command
NewCmdGCHelm a command object for the "garbage collect" command
func NewCmdGCPods ¶
func NewCmdGCPods(commonOpts *opts.CommonOptions) *cobra.Command
NewCmdGCPods creates the command object
func NewCmdGCPreviews ¶
func NewCmdGCPreviews(commonOpts *opts.CommonOptions) *cobra.Command
NewCmd s a command object for the "step" command
func NewCmdGCReleases ¶
func NewCmdGCReleases(commonOpts *opts.CommonOptions) *cobra.Command
NewCmd s a command object for the "step" command
func VersionsToDelete ¶
VersionsToDelete returns a slice of strings
Types ¶
type ByVersion ¶
type ByVersion []string
Components for sorting versions by numeric version number where version name ends in .vddd where ddd is an arbitrary sequence of digits
type GCActivitiesOptions ¶
type GCActivitiesOptions struct { *opts.CommonOptions DryRun bool ReleaseHistoryLimit int PullRequestHistoryLimit int ReleaseAgeLimit time.Duration PullRequestAgeLimit time.Duration PipelineRunAgeLimit time.Duration ProwJobAgeLimit time.Duration // contains filtered or unexported fields }
GetOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
func (*GCActivitiesOptions) Run ¶
func (o *GCActivitiesOptions) Run() error
Run implements this command
type GCGKEFlags ¶
GCGKEFlags contains the flags for the command
type GCGKEOptions ¶
type GCGKEOptions struct { *opts.CommonOptions Flags GCGKEFlags RevisionHistoryLimit int }
GCGKEOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type GCHelmOptions ¶
type GCHelmOptions struct { *opts.CommonOptions RevisionHistoryLimit int OutDir string DryRun bool NoBackup bool }
GetOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
func (*GCHelmOptions) Run ¶
func (o *GCHelmOptions) Run() error
type GCOptions ¶
type GCOptions struct { *opts.CommonOptions Output string }
GCOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type GCPodsOptions ¶
type GCPodsOptions struct { *opts.CommonOptions Selector string Namespace string Age time.Duration }
GCPodsOptions containers the CLI options
func (*GCPodsOptions) MatchesPod ¶
MatchesPod returns true if this pod can be garbage collected
type GCPreviewsOptions ¶
type GCPreviewsOptions struct { *opts.CommonOptions DisableImport bool OutDir string }
GetOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type GCReleasesOptions ¶
type GCReleasesOptions struct { *opts.CommonOptions RevisionHistoryLimit int }
GCReleasesOptions contains the CLI options for this command