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

Preserve scalar types when using the replacement filter #4494

Merged

Commits on Mar 9, 2022

  1. Preserve scalar types when using the replacement filter

    Erasing the scalar type tag leads to unfortunate circumstances, in that
    the resulting yaml code is valid yaml, but will not meet the object
    spec.
    
    For example, using the replacement transformer to take a port number as
    a string from a ConfigMap and set a Pod port would previously end up
    with:
     - containerPort: "8080"
    when the spec requires that this is not a string:
     - containerPort: 8080
    
    Added unit tests for conversion to and from integers and booleans, plus
    creation from string and creation from integer.
    
    The creation behavior needs some refinement in a future PR.
    
    Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
    lack committed Mar 9, 2022
    Copy the full SHA
    cb80659 View commit details
    Browse the repository at this point in the history