operator-framework / helm-operator-plugins

Experimental refactoring of the operator-framework's helm operator
Apache License 2.0
49 stars 49 forks source link

removing hybrid helm plugin #381

Closed acornett21 closed 1 month ago

acornett21 commented 1 month ago

Motivation

The adoption of the helm hybrid operator has been very low, even in official catalogs like OperatorHub, there are only three operators, all of which are person maintained, and not organization maintained. Another bennefit is that this enables dropped the kubebuilder dependency, and we'd no longer had to generate/scaffold these files prior to and after each release of this project. This alone reduces the maintance burden to upkeep the project, as an added bonus, releases become push a tag.

Changes

New Output

❯ ./bin/helm-operator-plugins 
A utility that enables the ability to run a helm-based operator

Usage:
  helm-operator-plugins [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  run         Run the operator

Flags:
  -h, --help      help for helm-operator-plugins
  -v, --version   version for helm-operator-plugins

Use "helm-operator-plugins [command] --help" for more information about a command.
❯ ./bin/helm-operator-plugins run --help
Run the operator

Usage:
  helm-operator-plugins run [flags]

Flags:
      --enable-http2                       enables HTTP/2 on the webhook and metrics servers
      --health-probe-bind-address string   The address the probe endpoint binds to. (default ":8081")
  -h, --help                               help for run
      --leader-elect                       Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.
      --leader-election-id string          Name of the configmap that is used for holding the leader lock.
      --leader-election-namespace string   Namespace in which to create the leader election configmap for holding the leader lock (required if running locally with leader election enabled).
      --max-concurrent-reconciles int      Maximum number of concurrent reconciles for controllers. (default 16)
      --metrics-bind-address string        The address the metric endpoint binds to (default ":8080")
      --metrics-secure                     enables secure serving of the metrics endpoint
      --reconcile-period duration          Default reconcile period for controllers (default 1m0s)
      --watches-file string                Path to the watches file to use (default "./watches.yaml")
      --zap-devel                          Development Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error)
      --zap-encoder encoder                Zap log encoding (one of 'json' or 'console')
      --zap-log-level level                Zap Level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error', or any integer value > 0 which corresponds to custom debug levels of increasing verbosity
      --zap-stacktrace-level level         Zap Level at and above which stacktraces are captured (one of 'info', 'error', 'panic').
      --zap-time-encoding time-encoding    Zap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'). Defaults to 'epoch'.

Other thoughts

I think this covers everything, but any change like this I realize is hard to review, and things might have been missed, since I do not have all the tribal knowledge about this project, so my ask to reviewers is to go through this with a fine tooth'd comb. Also, if there are ways of testing run let me know and happy to do that as well.

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Project coverage is 79.50%. Comparing base (08ab7fb) to head (f1c8352). Report is 36 commits behind head on main.

Files Patch % Lines
internal/cmd/root.go 0.00% 11 Missing :warning:
internal/version/version.go 0.00% 2 Missing :warning:
main.go 0.00% 1 Missing :warning:

:exclamation: There is a different number of reports uploaded between BASE (08ab7fb) and HEAD (f1c8352). Click for more details.

HEAD has 1 upload less than BASE | Flag | BASE (08ab7fb) | HEAD (f1c8352) | |------|------|------| ||2|1|
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #381 +/- ## ========================================== - Coverage 85.06% 79.50% -5.56% ========================================== Files 19 31 +12 Lines 1346 1952 +606 ========================================== + Hits 1145 1552 +407 - Misses 125 312 +187 - Partials 76 88 +12 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

acornett21 commented 1 month ago

Also, updated operator-controller with a replaces in the go.mod file to make sure this does not break anything in operator-controller, and in the open PR, all relevant tests pass.