Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶
New returns a cobra command instance based on Handler.
Types ¶
type Handler ¶
type Handler struct {
handler.Session
KubeApiClientset *cage_k8s_core.Clientset
KubectlConfigClient cage_k8s_config.Client
Cluster string `usage:"cluster of the new context to create (default from current-context)"`
ClusterRoles []string `usage:"cluster role binding to create (<role name>:<binding name>)"`
ConfigFile string `usage:"kubectl config file to modify"`
Namespace string `usage:"namespace to receive service account (default from current-context)"`
Roles []string `usage:"role binding to create (<role name>:<binding name>)"`
ServiceAccountName string `usage:"name of service account to create"`
Username string `usage:"username/context to receive the service account's bearer token"`
// Verbosity levels greater than 0 will enable status messages and error stack traces.
//
// It is an int for consistency with other commands, even though levels beyond 1 are not used.
Verbosity int `usage:"kubectl verbosity level"`
}
Handler defines the sub-command flags and logic.
func (*Handler) BindFlags ¶
BindFlags binds the flags to Handler fields.
It implements cli/handler/cobra.Handler.
func (*Handler) Init ¶
func (h *Handler) Init() handler_cobra.Init
Init defines the command, its environment variable prefix, etc.
It implements cli/handler/cobra.Handler.
Click to show internal directories.
Click to hide internal directories.