operator-framework / helm-operator-plugins

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

Check if we need to impl flags from legacy #30

Closed camilamacedo86 closed 4 years ago

camilamacedo86 commented 4 years ago
joelanford commented 4 years ago

These flags are all related to the operator-sdk run local command, not the helm-operator base image.

The helm-operator flags we need to assess can be found with operator-sdk exec-entrypoint helm -h:

  -h, --help                             help for helm
      --max-workers int                  Maximum number of workers to use. (default 1)
      --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                        Enable zap development mode (changes defaults to console encoder, debug log level, disables sampling and stacktrace from 'warning' level)
      --zap-encoder encoder              Zap log encoding ('json' or 'console')
      --zap-level level                  Zap log level (one of 'debug', 'info', 'error' or any integer value > 0) (default info)
      --zap-sample sample                Enable zap log sampling. Sampling will be disabled for integer log levels > 1
      --zap-stacktrace-level level       Set the minimum log level that triggers stacktrace generation (default error)
      --zap-time-encoding timeEncoding   Sets the zap time format ('epoch', 'millis', 'nano', or 'iso8601') (default )

Of these, the only ones not currently supported in this implementation are the --zap-* flags. I plan to use the controller-runtime zap flags once a few PRs there merge.

camilamacedo86 commented 4 years ago

Hi @joelanford,

The operator-sdk run local works for helm currently and allows the above flags less --go-ldflags. The zap ones were tracked in https://github.com/joelanford/helm-operator/issues/47 for we do not forget.

joelanford commented 4 years ago

The operator-sdk run local works for helm currently

That's correct, but it is a very simple wrapper that sets the KUBECONFIG and WATCH_NAMESPACE environment variables and then runs the helm-operator entrypoint (helm.Run()). Since this implementation supports those environment variables, it is compatible with operator-sdk run local.

Since there is a separate issue now for the logging flags, I'll close this one since there's nothing left to implement to make this compatible with existing operator-sdk run local flags or features.