jx: github.com/jenkins-x/jx/pkg/cmd/gc Index | Files

package gc

import "github.com/jenkins-x/jx/pkg/cmd/gc"

Index

Package Files

gc.go gc_activities.go gc_gke.go gc_helm.go gc_pods.go gc_previews.go gc_releases.go

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("" /* 252 byte string literal not displayed */,
    )

    GCGKEExample = templates.Examples(`
		jx garbage collect gke
		jx gc gke
`)

    ServiceAccountSuffixes = []string{"-vt", "-ko", "-tf", "-dn"}
)
var (
    GCHelmLong = templates.LongDesc("" /* 215 byte string literal not displayed */,
    )

    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("" /* 133 byte string literal not displayed */,
    )
)
var (
    GCPreviewsLong = templates.LongDesc("" /* 147 byte string literal not displayed */,
    )

    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
`)
)

func ExtractConfigMap Uses

func ExtractConfigMap(cms *v1.ConfigMapList, version string) (v1.ConfigMap, error)

ExtractConfigMap extracts a configmap

func ExtractReleases Uses

func ExtractReleases(cms *v1.ConfigMapList) []string

ExtractReleases Extract a set of releases from a list of ConfigMaps

func ExtractVersions Uses

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 Uses

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 Uses

func NewCmdGCActivities(commonOpts *opts.CommonOptions) *cobra.Command

NewCmd s a command object for the "step" command

func NewCmdGCGKE Uses

func NewCmdGCGKE(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdGCGKE is a command object for the "step" command

func NewCmdGCHelm Uses

func NewCmdGCHelm(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdGCHelm a command object for the "garbage collect" command

func NewCmdGCPods Uses

func NewCmdGCPods(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdGCPods creates the command object

func NewCmdGCPreviews Uses

func NewCmdGCPreviews(commonOpts *opts.CommonOptions) *cobra.Command

NewCmd s a command object for the "step" command

func NewCmdGCReleases Uses

func NewCmdGCReleases(commonOpts *opts.CommonOptions) *cobra.Command

NewCmd s a command object for the "step" command

func VersionsToDelete Uses

func VersionsToDelete(versions []string, desired int) []string

VersionsToDelete returns a slice of strings

type ByVersion Uses

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

func (ByVersion) Len Uses

func (a ByVersion) Len() int

func (ByVersion) Less Uses

func (a ByVersion) Less(i, j int) bool

func (ByVersion) Swap Uses

func (a ByVersion) Swap(i, j int)

type GCActivitiesOptions Uses

type GCActivitiesOptions struct {
    *opts.CommonOptions

    DryRun                  bool
    ReleaseHistoryLimit     int
    PullRequestHistoryLimit int
    ReleaseAgeLimit         time.Duration
    PullRequestAgeLimit     time.Duration
    PipelineRunAgeLimit     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 Uses

func (o *GCActivitiesOptions) Run() error

Run implements this command

type GCGKEFlags Uses

type GCGKEFlags struct {
    ProjectID string
    RunNow    bool
}

GCGKEFlags contains the flags for the command

type GCGKEOptions Uses

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()

func (*GCGKEOptions) Run Uses

func (o *GCGKEOptions) Run() error

Run implements this command

type GCHelmOptions Uses

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 Uses

func (o *GCHelmOptions) Run() error

type GCOptions Uses

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()

func (*GCOptions) Run Uses

func (o *GCOptions) Run() error

Run implements this command

type GCPodsOptions Uses

type GCPodsOptions struct {
    *opts.CommonOptions

    Selector  string
    Namespace string
    Age       time.Duration
}

GCPodsOptions containers the CLI options

func (*GCPodsOptions) MatchesPod Uses

func (o *GCPodsOptions) MatchesPod(pod *corev1.Pod) (bool, time.Duration)

MatchesPod returns true if this pod can be garbage collected

func (*GCPodsOptions) Run Uses

func (o *GCPodsOptions) Run() error

Run implements this command

type GCPreviewsOptions Uses

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()

func (*GCPreviewsOptions) Run Uses

func (o *GCPreviewsOptions) Run() error

Run implements this command

type GCReleasesOptions Uses

type GCReleasesOptions struct {
    *opts.CommonOptions

    RevisionHistoryLimit int
}

GCReleasesOptions contains the CLI options for this command

func (*GCReleasesOptions) Run Uses

func (o *GCReleasesOptions) Run() error

Run implements this command

type Rule Uses

type Rule struct {
    Name       string   `json:"name"`
    TargetTags []string `json:"targetTags"`
}

type Rules Uses

type Rules struct {
    Rules []Rule
}

Package gc imports 30 packages (graph) and is imported by 2 packages. Updated 2019-11-19. Refresh now. Tools for package owners.