Documentation ¶
Overview ¶
Package cli sets up the CLI commands for the fleet apply binary.
Index ¶
- func App() *cobra.Command
- func NewApply() *cobra.Command
- func NewCleanUp() *cobra.Command
- func NewDeploy() *cobra.Command
- func NewTarget() *cobra.Command
- func NewTest() *cobra.Command
- type Apply
- type BundleInputArgs
- type CleanUp
- type Deploy
- type Fleet
- type FleetClient
- type Getter
- type OutputArgsNoDefault
- type Target
- type Test
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCleanUp ¶
NewCleanup returns a subcommand to `cleanup` cluster registrations
func NewDeploy ¶ added in v0.10.0
NewDeploy returns a subcommand to deploy a bundledeployment/content resource to a cluster.
Types ¶
type Apply ¶
type Apply struct { FleetClient BundleInputArgs OutputArgsNoDefault Label map[string]string `usage:"Labels to apply to created bundles" short:"l"` TargetsFile string `usage:"Addition source of targets and restrictions to be append"` Compress bool `usage:"Force all resources to be compress" short:"c"` ServiceAccount string `usage:"Service account to assign to bundle created" short:"a"` SyncGeneration int `usage:"Generation number used to force sync the deployment"` TargetNamespace string `usage:"Ensure this bundle goes to this target namespace"` Paused bool `usage:"Create bundles in a paused state"` Commit string `usage:"Commit to assign to the bundle" env:"COMMIT"` Username string `usage:"Basic auth username for helm repo" env:"HELM_USERNAME"` PasswordFile string `usage:"Path of file containing basic auth password for helm repo"` CACertsFile string `usage:"Path of custom cacerts for helm repo" name:"cacerts-file"` SSHPrivateKeyFile string `usage:"Path of ssh-private-key for helm repo" name:"ssh-privatekey-file"` HelmRepoURLRegex string `` /* 166-byte string literal not displayed */ KeepResources bool `usage:"Keep resources created after the GitRepo or Bundle is deleted" name:"keep-resources"` DeleteNamespace bool `usage:"Delete GitRepo target namespace after the GitRepo or Bundle is deleted" name:"delete-namespace"` HelmCredentialsByPathFile string `usage:"Path of file containing helm credentials for paths" name:"helm-credentials-by-path-file"` CorrectDrift bool `usage:"Rollback any change made from outside of Fleet" name:"correct-drift"` CorrectDriftForce bool `usage:"Use --force when correcting drift. Resources can be deleted and recreated" name:"correct-drift-force"` CorrectDriftKeepFailHistory bool `usage:"Keep helm history for failed rollbacks" name:"correct-drift-keep-fail-history"` OCIReference string `usage:"OCI registry reference" name:"oci-reference"` OCIUsername string `usage:"Basic auth username for OCI registry" env:"OCI_USERNAME"` OCIPasswordFile string `usage:"Path of file containing basic auth password for OCI registry" name:"oci-password-file"` OCIBasicHTTP bool `usage:"Use HTTP to access the OCI regustry" name:"oci-basic-http"` OCIInsecure bool `usage:"Allow connections to OCI registry without certs" name:"oci-insecure"` }
func (*Apply) PersistentPre ¶ added in v0.10.0
type BundleInputArgs ¶
type CleanUp ¶
type CleanUp struct { FleetClient Min string `usage:"Minimum delay between deletes (default: 10ms)" name:"min"` Max string `usage:"Maximum delay between deletes (default: 5s)" name:"max"` Factor string `usage:"Factor to increase delay between deletes (default: 1.1)" name:"factor"` }
func (*CleanUp) PersistentPre ¶ added in v0.10.0
type Deploy ¶ added in v0.10.0
type Deploy struct { InputFile string `usage:"Location of the YAML file containing the content and the bundledeployment resource" short:"i"` DryRun bool `usage:"Print the resources that would be deployed, but do not actually deploy them" short:"d"` Namespace string `usage:"Set the default namespace. Deploy helm chart into this namespace." short:"n"` KubeVersion string `usage:"For dry runs, sets the Kubernetes version to assume when validating Chart Kubernetes version constraints."` // AgentNamespace is set as an annotation on the chart.yaml in the helm release. Fleet-agent will manage charts with a matching label. AgentNamespace string `` /* 182-byte string literal not displayed */ }
type FleetClient ¶ added in v0.10.0
type FleetClient struct { command.DebugConfig Namespace string `usage:"namespace" env:"NAMESPACE" default:"fleet-local" short:"n"` Kubeconfig string `usage:"kubeconfig for authentication" short:"k"` Context string `usage:"kubeconfig context for authentication"` }
type OutputArgsNoDefault ¶
type OutputArgsNoDefault struct {
Output string `usage:"Output contents to file or - for stdout" short:"o"`
}
type Target ¶ added in v0.10.0
type Target struct { BundleFile string `usage:"Location of the Bundle resource yaml" short:"b"` DumpInputList bool `usage:"Dump the live resources, which impact targeting, like clusters, as YAML" short:"l"` Namespace string `usage:"Override the namespace of the bundle. Targeting searches this namespace for clusters." short:"n"` }
type Test ¶
type Test struct { BundleInputArgs Quiet bool `usage:"Just print the match and don't print the resources" short:"q"` Group string `usage:"Cluster group to match against" short:"g"` Name string `usage:"Cluster name to match against" short:"N"` Label map[string]string `usage:"Cluster labels to match against" short:"l"` GroupLabel map[string]string `usage:"Cluster group labels to match against" short:"L"` Target string `usage:"Explicit target to match" short:"t"` }
Directories ¶
Path | Synopsis |
---|---|
Package apply creates bundle resources from gitrepo resources.
|
Package apply creates bundle resources from gitrepo resources. |
Package match is used to test matching a bundles to a target on the command line.
|
Package match is used to test matching a bundles to a target on the command line. |
Package writer provides a writer that can be used to write to a file or stdout.
|
Package writer provides a writer that can be used to write to a file or stdout. |
Click to show internal directories.
Click to hide internal directories.