amazon-eks-ami icon indicating copy to clipboard operation
amazon-eks-ami copied to clipboard

Added Log level Option

Open steveizzle opened this issue 3 years ago • 2 comments

Issue #, if available:

#733

Description of changes:

Added Option to bootstrap.sh for setting the loglevel of kubelets. Defaults to 2 which was hard encoded before.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

steveizzle avatar Aug 31 '21 15:08 steveizzle

You can update log level currently by passing the log level as additional kubelet args, which is already supported in the bootstrap script.

Something like:

      #!/bin/bash
      /etc/eks/bootstrap.sh <cluster_name> --kubelet-extra-args '--v=8'

abeer91 avatar Sep 03 '21 17:09 abeer91

@abeer91 i did that and it works, but i find it a little weird and hacky for such a professional product like the official eks workers to have a process running with two same flags. https://github.com/awslabs/amazon-eks-ami/issues/733#issuecomment-900119187

steveizzle avatar Sep 03 '21 20:09 steveizzle

I don't disagree that this looks a bit odd; but it's just the behavior of https://github.com/spf13/pflag. This applies for any flag on kubelet or any other k8s binary.

I don't think adding a new bootstrap flag for this specific kubelet flag makes sense, because we already have the general-purpose --kubelet-extra-args. As it stands, if the user defines a verbosity in --kubelet-extra-args, that's what takes effect. I think the current behavior is as correct and as unambiguous as possible.

cartermckinnon avatar Nov 23 '22 23:11 cartermckinnon