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

Line separated array list is not parsed properly by ktmpl #20

Closed
suneeta-mall opened this issue Aug 1, 2017 · 5 comments
Closed

Line separated array list is not parsed properly by ktmpl #20

suneeta-mall opened this issue Aug 1, 2017 · 5 comments
Labels

Comments

@suneeta-mall
Copy link

suneeta-mall commented Aug 1, 2017

In this template:

kind: "Template"
apiVersion: "v1"
metadata:
  name: "xx"
  annotations:
    description: "ss"
labels:
  template: "ss"
objects:
  - kind: Job
    apiVersion: batch/v1
    metadata:
      name: metadata-generation
      namespace: sp
    spec:
      template:
        metadata:
          name: somepod
        spec:
          containers:
          - name: metadata-generation-container
            image: some-image
            args: ["x", 
                  "generate"]       
parameters:
  - name: "REGION"
    description: "AWS region name"
    required: true
    parameterType: "string"

because of line sperated arg list, ktmpl fails to apply them variable and convert the yaml with variables. If I put the list in one line it works fine.

@suneeta-mall suneeta-mall changed the title It seems the line separated array list is not parsed properly by ktmpl Line separated array list is not parsed properly by ktmpl Aug 1, 2017
@jimmycuadra
Copy link
Contributor

This may be an issue with the upstream YAML parser that ktmpl uses. I'll need to look into this a bit more to verify.

@jimmycuadra jimmycuadra added the bug label Aug 1, 2017
@suneeta-mall
Copy link
Author

Sure. Just wanted to add that the list syntax - seems to work fine.

        spec:
          containers:
            - name: some-container
              image: blah blah
              args: 
                - "run"
                - "--cluster"

@jimmycuadra
Copy link
Contributor

I think chyh1990/yaml-rust#72 fixed this problem, but it hasn't been released yet. I'll leave this issue open until I'm able to use the new one in ktmpl and release a new version.

@dtolnay
Copy link

dtolnay commented Nov 22, 2017

I believe this is fixed in yaml-rust 0.4.0.

@jimmycuadra
Copy link
Contributor

This is fixed in the latest release: https://github.com/jimmycuadra/ktmpl/releases/tag/0.8.0

I don't have access to this repo anymore, so please close the issue if it's solved for you. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants