Skip to content

Commit

Permalink
Merge pull request kubeedge#5462 from luomengY/keadm_manifest
Browse files Browse the repository at this point in the history
Change the print helm chart resources YAML command name keadm generate to keadm manifest.
  • Loading branch information
kubeedge-bot authored Apr 15, 2024
2 parents 13540b7 + 5f5e37f commit 8f45d6b
Showing 1 changed file with 6 additions and 27 deletions.
33 changes: 6 additions & 27 deletions keadm/cmd/keadm/app/cmd/cloud/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,14 @@ import (

var (
cloudManifestLongDescription = `
"keadm manifest" command renders charts by using a list of set flags like helm.
`

cloudManifestGenerateLongDescription = `
"keadm manifest generate" command renders charts by using a list of set flags like helm, and generates kubernetes resources.
`

cloudManifestExample = `
keadm manifest
- This command will render Kubernetes resources
keadm generate --advertise-address=127.0.0.1 --profile version=v%s --kube-config=/root/.kube/config
- kube-config is the absolute path of kubeconfig which used to secure connectivity between cloudcore and kube-apiserver
- a list of helm style set flags like "--set key=value" can be implemented, ref: https://github.com/kubeedge/kubeedge/tree/master/manifests/charts/cloudcore/README.md
"keadm manifest" command renders charts by using a list of set flags like helm, and generates kubernetes resources.
`

cloudManifestGenerateExample = `
keadm manifest generate
keadm manifest
- This command will render and generate Kubernetes resources
keadm manifest generate --advertise-address=127.0.0.1 --profile version=v%s --kube-config=/root/.kube/config
keadm manifest --advertise-address=127.0.0.1 --profile version=v%s --kube-config=/root/.kube/config
- kube-config is the absolute path of kubeconfig which used to secure connectivity between cloudcore and kube-apiserver
- a list of helm style set flags like "--set key=value" can be implemented, ref: https://github.com/kubeedge/kubeedge/tree/master/manifests/charts/cloudcore/README.md
`
Expand All @@ -64,9 +51,9 @@ func NewManifestGenerate() *cobra.Command {
flagVals := make(map[string]types.FlagData)

var generateCmd = &cobra.Command{
Use: "generate",
Use: "manifest",
Short: "Checks and generate the manifests.",
Long: cloudManifestGenerateLongDescription,
Long: cloudManifestLongDescription,
Example: fmt.Sprintf(cloudManifestGenerateExample, types.DefaultKubeEdgeVersion),
RunE: func(cmd *cobra.Command, args []string) error {
checkFlags := func(f *pflag.Flag) {
Expand All @@ -81,15 +68,7 @@ func NewManifestGenerate() *cobra.Command {
}

addManifestsGenerateJoinOtherFlags(generateCmd, opts)

var manifestCmd = &cobra.Command{
Use: "manifest",
Short: "Render the manifests by using a list of set flags like helm.",
Long: cloudManifestLongDescription,
Example: fmt.Sprintf(cloudManifestExample, types.DefaultKubeEdgeVersion),
}
manifestCmd.AddCommand(generateCmd)
return manifestCmd
return generateCmd
}

func addManifestsGenerateJoinOtherFlags(cmd *cobra.Command, initOpts *types.InitOptions) {
Expand Down

0 comments on commit 8f45d6b

Please sign in to comment.