Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
containerd.runtimes.<name>.options to preserve quotes for non-boolean…
… values and normalize boolean values This commit modifies the Jinja2 template for generating the containerd configuration file to handle a specific requirement: preserving quotes for non-boolean values in `containerd.runtimes.<name>.options`. The update is necessary due to the mixed data types in the options field: 1. Boolean values (true, false) and their string equivalents ("true", "false") should be rendered without quotes. 2. Non-boolean string values should be rendered with quotes. The logic implemented checks if a value is a boolean or the string representation of a boolean. If it is, we ensure it's rendered as a lowercase `true` or `false` without quotes. If the value is not a boolean or a string equivalent of a boolean, we render it with quotes, preserving the original formatting. While the logic may seem verbose, it's necessary to accommodate the differing requirements for boolean and non-boolean values within the configuration file, ensuring the generated configurations are correctly formatted and functional.
- Loading branch information