Closed cpinjani closed 2 months ago
@Danil-Grigorev - what do you think to this?
We don’t do any pre-processing to the variables provided in the field. I checked:
apiversion: turtles-capi.cattle.io/v1alpha1
kind: CAPIProvider
metadata:
name: cluster-api
namespace: capi-system
spec:
additionalManifests:
name: capi-additional-rbac-roles
namespace: capi-system
configSecret:
name: capi-env-variables
name: cluster-api
type: core
variables:
IT_IS_VAR: "4"
This is stored in the secret.
apiversion: v1
data:
CLUSTER_TOPOLOGY: dHJ1ZQ==
EXP_CLUSTER_RESOURCE_SET: dHJ1ZQ==
EXP_MACHINE_POOL: dHJ1ZQ==
IT_IS_VAR: NA==
It means that UI is encoding value somehow.
Setup Rancher version: v2.8-head Rancher Turtles: v0.6.0 Rancher UI Extensions: CAPI UI Extension v0.4.0 Browser type & version: Chrome Latest
To Reproduce
Expected Result Variables value must remain as string while creating provider. For AWS example, CAPA_LOGLEVEL:4 get encoded and provider does not come up due to error,
invalid argument "NA==" for "-v, --v" flag: strconv.ParseUint: parsing "NA==": invalid syntax
Payload
Screenshots![image](https://github.com/rancher/capi-ui-extension/assets/73099870/0da0cc21-d3ec-466e-b086-a572903b17c0)
cc: @richardcase