amazon-eks-ami
amazon-eks-ami copied to clipboard
Added Log level Option
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.
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 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
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.