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

The published chart for 2.9.0 doesn't match the source when enabling Prometheus Operator #348

Closed
agalue opened this issue Dec 14, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@agalue
Copy link

agalue commented Dec 14, 2022

I've been deploying Keda with the following configuration to get statistics from it:

prometheus:
  metricServer:
    enabled: true
    podMonitor:
      enabled: true
      namespace: observability
      additionalLabels:
        release: monitor
  operator:
    enabled: true
    podMonitor:
      enabled: true
      namespace: observability
      additionalLabels:
        release: monitor
    prometheusRules:
      enabled: true
      namespace: observability
      additionalLabels:
        release: monitor
      alerts:
      - alert: KedaScalerErrors
        annotations:
          description: Keda scaledObject {{ $labels.scaledObject }} is experiencing errors with {{ $labels.scaler }} scaler
          summary: Keda Scaler {{ $labels.scaler }} Errors
        expr: |
          sum by ( scaledObject , scaler) (rate(keda_metrics_adapter_scaler_errors[2m])) > 0
        for: 2m
        labels:
          namespace: observability # Workaround for https://github.com/prometheus-operator/prometheus-operator/issues/3954

Expected Behavior

The above configuration has been working great up to version 2.8.2.

Actual Behavior

When using the above configuration with the published Helm chart for 2.9.0 (from https://kedacore.github.io/charts), the operator doesn't start, complaining about an unexisting CLI attribute, showing the following error:

❯ kubectl logs -n observability keda-operator-8676696456-g2dcr keda-operator
unknown flag: --metrics-port
Usage of /keda:
      --disable-compression                   Disable response compression for k8s restAPI in client-go.  (default true)
      --health-probe-bind-address string      The address the probe endpoint binds to. (default ":8081")
      --kube-api-burst int                    Set the burst for throttling requests sent to the apiserver (default 30)
      --kube-api-qps float32                  Set the QPS rate for throttling requests sent to the apiserver (default 20)
      --kubeconfig string                     Paths to a kubeconfig. Only required if out-of-cluster.
      --leader-elect                          Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.
      --metrics-bind-address string           The address the metric endpoint binds to. (default ":8080")
      --metrics-service-bind-address string   The address the gRPRC Metrics Service endpoint binds to. (default ":9666")
      --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') (default )
      --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 (default )
      --zap-stacktrace-level level            Zap Level at and above which stacktraces are captured (one of 'info', 'error', 'panic').
unknown flag: --metrics-port
      --zap-time-encoding time-encoding       Zap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'). Defaults to 'epoch'. (default )

Interestingly, the source code has the correct setting:

https://github.com/kedacore/charts/blob/v2.9.0/keda/templates/12-keda-deployment.yaml#L76

However, what you get after installing the chart seems to show something from older versions, leading to the problem.

Steps to Reproduce the Problem

  1. Add the Helm repository: helm repo add kedacore https://kedacore.github.io/charts
  2. Update local repositories: helm repo update
  3. Download the chart code from the repo helm pull kedacore/keda
  4. Uncompress the downloaded file tar xvzf keda-2.9.0.tgz
  5. Open the deployment file (look around line 76): vim keda/templates/12-keda-deployment.yaml
  6. The downloaded template references --metrics-port instead of --metrics-bind-address

Specifications

  • KEDA Version: 2.9.0
  • Platform & Version: Minikube
  • Kubernetes Version: 1.25.3
  • Scaler(s): N/A
@agalue agalue added the bug Something isn't working label Dec 14, 2022
@rossedman
Copy link

This happened to me as well, can confirm the steps above

@zroubalik
Copy link
Member

Thanks for reporting, we will release a new version next week to fix this.

@zroubalik
Copy link
Member

This is a duplicate of this: #342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants