mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Refactor kustomize config command structure
- Create cfg, fn, live parent commands
This commit is contained in:
committed by
Phillip Wittrock
parent
73157c7141
commit
701c217791
28
cmd/config/kubectl-krm/main.go
Normal file
28
cmd/config/kubectl-krm/main.go
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright 2019 The Kubernetes Authors.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"sigs.k8s.io/kustomize/cmd/config/configcobra"
|
||||
"sigs.k8s.io/kustomize/kyaml/commandutil"
|
||||
)
|
||||
|
||||
func main() {
|
||||
os.Setenv(commandutil.EnableAlphaCommmandsEnvName, "true")
|
||||
cmd := configcobra.AddCommands(&cobra.Command{
|
||||
Use: "kubectl-krm",
|
||||
Short: "Plugin for configuration based commands.",
|
||||
Long: `Plugin for configuration based commands.
|
||||
|
||||
Provides commands for working with Kubernetes resource configuration.
|
||||
`,
|
||||
}, "")
|
||||
if err := cmd.Execute(); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user