Skip to content

Commit

Permalink
Add some deprecated info warning
Browse files Browse the repository at this point in the history
  • Loading branch information
xianlubird committed May 9, 2018
1 parent 1a2928e commit 0fdc374
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions cmd/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ func init() {

// Kubernetes only
convertCmd.Flags().BoolVarP(&ConvertChart, "chart", "c", false, "Create a Helm chart for converted objects")
convertCmd.Flags().BoolVar(&ConvertDaemonSet, "daemon-set", false, "Generate a Kubernetes daemonset object")
convertCmd.Flags().BoolVarP(&ConvertDeployment, "deployment", "d", false, "Generate a Kubernetes deployment object")
convertCmd.Flags().BoolVar(&ConvertReplicationController, "replication-controller", false, "Generate a Kubernetes replication controller object")
convertCmd.Flags().BoolVar(&ConvertDaemonSet, "daemon-set", false, "Generate a Kubernetes daemonset object (deprecated, use --controller instead)")
convertCmd.Flags().BoolVarP(&ConvertDeployment, "deployment", "d", false, "Generate a Kubernetes deployment object (deprecated, use --controller instead)")
convertCmd.Flags().BoolVar(&ConvertReplicationController, "replication-controller", false, "Generate a Kubernetes replication controller object (deprecated, use --controller instead)")
convertCmd.Flags().StringVar(&ConvertController, "controller", "", `Set the output controller ("deployment"|"daemonSet"|"replicationController")`)
convertCmd.Flags().MarkDeprecated("daemon-set", "use --controller")
convertCmd.Flags().MarkDeprecated("deployment", "use --controller")
Expand Down Expand Up @@ -156,10 +156,10 @@ Available Commands:{{range .Commands}}{{if .IsAvailableCommand}}
{{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{ if .HasAvailableLocalFlags}}
Kubernetes Flags:
--daemon-set Generate a Kubernetes daemonset object
-d, --deployment Generate a Kubernetes deployment object
--daemon-set Generate a Kubernetes daemonset object (deprecated, use --controller instead)
-d, --deployment Generate a Kubernetes deployment object (deprecated, use --controller instead)
-c, --chart Create a Helm chart for converted objects
--replication-controller Generate a Kubernetes replication controller object
--replication-controller Generate a Kubernetes replication controller object (deprecated, use --controller instead)
OpenShift Flags:
--build-branch Specify repository branch to use for buildconfig (default is current branch name)
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ INFO Kubernetes file "web-deployment.json" created
The `*-deployment.json` files contain the Deployment objects.

```sh
$ kompose convert --replication-controller
$ kompose convert --controller replicationController
INFO Kubernetes file "redis-svc.yaml" created
INFO Kubernetes file "web-svc.yaml" created
INFO Kubernetes file "redis-replicationcontroller.yaml" created
Expand All @@ -256,7 +256,7 @@ INFO Kubernetes file "web-replicationcontroller.yaml" created
The `*-replicationcontroller.yaml` files contain the Replication Controller objects. If you want to specify replicas (default is 1), use `--replicas` flag: `$ kompose convert --replication-controller --replicas 3`

```sh
$ kompose convert --daemon-set
$ kompose convert --controller daemonSet
INFO Kubernetes file "redis-svc.yaml" created
INFO Kubernetes file "web-svc.yaml" created
INFO Kubernetes file "redis-daemonset.yaml" created
Expand Down

0 comments on commit 0fdc374

Please sign in to comment.