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

Add validation of agent flag values for ConfigMap #16014

Merged

Commits on May 21, 2021

  1. Add validation of agent flag values for ConfigMap

    If the Cilium agent flags are passed via a mounted ConfigMap
    (cilium-agent --config-dir=/tmp/cilium/config-map), the default for Helm
    deployments, the flag values are not validated. For example if you set
    "restore" with invalid value "0SO##ME5_RANDOM" in ConfigMap then Agent
    would run with incorrect parameter:
    .....
    level=info msg=" --restore='0SO##ME5_RANDOM'" subsys=daemon
    .....
    
    But if start Agent with CLI then the validation will warn and prevent
    starting the agent:
    cilium-agent[8654]: invalid argument "0SO##ME5_RANDOM" for "--restore"
    flag: strconv.ParseBool: parsing "0SO##ME5_RANDOM": invalid syntax
    
    This commit add agent flag values validation for ConfigMap
    
    Fixes: cilium#13070
    
    Signed-off-by: Roman Ptitcyn romanspb@yahoo.com
    romanspb80 committed May 21, 2021
    Configuration menu
    Copy the full SHA
    24f61bb View commit details
    Browse the repository at this point in the history