Merge pull request #1808 from martinjirku/1711-help-page

docs(cli): introduce examples in the kompose command
This commit is contained in:
Kubernetes Prow Robot 2024-01-19 01:15:20 +01:00 committed by GitHub
commit 8b3595ec5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View File

@ -79,6 +79,9 @@ var (
var convertCmd = &cobra.Command{
Use: "convert",
Short: "Convert a Docker Compose file",
Example: ` kompose --file compose.yaml convert
kompose -f first.yaml -f second.yaml convert
kompose --provider openshift --file compose.yaml convert`,
PreRun: func(cmd *cobra.Command, args []string) {
// Check that build-config wasn't passed in with --provider=kubernetes

View File

@ -50,9 +50,13 @@ var (
// RootCmd root level flags and commands
var RootCmd = &cobra.Command{
Use: "kompose",
Short: "A tool helping Docker Compose users move to Kubernetes",
Long: `Kompose is a tool to help users who are familiar with docker-compose move to Kubernetes.`,
Use: "kompose",
Short: "A tool helping Docker Compose users move to Kubernetes",
Long: `Kompose is a tool to help users who are familiar with docker-compose move to Kubernetes.`,
Example: ` kompose --file compose.yaml convert
kompose -f first.yaml -f second.yaml convert
kompose --provider openshift --file compose.yaml convert
kompose completion bash`,
SilenceErrors: true,
// PersistentPreRun will be "inherited" by all children and ran before *every* command unless
// the child has overridden the functionality. This functionality was implemented to check / modify