Skip to content

The target allocator crashes when prometheusCR is enabled #303

@gane5hvarma

Description

@gane5hvarma

I have enabled prometheusCR like below

targetAllocator:
    allocationStrategy: consistent-hashing
    enabled: true
    image: public.ecr.aws/cloudwatch-agent/cloudwatch-agent-target-allocator:1.0.0
    prometheusCR:
      enabled: true
      scrapeInterval: 30s
    replicas: 1
    resources: {}

A new pod came up with name cloudwatch-agent-target-allocator-5bc989bd67-vv527 and this pod was erroring out continuously

unknown flag: --enable-prometheus-cr-watcher
Usage of target-allocator:
      --config-file string                The path to the config file. (default "/conf/targetallocator.yaml")
      --enable-https-server               Enable HTTPS additional server (default true)
      --https-ca-file string              The path to the HTTPS server TLS CA file.
      --https-tls-cert-file string        The path to the HTTPS server TLS certificate file. (default "/etc/amazon-cloudwatch-target-allocator-cert/server.crt")
      --https-tls-key-file string         The path to the HTTPS server TLS key file. (default "/etc/amazon-cloudwatch-target-allocator-cert/server.key")
      --kubeconfig-path string            absolute path to the KubeconfigPath file (default "/.kube/config")
      --listen-addr-https string          The address where this service serves over HTTPS. (default ":8443")
      --reload-config                     Enable automatic configuration reloading. This functionality is deprecated and will be removed in a future release.
      --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'.
unknown flag: --enable-prometheus-cr-watcher

I used cloudwatch addon with version v3.6.0-eksbuild.2 in eks to deploy the cloudwatch agent operator

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions