app

package
v0.62.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TTYByDefaultKey = "cli.carvel.dev/tty-by-default"
)

Variables

View Source
var (
	ApplyFlagsDeployDefaults = ApplyFlags{
		ClusterChangeOpts: ctlcap.ClusterChangeOpts{
			ApplyIgnored: false,
			Wait:         true,
			WaitIgnored:  false,
		},
	}
	ApplyFlagsDeleteDefaults = ApplyFlags{
		ClusterChangeOpts: ctlcap.ClusterChangeOpts{
			ApplyIgnored: false,
			Wait:         true,
			WaitIgnored:  true,
		},
	}
)
View Source
var (
	CommonFlagGroup = cobrautil.FlagHelpSection{
		Title:      "Common Flags:",
		ExactMatch: []string{"namespace", "app", "file", "diff-changes"},
	}
	DiffFlagGroup = cobrautil.FlagHelpSection{
		Title:       "Diff Flags:",
		PrefixMatch: "diff",
	}
	ApplyFlagGroup = cobrautil.FlagHelpSection{
		Title:       "Apply Flags:",
		PrefixMatch: "apply",
		ExactMatch: []string{
			"dangerous-allow-empty-list-of-resources",
			"dangerous-override-ownership-of-existing-resources",
		},
	}
	WaitFlagGroup = cobrautil.FlagHelpSection{
		Title:       "Wait Flags:",
		PrefixMatch: "wait",
		ExactMatch:  []string{"wait"},
	}
	ResourceFilterFlagGroup = cobrautil.FlagHelpSection{
		Title:       "Resource Filter Flags:",
		PrefixMatch: "filter",
		ExactMatch:  []string{"filter"},
	}
	ResourceValidationFlagGroup = cobrautil.FlagHelpSection{
		Title:       "Resource Validation Flags:",
		PrefixMatch: "allow",
	}
	ResourceManglingFlagGroup = cobrautil.FlagHelpSection{
		Title:      "Resource Mangling Flags:",
		ExactMatch: []string{"into-ns", "map-ns"},
	}
	LogsFlagGroup = cobrautil.FlagHelpSection{
		Title:       "Logs Flags:",
		PrefixMatch: "logs",
		ExactMatch:  []string{"logs"},
	}
	OtherFlagGroup = cobrautil.FlagHelpSection{
		Title:     "Available/Other Flags:",
		NoneMatch: true,
	}
)

Functions

func NewDeleteCmd

func NewDeleteCmd(o *DeleteOptions, flagsFactory cmdcore.FlagsFactory) *cobra.Command

func NewDeployCmd

func NewDeployCmd(o *DeployOptions, flagsFactory cmdcore.FlagsFactory) *cobra.Command

func NewInspectCmd

func NewInspectCmd(o *InspectOptions, flagsFactory cmdcore.FlagsFactory) *cobra.Command

func NewLabelCmd

func NewLabelCmd(o *LabelOptions, flagsFactory cmdcore.FlagsFactory) *cobra.Command

func NewListCmd

func NewListCmd(o *ListOptions, flagsFactory cmdcore.FlagsFactory) *cobra.Command

func NewLogsCmd

func NewLogsCmd(o *LogsOptions, flagsFactory cmdcore.FlagsFactory) *cobra.Command

func NewRenameCmd added in v0.11.0

func NewRenameCmd(o *RenameOptions, flagsFactory cmdcore.FlagsFactory) *cobra.Command

Types

type ApplyFlags

type ApplyFlags struct {
	ctlcap.ClusterChangeSetOpts
	ctlcap.ClusterChangeOpts

	ExitStatus bool
}

func (*ApplyFlags) SetWithDefaults

func (s *ApplyFlags) SetWithDefaults(prefix string, defaults ApplyFlags, cmd *cobra.Command)

type DeleteOptions

type DeleteOptions struct {
	AppFlags            Flags
	DiffFlags           cmdtools.DiffFlags
	ResourceFilterFlags cmdtools.ResourceFilterFlags
	ApplyFlags          ApplyFlags
	ResourceTypesFlags  ResourceTypesFlags
	PrevAppFlags        PrevAppFlags
	// contains filtered or unexported fields
}

func NewDeleteOptions

func NewDeleteOptions(ui ui.UI, depsFactory cmdcore.DepsFactory, logger logger.Logger) *DeleteOptions

func (*DeleteOptions) Run

func (o *DeleteOptions) Run() error

type DeployApplyExitStatus added in v0.62.0

type DeployApplyExitStatus struct {
	// contains filtered or unexported fields
}

func (DeployApplyExitStatus) Error added in v0.62.0

func (d DeployApplyExitStatus) Error() string

func (DeployApplyExitStatus) ExitStatus added in v0.62.0

func (d DeployApplyExitStatus) ExitStatus() int

type DeployConfigOptions

type DeployConfigOptions struct {
	// contains filtered or unexported fields
}

func NewDeployConfigOptions

func NewDeployConfigOptions(ui ui.UI, depsFactory cmdcore.DepsFactory) *DeployConfigOptions

func (*DeployConfigOptions) Run

func (o *DeployConfigOptions) Run() error

type DeployDiffExitStatus added in v0.17.0

type DeployDiffExitStatus struct {
	HasNoChanges bool
}

func (DeployDiffExitStatus) Error added in v0.17.0

func (d DeployDiffExitStatus) Error() string

func (DeployDiffExitStatus) ExitStatus added in v0.17.0

func (d DeployDiffExitStatus) ExitStatus() int

type DeployFlags

type DeployFlags struct {
	ctlapp.PrepareResourcesOpts
	Patch      bool
	AllowEmpty bool

	ExistingNonLabeledResourcesCheck            bool
	ExistingNonLabeledResourcesCheckConcurrency int
	OverrideOwnershipOfExistingResources        bool

	AppChangesMaxToKeep int

	DefaultLabelScopingRules bool

	Logs            bool
	LogsAll         bool
	AppMetadataFile string

	DisableGKScoping bool
}

func (*DeployFlags) Set

func (s *DeployFlags) Set(cmd *cobra.Command)

type DeployOptions

type DeployOptions struct {
	AppFlags            Flags
	PrevAppFlags        PrevAppFlags
	FileFlags           cmdtools.FileFlags
	DiffFlags           cmdtools.DiffFlags
	ResourceFilterFlags cmdtools.ResourceFilterFlags
	ApplyFlags          ApplyFlags
	DeployFlags         DeployFlags
	ResourceTypesFlags  ResourceTypesFlags
	LabelFlags          LabelFlags

	PreflightChecks *preflight.Registry

	FileSystem fs.FS
	// contains filtered or unexported fields
}

func NewDeployOptions

func NewDeployOptions(ui ui.UI, depsFactory cmdcore.DepsFactory, logger logger.Logger, preflights *preflight.Registry) *DeployOptions

func (*DeployOptions) Run

func (o *DeployOptions) Run() error

type ExitStatus added in v0.62.0

type ExitStatus interface {
	ExitStatus() int
}

type FactorySupportObjs added in v0.62.0

type FactorySupportObjs struct {
	CoreClient          kubernetes.Interface
	ResourceTypes       *ctlres.ResourceTypesImpl
	IdentifiedResources ctlres.IdentifiedResources
	Apps                ctlapp.Apps
}

func Factory added in v0.62.0

func Factory(depsFactory cmdcore.DepsFactory, appFlags Flags,
	resTypesFlags ResourceTypesFlags, logger logger.Logger) (ctlapp.App, FactorySupportObjs, error)

func FactoryClients added in v0.62.0

func FactoryClients(depsFactory cmdcore.DepsFactory, nsFlags cmdcore.NamespaceFlags, appNamespace string,
	resTypesFlags ResourceTypesFlags, logger logger.Logger) (FactorySupportObjs, error)

type FailingAPIServicesPolicy added in v0.62.0

type FailingAPIServicesPolicy struct {
	// contains filtered or unexported fields
}

func (*FailingAPIServicesPolicy) CanIgnore added in v0.62.0

func (s *FailingAPIServicesPolicy) CanIgnore(groupVer schema.GroupVersion) bool

func (*FailingAPIServicesPolicy) GVs added in v0.62.0

func (*FailingAPIServicesPolicy) MarkRequiredGVs added in v0.62.0

func (s *FailingAPIServicesPolicy) MarkRequiredGVs(gvs []schema.GroupVersion)

func (*FailingAPIServicesPolicy) MarkRequiredResources added in v0.62.0

func (s *FailingAPIServicesPolicy) MarkRequiredResources(rs []ctlres.Resource)

type Flags added in v0.62.0

type Flags struct {
	NamespaceFlags cmdcore.NamespaceFlags
	Name           string
	AppNamespace   string
}

func (*Flags) Set added in v0.62.0

func (s *Flags) Set(cmd *cobra.Command, flagsFactory cmdcore.FlagsFactory)

type InspectOptions

type InspectOptions struct {
	AppFlags            Flags
	ResourceFilterFlags cmdtools.ResourceFilterFlags
	ResourceTypesFlags  ResourceTypesFlags

	Raw           bool
	Status        bool
	Tree          bool
	ManagedFields bool
	// contains filtered or unexported fields
}

func NewInspectOptions

func NewInspectOptions(ui ui.UI, depsFactory cmdcore.DepsFactory, logger logger.Logger) *InspectOptions

func (*InspectOptions) Run

func (o *InspectOptions) Run() error

type InspectStatusView added in v0.12.0

type InspectStatusView struct {
	Source    string
	Resources []ctlres.Resource
}

func (InspectStatusView) Print added in v0.12.0

func (v InspectStatusView) Print(ui ui.UI)

type LabelFlags

type LabelFlags struct {
	Labels []string
}

func (*LabelFlags) AsMap

func (s *LabelFlags) AsMap() (map[string]string, error)

func (*LabelFlags) Set

func (s *LabelFlags) Set(cmd *cobra.Command)

type LabelOptions

type LabelOptions struct {
	AppFlags Flags
	// contains filtered or unexported fields
}

func NewLabelOptions

func NewLabelOptions(ui ui.UI, depsFactory cmdcore.DepsFactory, logger logger.Logger) *LabelOptions

func (*LabelOptions) Run

func (o *LabelOptions) Run() error

type ListOptions

type ListOptions struct {
	NamespaceFlags cmdcore.NamespaceFlags
	AppFilterFlags cmdtools.AppFilterFlags
	AllNamespaces  bool
	// contains filtered or unexported fields
}

func NewListOptions

func NewListOptions(ui ui.UI, depsFactory cmdcore.DepsFactory, logger logger.Logger) *ListOptions

func (*ListOptions) Run

func (o *ListOptions) Run() error

type LogsFlags

type LogsFlags struct {
	Follow         bool
	Lines          int64
	ContainerNames []string
	ContainerTag   bool
	PodName        string
}

func (*LogsFlags) PodLogOpts

func (s *LogsFlags) PodLogOpts() (ctllogs.PodLogOpts, error)

func (*LogsFlags) Set

func (s *LogsFlags) Set(cmd *cobra.Command)

type LogsOptions

type LogsOptions struct {
	AppFlags  Flags
	LogsFlags LogsFlags
	// contains filtered or unexported fields
}

func NewLogsOptions

func NewLogsOptions(ui ui.UI, depsFactory cmdcore.DepsFactory, logger logger.Logger) *LogsOptions

func (*LogsOptions) Run

func (o *LogsOptions) Run() error

type PrevAppFlags added in v0.62.0

type PrevAppFlags struct {
	PrevAppName string
}

func (*PrevAppFlags) Set added in v0.62.0

func (s *PrevAppFlags) Set(cmd *cobra.Command)

type RenameOptions added in v0.11.0

type RenameOptions struct {
	AppFlags     Flags
	NewName      string
	NewNamespace string
	// contains filtered or unexported fields
}

func NewRenameOptions added in v0.11.0

func NewRenameOptions(ui ui.UI, depsFactory cmdcore.DepsFactory, logger logger.Logger) *RenameOptions

func (*RenameOptions) Run added in v0.11.0

func (o *RenameOptions) Run() error

type ResourceTypesFlags added in v0.15.0

type ResourceTypesFlags struct {
	IgnoreFailingAPIServices   bool
	CanIgnoreFailingAPIService func(schema.GroupVersion) bool

	ScopeToFallbackAllowedNamespaces bool
}

func (*ResourceTypesFlags) FailingAPIServicePolicy added in v0.62.0

func (s *ResourceTypesFlags) FailingAPIServicePolicy() *FailingAPIServicesPolicy

func (*ResourceTypesFlags) Set added in v0.15.0

func (s *ResourceTypesFlags) Set(cmd *cobra.Command)

type UsedGKsScope added in v0.62.0

type UsedGKsScope struct {
	// contains filtered or unexported fields
}

func NewUsedGKsScope added in v0.62.0

func NewUsedGKsScope(newResources []ctlres.Resource) *UsedGKsScope

func (*UsedGKsScope) GKs added in v0.62.0

func (s *UsedGKsScope) GKs() []schema.GroupKind

Jump to

Keyboard shortcuts

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