Documentation
¶
Index ¶
- Variables
- func App() *cobra.Command
- func NewAgent() *cobra.Command
- func NewApply() *cobra.Command
- func NewCluster() *cobra.Command
- func NewClusterCreate() *cobra.Command
- func NewClusterDelete() *cobra.Command
- func NewClusterLS() *cobra.Command
- func NewGitRepo() *cobra.Command
- func NewGitRepoAdd() *cobra.Command
- func NewGitRepoLS() *cobra.Command
- func NewInstall() *cobra.Command
- func NewManager() *cobra.Command
- func NewSimulator() *cobra.Command
- func NewTest() *cobra.Command
- func NewToken() *cobra.Command
- func NewTokenCreate() *cobra.Command
- func NewTokenDelete() *cobra.Command
- func NewTokenLS() *cobra.Command
- type Agent
- type Apply
- type BundleInputArgs
- type ClusterCreate
- type ClusterDelete
- type ClusterLS
- type Fleet
- type GitRepoAdd
- type GitRepoLS
- type Manager
- type OutputArgs
- type OutputArgsNoDefault
- type Simulator
- type Test
- type TokenCreate
- type TokenDelete
- type TokenLS
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Client *client.Getter SystemNamespace string Debug command.DebugConfig )
Functions ¶
func NewCluster ¶
func NewClusterCreate ¶
func NewClusterDelete ¶
func NewClusterLS ¶
func NewGitRepo ¶
func NewGitRepoAdd ¶
func NewGitRepoDelete() *cobra.Command {
return command.Command(&GitRepoDelete{}, cobra.Command{
Use: "delete",
Short: "Delete cluster registration gitRepo(s)",
Args: cobra.ArbitraryArgs,
})
}
type GitRepoDelete struct { }
func (l *GitRepoDelete) Run(cmd *cobra.Command, args []string) error {
c, err := Client.Get()
if err != nil {
return err
}
var errors []error
for _, arg := range args {
err := c.Fleet.ClusterRegistrationGitRepo().Delete(c.Namespace, arg, nil)
if err == nil {
fmt.Println(arg)
} else {
logrus.Errorf("failed to delete %s: %v", arg, err)
errors = append(errors, err)
}
}
return merr.NewErrors(errors...)
}
func NewGitRepoLS ¶
func NewInstall ¶
func NewManager ¶
func NewSimulator ¶ added in v0.2.0
func NewTokenCreate ¶
func NewTokenDelete ¶
func NewTokenLS ¶
Types ¶
type Agent ¶
type Agent struct {
ClientID string `usage:"Unique id used to identify the cluster, must match Spec.ClientID"`
AgentNamespace string `usage:"Namespace to run the agent in" default:"fleet-agent-system"`
CAFile string `usage:"File containing optional CA cert for fleet controller cluster" name:"ca-file" short:"c"`
NoCA bool `usage:"Use no custom CA for a fleet controller that is signed by a well known CA with a proper CN."`
ServerURL string `usage:"The full URL to the fleet controller cluster"`
Labels map[string]string `usage:"Labels to apply to cluster upon registration"`
}
type Apply ¶
type Apply struct {
BundleInputArgs
OutputArgsNoDefault
BundleNamePrefix string `usage:"All bundle names will be prefixed with this string"`
File string `usage:"Read full bundle contents from file" short:"f"`
Compress bool `usage:"Force all resources to be compress" short:"c"`
ServiceAccount string `usage:"Service account to assign to bundle created" short:"a"`
}
type BundleInputArgs ¶
type BundleInputArgs struct {
BundleFile string `usage:"Location of the bundle.yaml" short:"b"`
}
type ClusterCreate ¶
type ClusterDelete ¶
type ClusterDelete struct {
}
type Fleet ¶ added in v0.3.0
type Fleet struct {
SystemNamespace string `usage:"System namespace of the controller" default:"fleet-system"`
Namespace string `usage:"namespace" env:"NAMESPACE" default:"default" short:"n" env:"NAMESPACE"`
Kubeconfig string `usage:"kubeconfig for authentication" short:"k"`
Context string `usage:"kubeconfig context for authentication"`
}
func (*Fleet) PersistentPre ¶ added in v0.3.0
type GitRepoAdd ¶
type GitRepoAdd struct {
Name string `usage:"The name to assign to the git repo"`
Branch string `usage:"The branch to watch" short:"b"`
Revision string `usage:"A specific commit or tag to watch" short:"r"`
Secret string `usage:"Secret name containing the credentials used to perform the git clone"`
Dirs []string `usage:"Directories in the git repo that contains bundles. Supports path globbing" short:"d"`
}
type Manager ¶
type Manager struct {
SystemNamespace string `usage:"Namespace that will be use in controller" default:"fleet-system"`
ManagerImage string `usage:"Image to use for controller"`
AgentImage string `usage:"Image to use for all agents"`
CRDsOnly bool `usage:"Output CustomResourceDefinitions only"`
OutputArgs
}
type OutputArgs ¶
type OutputArgs struct {
Output string `usage:"Output contents to file or - for stdout" short:"o" default:"-"`
}
type OutputArgsNoDefault ¶
type OutputArgsNoDefault struct {
Output string `usage:"Output contents to file or - for stdout" short:"o"`
}
type Simulator ¶ added in v0.2.0
type Simulator struct {
CAFile string `usage:"File containing optional CA cert for fleet controller cluster" name:"ca-file" short:"c"`
NoCA bool `usage:"Use no custom CA for a fleet controller that is signed by a well known CA with a proper CN."`
ServerURL string `usage:"The full URL to the fleet controller cluster"`
Clusters int `usage:"Number of clusters to simulate" default:"100"`
Image string `usage:"Simulator image"`
Labels map[string]string `usage:"Labels to apply to the new cluster on register (example key=value,key2=value2)" short:"l"`
}
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"`
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"`
PrintBundle bool `usage:"Don't run match and just output the generated bundle"`
}
type TokenCreate ¶
type TokenDelete ¶
type TokenDelete struct {
}
Click to show internal directories.
Click to hide internal directories.