doc for kustomize config delete setter

This commit is contained in:
Jijie Wei
2020-06-23 13:47:19 -07:00
parent a895220743
commit ecfa732a04
2 changed files with 20 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ package commands
import (
"github.com/spf13/cobra"
"sigs.k8s.io/kustomize/cmd/config/ext"
"sigs.k8s.io/kustomize/cmd/config/internal/generateddocs/commands"
"sigs.k8s.io/kustomize/kyaml/openapi"
"sigs.k8s.io/kustomize/kyaml/setters2/settersutil"
)
@@ -16,9 +17,9 @@ func NewDeleteSetterRunner(parent string) *DeleteSetterRunner {
c := &cobra.Command{
Use: "delete-setter DIR NAME",
Args: cobra.MinimumNArgs(2),
Short: "delete values on Resources fields.",
Long: "",
Example: "",
Short: commands.DeleteSetterShort,
Long: commands.DeleteSetterLong,
Example: commands.DeleteSetterExamples,
PreRunE: r.preRunE,
RunE: r.runE,
}

View File

@@ -89,6 +89,22 @@ var CreateSetterExamples = `
kustomize cfg create-setter DIR/ image-tag v1.0.1 --type "string" \
--field image --description "current stable release"`
var DeleteSetterShort = `[Alpha] Delete a custom setter of a resource field`
var DeleteSetterLong = `
Delete a custom setter of a Resource field by inlining OpenAPI as comments.
DIR
A directory containing Resource configuration.
NAME
The name of the setter to delete.
`
var DeleteSetterExamples = `
# delete a setter for port fields
kustomize cfg delete-setter DIR/ port`
var FmtShort = `[Alpha] Format yaml configuration files.`
var FmtLong = `
[Alpha] Format yaml configuration files.