blackducksoftware / synopsys-operator

Archived and moved this to https://github.com/blackducksoftware/synopsysctl
Apache License 2.0
10 stars 14 forks source link

Simplify synopsysctl options #450

Open yashbhutwala opened 5 years ago

yashbhutwala commented 5 years ago

Why is this needed:

There is many places in synopsysctl where we expose parameters that a customer should not worry about changing. Currently, there are 43 flags for synopsysctl create blackduck, 38 flags for synopsysctl create opssight and many more for others. The goal of this is to minimize inconsistencies and simplify the usage of synopsysctl for the end user.

synopsysctl has become more of a templating cli, essentially converting all yaml fields in the spec to command line parameters. Ideally a good operator should just have sane defaults, and then we have different templates that a user can choose.

Related issues:

365

426

444

What would you like to be added:

synopsysctl deploy

synopsysctl create alert

currently create blackduck has no configuration for setting specific images, however alert and opssight do. We should make it consistent, so either remove them from alert and opssight, which I think would simplify the flags, or add them back to blackduck.

synopsysctl create opssight

image names can be removed once registry configuration option is enabled (currently useful for airgapped customers)

synopsysctl create blackduck

Cuelang seems like a promising solution for configuration management that incorporates lot of Google's internal Borg learnings. Thread from Brian Grant: https://twitter.com/bgrant0607/status/1123620689930358786

Also, sig-architecture meeting on desired vs actual: https://www.youtube.com/watch?v=6HfntQM757M

rrati commented 5 years ago

Need to make sure to consider air-gapped users or people with restricted access to repositories. These users would likely have to pull images from a public repo and place in a local private repo. This is the reason for many of the -image options.

Also need to consider a deprecation path for any options that are removed/changed.

log-level and verbosity are generally the same thing. Should investigate why there are both.

yashbhutwala commented 5 years ago

@rrati I agree about establishing a process for deprecation for any user-facing change.

For logs, there are different log flags:

  1. --verbose-level at global flag level for logs of synopsysctl
  2. --log-level at synopsysctl deploy level for logs inside the synopsys-operator container
  3. --log-level at synopsysctl create opssight level for logs inside the opssight containers

I think 1 is fine to keep, but should change the shorthand of it, since -v can be interpreted as version.

2 and 3 are inconsistent in that there is no such setting for blackduck and alert. I think, by default, they should be debug, so if there's anything wrong, either a customer can look at them, or send them to us. @msenmurugan does mention that they could get large due to amount of debugging those services would do in debug mode. But if we set them to info by default, then if a customer runs into a problem, and wants to change the log level, it would restart the container anyways, so that defeats the purpose.