set.go 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. Copyright 2016 The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. package set
  14. import (
  15. "io"
  16. "github.com/renstrom/dedent"
  17. "github.com/spf13/cobra"
  18. cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
  19. )
  20. var (
  21. set_long = dedent.Dedent(`
  22. Configure application resources
  23. These commands help you make changes to existing application resources.`)
  24. set_example = dedent.Dedent(``)
  25. )
  26. func NewCmdSet(f *cmdutil.Factory, out io.Writer) *cobra.Command {
  27. cmd := &cobra.Command{
  28. Use: "set SUBCOMMAND",
  29. Short: "Set specific features on objects",
  30. Long: set_long,
  31. Example: set_example,
  32. Run: func(cmd *cobra.Command, args []string) {
  33. cmd.Help()
  34. },
  35. }
  36. // add subcommands
  37. cmd.AddCommand(NewCmdImage(f, out))
  38. return cmd
  39. }