gardener / gardener-extension-provider-aws

Gardener extension controller for the AWS cloud provider (https://aws.amazon.com).
https://gardener.cloud
Apache License 2.0
19 stars 97 forks source link

Log level in the extension is not configurable #442

Closed ialidzhikov closed 2 months ago

ialidzhikov commented 3 years ago

How to categorize this issue?

/area ops-productivity usability /kind bug /priority 3 /platform aws

What happened: I don't see an option/flag how I can configure the log level in the extension:

$ docker run eu.gcr.io/gardener-project/gardener/extensions/provider-aws:v1.30.0 --help
Usage:
  provider-aws-controller-manager [flags]

Flags:
      --backupbucket-max-concurrent-reconciles int     The maximum number of concurrent reconciliations. (default 5)
      --backupentry-max-concurrent-reconciles int      The maximum number of concurrent reconciliations. (default 5)
      --bastion-max-concurrent-reconciles int          The maximum number of concurrent reconciliations. (default 5)
      --config-file string                             path to the controller manager configuration file
      --controlplane-max-concurrent-reconciles int     The maximum number of concurrent reconciliations. (default 5)
      --csimigration-max-concurrent-reconciles int     The maximum number of concurrent reconciliations. (default 5)
      --disable-controllers strings                    List of controllers to disable [backupbucket_controller bastion_controller controlplane_controller infrastructure_controller healthcheck_controller backupentry_controller csimigration_controller dnsrecord_controller worker_controller]
      --disable-webhooks strings                       List of webhooks to disable
      --dnsrecord-max-concurrent-reconciles int        The maximum number of concurrent reconciliations. (default 5)
      --dnsrecord-provider-client-burst int            The client burst for provider operations. (default 5)
      --dnsrecord-provider-client-qps float            The client QPS for provider operations. (default 1)
      --healthcheck-max-concurrent-reconciles int      The maximum number of concurrent reconciliations. (default 5)
  -h, --help                                           help for provider-aws-controller-manager
      --ignore-operation-annotation                    Ignore the operation annotation or not.
      --infrastructure-max-concurrent-reconciles int   The maximum number of concurrent reconciliations. (default 5)
      --kubeconfig string                              Paths to a kubeconfig. Only required if out-of-cluster.
      --leader-election                                Whether to use leader election or not when running this controller manager. (default true)
      --leader-election-id string                      The leader election id to use. (default "provider-aws-leader-election")
      --leader-election-namespace string               The namespace to do leader election in.
      --leader-election-resource-lock string           Which resource type to use for leader election. Supported options are 'endpoints', 'configmaps', 'leases', 'endpointsleases' and 'configmapsleases'. (default "leases")
      --master string                                  The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.
      --webhook-config-cert-dir string                 The directory that contains the webhook server key and certificate. (default "/tmp/gardener-extensions-cert")
      --webhook-config-mode string                     The webhook mode - either 'url' (when running outside the cluster) or 'service' (when running inside the cluster).
      --webhook-config-namespace string                The webhook config namespace for 'service' mode.
      --webhook-config-server-host string              The webhook server host.
      --webhook-config-server-port int                 The webhook server port. (default 443)
      --webhook-config-service-port int                The service port that exposes the webhook server.  If not specified it will fallback to the webhook server port.
      --webhook-config-url string                      The webhook URL when running outside of the cluster it is serving.
      --worker-deploy-crds                             Deploy the required worker CRDs. (default true)
      --worker-max-concurrent-reconciles int           The maximum number of concurrent reconciliations. (default 5)

For example the terraformer package logs with .V(1) in several places - for more details see https://github.com/gardener/gardener/issues/4978. Currently there is no way to enable this logging.

What you expected to happen: To have an option/flag about the log level.

How to reproduce it (as minimally and precisely as possible): See above.

Anything else we need to know?: This issue is not only applicable to provider-aws but I think it is applicable also for all of other provider extensions (at least the ones under github.com/gardener).

Environment:

timebertt commented 3 years ago

I hope that we can tackle this in one go, once we refactored all gardener components to zap/logr (part of https://github.com/gardener/gardener/issues/4251). Then we can probably introduce some common flags, that will be used in all gardener components and extensions alike. Also, ref https://github.com/gardener/gardener/issues/4803#issuecomment-783517394

Kostov6 commented 2 months ago

/help

gardener-robot commented 2 months ago

@Kostov6 Here my list of commands:

Man Page | Synopsis | What & Who | Description & Examples | |:----|:----|:----| |[`/advise` `[QUESTION]`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/advise.py)|Valid for
Issue
Permitted for
Member,
Author,
Commenter|Request advice (for the ticket or a specific question if provided) using generative pre-trained transformers (GPTs) such as OpenAI's GPT-4. Usage is granted solely on the condition that you acknowledge and accept its [**RISKS**](https://github.tools.sap/kubernetes/kube-docs/wiki/Gardener-Answering-Machine#risks) and our [**TERMS OF USE**](https://github.tools.sap/kubernetes/kube-docs/wiki/Gardener-Answering-Machine#terms-of-use).
Examples:
- `/advise`
- `/advise What are my options?`
Synonyms: `/advise`, `/advice`, `/adv`| |[`/assign` `[@user...]`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/assign.py)|Valid for
Issue,
PullRequest
Permitted for
Maintainer,
Member,
Commenter|
Assign given people (or yourself if none specified) to issue or PR. Commenters may only assign themselves. Labels can be used as well, which are subsituted with the registered reviewers for that label.
Examples:
- `/assign`
- `/assign @johndoe @janedoe`
- `/assign platform/bare-metal`| |[`/unassign` `[@user...]`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/assign.py)|Valid for
Issue,
PullRequest
Permitted for
Maintainer,
Member,
Commenter|
Unassign given people (or yourself if none specified) from issue or PR. Commenters may only unassign themselves. Labels can be used as well, which are subsituted with the registered reviewers for that label.
Examples:
- `/unassign`
- `/unassign @johndoe @janedoe`
- `/unassign platform/bare-metal`| |[`/cla`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/cla.py)|Valid for
PullRequest
Permitted for
Anyone|
Recheck [Contributor License Agreement (CLA)](https://cla-assistant.io) for PR.
Examples:
- `/cla`| |[`/diag`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/diag.py)|Valid for
Issue
Permitted for
Member,
Author,
Commenter|
Run diagnosis on cluster. Command must be invoked on a cluster or on an issue with a cluster dashboard link in the description and labeled with `topology/shoot`.
Examples:
- `/diag`| |[`/discover` `[-f` `DATETIME]` `[-t` `DATETIME]` `[-v` `VARS]` `[-s` `CATEGORY]` `[QUESTION]`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/discover.py)|Valid for
Issue
Permitted for
Member,
Author,
Commenter|
Discover inspection or resolution options (for the ticket or a specific question if provided) from an expert-curated knowledge base using generative pre-trained transformers (GPTs) such as OpenAI's GPT-4. Usage is granted solely on the condition that you acknowledge and accept its [**RISKS**](https://github.tools.sap/kubernetes/kube-docs/wiki/Gardener-Answering-Machine#risks) and our [**TERMS OF USE**](https://github.tools.sap/kubernetes/kube-docs/wiki/Gardener-Answering-Machine#terms-of-use).
Examples:
- `/discover`
- `/discover What are my options?`
Synonyms: `/discover`, `/dis`| |[`/duplicate`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/duplicate.py)|Valid for
Issue,
PullRequest
Permitted for
Maintainer,
Member,
Author|
Mark issue or PR as duplicate of another one. The referenced issue/PR may be in the same repo (e.g. `#123` or `GH-123`), on the same server (e.g. `org/repo#123`), or even on another server (e.g. `https://server/org/repo/issues/123`). Author, assignees, and code owners of the referenced issue/PR will be informed about this duplicate. Information will be redacted if this duplicate is private and the referenced one is public. An attempt to reference a private issue/PR from public will be rejected.
Examples:
- `/duplicate`| |[`/handover` `[@user...]`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/handover.py)|Valid for
Issue,
PullRequest
Permitted for
Anyone|
Hand over issue or PR to someone or some team or the DODs
Examples:
- `/handover @johndoe`
- `/handover platform/bare-metal`
- `/handover`| |[`/help`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/help.py)|Valid for
Issue,
PullRequest
Permitted for
Anyone|
Get help on all available commands.
Examples:
- `/help`
Synonyms: `/help`, `/hi`, `/hello`, `/hola`, `/hallo`, `/rtfm`| |[`/add` `label...`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/label.py)|Valid for
Issue,
PullRequest
Permitted for
Maintainer,
Member,
Author|
Add label to issue or PR (default if no command is recognized). Authors may only add certain white-listed labels such as `kind/*`, `priority/*`, `area/*`, `component/*`, `os/*`, `platform/*`. The labels can be either fully qualified like `kind/bug`, just the identifier like `bug`, or starting with the category like `kind` followed by one or many identifiers in that category.
Examples:
- `/add area/cost component/gardener`
- `/add cost gardener`
- `/add kind bug regression`
- `/area/cost component/gardener`
- `/cost gardener`
- `/kind bug regression`
Synonyms: `/add`, `/set`, `/label`, `/start`, `/begin`| |[`/rca-request`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/label.py)|Valid for
Issue,
PullRequest
Permitted for
Maintainer,
Member,
Author|
Adds the `kind/rca` label
Examples:
- `/rca-request`| |[`/remove` `label...`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/label.py)|Valid for
Issue,
PullRequest
Permitted for
Maintainer,
Member,
Author|
Remove label from issue or PR. Authors may only remove certain white-listed labels such as `kind/*`, `priority/*`, `area/*`, `component/*`, `os/*`, `platform/*`. The labels can be either fully qualified like `kind/bug`, just the identifier like `bug`, or starting with the category like `kind` followed by one or many identifiers in that category.
Examples:
- `/remove area/cost component/gardener`
- `/remove cost gardener`
- `/remove kind bug regression`
Synonyms: `/remove`, `/rem`, `/unset`, `/unlabel`, `/stop`, `/end`, `/del`, `/drop`, `/cancel`| |[`/lgtm`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/lgtm.py)|Valid for
Issue,
PullRequest
Permitted for
Maintainer,
Member|
Add `reviewed/lgtm` label to issue or PR (and remove conflicting labels).
Examples:
- `/lgtm`| |[`/hold`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/lgtm.py)|Valid for
Issue,
PullRequest
Permitted for
Maintainer,
Member,
Author|
Add `reviewed/do-not-merge` label to issue or PR (and remove conflicting labels).
Examples:
- `/hold`| |[`/unhold`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/lgtm.py)|Valid for
Issue,
PullRequest
Permitted for
Maintainer,
Member,
Author|
Remove `reviewed/do-not-merge` label from issue or PR.
Examples:
- `/unhold`| |[`/close`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/lifecycle.py)|Valid for
Issue,
PullRequest
Permitted for
Maintainer,
Member,
Author,
Owner|
Close issue or PR.
Examples:
- `/close`| |[`/reopen`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/lifecycle.py)|Valid for
Issue,
PullRequest
Permitted for
Maintainer,
Member,
Author,
Owner|
Reopen issue or PR.
Examples:
- `/reopen`
Synonyms: `/reopen`, `/open`| |[`/touch`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/lifecycle.py)|Valid for
Issue,
PullRequest
Permitted for
Maintainer,
Member,
Author,
Owner|
Remove `lifecycle/icebox`, `stale`, or `rotten` label from issue or PR. Authors may only remove the `stale` or `rotten` labels.
Examples:
- `/touch`| |[`/plan` `milestone`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/milestone.py)|Valid for
Issue,
PullRequest
Permitted for
Maintainer,
Member|
Set milestone for issue/PR.
Examples:
- `/plan 2030-Q1`
Synonyms: `/plan`, `/schedule`, `/milestone`| |[`/unplan`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/milestone.py)|Valid for
Issue,
PullRequest
Permitted for
Maintainer,
Member|
Unset milestone for issue.
Examples:
- `/unplan`
Synonyms: `/unplan`, `/unschedule`, `/unmilestone`| |[`/no-autoclose`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/no-autoclose.py)|Valid for
Issue
Permitted for
Anyone|
The command will add label 'needs/keep-open' to ticket, and Gardener-Robot won't handle the auto-close when the cluster is no longer exist.| |[`/ping` `[@user...]` `[msg]`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/ping.py)|Valid for
Issue,
PullRequest
Permitted for
Anyone|
Ping people (or the repo owner if none specified) with a message to take a look at issue or PR (like [`/honk` in prow](https://github.com/kubernetes/test-infra/blob/master/prow/plugins/goose/goose.go)). Labels can be used as well, which are subsituted with the registered reviewers for that label.
Examples:
- `/ping @johndoe @janedoe Have you checked?`
- `/ping platform/bare-metal Any Progress?`
- `/need-help area/networking Could you help on this?`
- `/honk @johndoe`
Synonyms: `/ping`, `/honk`, `/need-help`| |[`/related` `[[-e|--exact-search]` `TERMS]`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/related.py)|Valid for
Issue
Permitted for
Member,
Author,
Commenter|
Search for related tickets (matching the ticket symptoms or a search terms) in the ticket database. If called without arguments, ticket will be crunched for symptoms using pre-trained transformers (GPTs) such as OpenAI's GPT-4 and then those symptoms will be searched. If called with arguments, those arguments will be searched. If you use the `--exact-search` option with your arguments, an exact where clause query will be executed instead or a semantic embeddings vector query. Before presentation, related tickets will be post-filtered using again pre-trained transformers (GPTs) such as OpenAI's GPT-4. Usage is granted solely on the condition that you acknowledge and accept its [**RISKS**](https://github.tools.sap/kubernetes/kube-docs/wiki/Gardener-Answering-Machine#risks) and our [**TERMS OF USE**](https://github.tools.sap/kubernetes/kube-docs/wiki/Gardener-Answering-Machine#terms-of-use).
Examples:
- `/related`
- `/related --exact-search openstack_networking_subnet_v2`
Synonyms: `/related`, `/rel`| |[`/ready-for-review`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/review.py)|Valid for
PullRequest
Permitted for
Maintainer,
Member,
Author|
Turn draft PR into ready for review PR.
Examples:
- `/ready-for-review`
Synonyms: `/ready-for-review`, `/ready`| |[`/invite` `[@user...]`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/review.py)|Valid for
PullRequest
Permitted for
Maintainer,
Member,
Author,
Commenter|
Request PR review from given people (or yourself if none specified) for PR. Commenters may only invite themselves. Labels can be used as well, which are subsituted with the registered reviewers for that label.
Examples:
- `/invite`
- `/invite @johndoe @janedoe`
- `/invite platform/bare-metal`
Synonyms: `/invite`, `/review`| |[`/uninvite` `[@user...]`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/review.py)|Valid for
PullRequest
Permitted for
Maintainer,
Member,
Commenter|
No longer request PR review from given people (or yourself if none specified) for PR. Commenters may only uninvite themselves. Labels can be used as well, which are subsituted with the registered reviewers for that label.
Examples:
- `/uninvite`
- `/uninvite @johndoe @janedoe`
- `/uninvite platform/bare-metal`
Synonyms: `/uninvite`, `/unreview`| |[`/shift-issues`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/shift_issues.py)|Valid for
PullRequest
Permitted for
Anyone|
Generate dod logs for the shift.
Examples:
- `/shift-issues`| |[`/summarize` `[-w|--words` `NUMBER]` `[INSTRUCTIONS]`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/summarize.py)|Valid for
Issue
Permitted for
Anyone|
Summarize issue using generative pre-trained transformers (GPTs) such as OpenAI's GPT-4. Usage is granted solely on the condition that you acknowledge and accept its [**RISKS**](https://github.tools.sap/kubernetes/kube-docs/wiki/Gardener-Answering-Machine#risks) and our [**TERMS OF USE**](https://github.tools.sap/kubernetes/kube-docs/wiki/Gardener-Answering-Machine#terms-of-use).
Examples:
- `/summarize`
- `/summarize List all suggested improvements`
Synonyms: `/summarize`, `/summarise`, `/summary`, `/sum`| |[`/title` `title`](https://github.tools.sap/kubernetes/gardener-robot/blob/master/robot/commands/title.py)|Valid for
Issue,
PullRequest
Permitted for
Maintainer,
Member,
Author|
Change title of issue or PR.
Examples:
- `/title Add metrics endpoint`
Synonyms: `/title`, `/retitle`|
Kostov6 commented 2 months ago

/remove-lifecycle rotten /good-first-issue

gardener-robot commented 2 months ago

@Kostov6 Command /remove-lifecycle is not known.

gardener-robot commented 2 months ago

@Kostov6 Command /good-first-issue is not known.

Kostov6 commented 2 months ago
$ docker run europe-docker.pkg.dev/gardener-project/releases/gardener/extensions/provider-aws:v1.57.0 --help | grep log
      --log-format string                                 The format for the logs. Must be one of [json,text] (default "json")
      --log-level string                                  The level/severity for the logs. Must be one of [info,debug,error] (default "info")

It seems it comes from https://github.com/gardener/gardener/pull/6875 We can close this issue

Kostov6 commented 2 months ago

/close