Orchestration failed Kubernetes Deploy Manifest Operation


#1

This block of yaml works, the parameters are substituted with actual values:

    env:
    - name: KBASE_IBM_REGION
      value: "${parameters.region}"
    - name: KBASE_IBM_ENDPOINT
      value: "${parameters.endpoint}"
    - name: KBASE_IBM_BUCKET
      value: "${parameters.bucket}"

When I try using ${execution.startTime} I get this error:

              {
            "phase": "ORCHESTRATION",
            "status": "Orchestration failed: KubernetesDeployManifestOperation | KubectlException: [Deploy failed: Error from server (BadRequest): error when creating \"STDIN\": DaemonSet in version \"v1beta1\" cannot be handled as a DaemonSet: v1beta1.DaemonSet.Spec: v1beta1.DaemonSetSpec.Template: v1.PodTemplateSpec.Spec: v1.PodSpec.Containers: []v1.Container: v1.Container.Env: []v1.EnvVar: v1.EnvVar.Value: ReadString: expects \" or n, but found 1, error found in #10 byte of ...|,\"value\":15429081975|..., bigger context ...|rs\":[{\"env\":[{\"name\":\"KBASE_LAST_UPDATE\",\"value\":1542908197548},{\"name\":\"KBASE_IBM_REGION\",\"value\":\"|...\n]"
          }

The error seems to suggest that it expects the value to be quoted ( which it is in the yaml ) however when the substitution takes place it seems to remove the quotes. If I escape the quotes it works:

    env:
    - name: KBASE_LAST_UPDATE
      value: \"${execution.startTime}\"

The problem with this is that the escaped quotes are actually set in the env:

  Environment:
    KBASE_LAST_UPDATE:   \"1542909909159\"