Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(cli): introduce examples in the kompose command #1808

Merged
merged 3 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading