origin: Cannot specify integer/bool/base64 types in templates
It is not currently possible to specify integer types in template parameters.
For example, we want to be able to specify a parameter:
- name: N_MIAMI
description: Number of Miami pods
value: 1
where N_MIAMI will actually be fed to a replication controller to specify the number of replicas. As written, this fails during oc process with: error: unable to load “agree21-template.yaml”: json: cannot unmarshal number into Go value of type string
We can fix this with:
- name: N_MIAMI
description: Number of Miami pods
value: "1"
which now successfully processes. However, the output now contains:
“replicas”: “1” which fails on creation with: json: cannot unmarshall string into Go value of type int
A possible fix would be to be able to specify the expected parameter type (string, int or float should cover it) in the parameter definition.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 3
- Comments: 23 (18 by maintainers)
Commits related to this issue
- Add the ability to disable SSL verification on git over HTTPS This is done through the new boolean field "disableSSLCheck" inside GitBuildSource object. The use case is to allow the user to specify ... — committed to jwendell/origin by jwendell 8 years ago
- Improve Ansible idempotency. Similar to what we just merged for archivist, the role to deploy the app will no longer destroy the running app and trigger a build. Instead we maintain the OpenShift obj... — committed to dgoodwin/online-analytics by dgoodwin 7 years ago
- Improve Ansible idempotency. Similar to what we just merged for archivist, the role to deploy the app will no longer destroy the running app and trigger a build. Instead we maintain the OpenShift obj... — committed to dgoodwin/online-analytics by dgoodwin 7 years ago
As referenced here: https://github.com/openshift/origin/pull/11068
There is a workaround using
${{ VARIABLE }}instead of${ VARIABLE}, but I missed that. Hopefully this comment helps somebody in the same situationIn my case I had to remove the spaces as well:
${{VARIABLE}}. @alwinmark thanks for pointing me in the right direction.