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

Removing unconventional two letter flags + adding dashes in-between two letter words. #331

Closed
cdrage opened this issue Dec 7, 2016 · 2 comments

Comments

@cdrage
Copy link
Member

cdrage commented Dec 7, 2016

Using multi-two-letter flags is unconventional and against common CLI usages.

For example:

   --replicationcontroller, --rc        Generate a Kubernetes replication controller object

Should either be JUST --rc or --replicationcontroller.

Ideally, flags with two names should have dashes in between them, such as --replication-controller.

Common CLI tools such as kubectl and oc use these conventions and considering most of the users are coming from these tools, we should follow suit.

PR is available here with these changes: #304

@cdrage
Copy link
Member Author

cdrage commented Dec 7, 2016

Kubectl example using two-letter words with dashes:

      --dry-run=false: If true, only print the object that would be sent, without sending it.
      --generator='deployment-basic/v1beta1': The name of the API generator to use.
      --image=[]: Image name to run.
      --no-headers=false: When using the default or custom-column output format, don't print headers.
  -o, --output='': Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
      --output-version='': Output the formatted object with the given group version (for ex: 'extensions/v1beta1').
      --save-config=false: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
      --schema-cache-dir='~/.kube/schema': If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
  -a, --show-all=false: When printing, show all resources (default hide terminated pods.)
      --show-labels=false: When printing, show all labels as the last column (default hide labels column)
      --sort-by='': If non-empty, sort list types using this field specification.  The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
      --template='': Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
      --validate=true: If true, use a schema to validate the input before sending it

And when referencing replication controller, it's conventionally used with a dash in-between the words:

SubobjectPath	Reason			Message
  Thu, 24 Sep 2015 10:38:20 -0700	Thu, 24 Sep 2015 10:38:20 -0700	1
{replication-controller }			SuccessfulCreate	Created pod: nginx-qrm3m
  Thu, 24 Sep 2015 10:38:20 -0700	Thu, 24 Sep 2015 10:38:20 -0700	1
{replication-controller }			SuccessfulCreate	Created pod: nginx-3ntk0
  Thu, 24 Sep 2015 10:38:20 -0700	Thu, 24 Sep 2015 10:38:20 -0700	1
{replication-controller }			SuccessfulCreate	Created pod: nginx-4ok8v

@cdrage
Copy link
Member Author

cdrage commented Jan 3, 2017

Okay since #304 was merged, this can be closed.

@cdrage cdrage closed this as completed Jan 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant