int / boolean are written as strings into the output
blushingpenguin opened this issue · comments
Mark Weaver commented
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 commented
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.