ktmpl icon indicating copy to clipboard operation
ktmpl copied to clipboard

Octal values not preserved

Open JonathanBroomeMYOB opened this issue 8 years ago • 1 comments

As part of my config I have the following:

volumes:
- name: init-script
  configMap:
    name: app-init-script
    defaultMode: 0744

But when run through ktmpl this comes out as:

volumes:
- name: init-script
  configMap:
    name: app-init-script
    defaultMode: 744

The 744 is then considered to be an int, rather than an octal value, so the app fails to deploy. As a workaround, I can set this to 484, which is the base 10 equivalent of 744.

JonathanBroomeMYOB avatar Aug 18 '17 03:08 JonathanBroomeMYOB

The YAML parser that ktmpl uses adheres to the YAML 1.2 spec, which requires octal values to be prefixed with 0o (that's a zero followed by a lower-case letter O). Try using 0o744 and see if that works for you.

jimmycuadra avatar Aug 18 '17 08:08 jimmycuadra