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

int / boolean are written as strings into the output #3

Closed
blushingpenguin opened this issue Mar 18, 2020 · 1 comment
Closed

int / boolean are written as strings into the output #3

blushingpenguin opened this issue Mar 18, 2020 · 1 comment

Comments

@blushingpenguin
Copy link

foo.yaml:

kind: Template
apiVersion: v1
objects:
  - kind: Deployment
    apiVersion: apps/v1
    spec:
      replicas: $(REPLICAS)
parameters:
  - name: "REPLICAS"
    description: "number of pods"
    required: true
    value: 1
    parameterType: "bool"

ktmpl foo.yaml

---
kind: Deployment
apiVersion: apps/v1
spec:
  replicas: "1"

this causes k8s to complain because replicas is a string not an integer. A similar thing happens with boolean values.

@jimmycuadra
Copy link
Owner

This is how the template system works. To get an unquoted value, you use two sets of parens: $((VAR)). You can read the full explanation of the system in the original proposal. I discovered this document had moved so I updated the link in the project's README as well.

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

No branches or pull requests

2 participants