Deploy to Kubernetes by using variable as Raw YAML volume

In the Kubernetes deployment step I’m trying to add a volume to my container by using the “Raw YAML” type. This “Raw YAML” should come from a variable, since this raw YAML is different for my local test environment (hostPath) and my live environment (azureFile).

However when I enter the correct YAML in my variable and then try to use this variable in the “Add Volume” I get the error that my variable is incorrect YAML.

An exception was thrown while parsing ther raw YAML volume configuration. Please ensure that the YAML is valid. The YAML is: #{Configuration.Storage} Object reference not set to an instance of an object.

My configuration variable:

My volume settings:

The error I get upon saving:

Is there any way to have different volumes based on a specific environment?

Hi Jan,

Thanks for getting in touch! I’m very sorry about the issue you’ve hit here and for the inconvenience it has caused. Sure enough I’ve been able to reproduce this issue in 2019.11.3, so unfortunately it looks to be current. I’ve raised a bug report at the following link for you to track, and I’ve reached out to the engineers here to have a look.

Please let me know if there’s anything else we can assist with moving forward!

Best regards,

Kenny

Hi Kenneth,

Thanks for your update. Hope this will be fixed soon. The only workaround I can think of right now is to duplicate my process step and change the Target environments for the entire step, but that seems a little overkill.

Any other ideas for a workaround in the meantime?

Kinds regards,

Jan

Hi Jan,

Thanks for keeping in touch! Unfortunately I think your idea is the only currently possible workaround. However, we have a PR in progress and we’re hoping the fix to this bug will be shipped sometime this week. I’m very sorry for the inconvenience this has caused you. Thank you also for bringing this issue to our attention!

Don’t hesitate to reach out if you have any questions or concerns going forward. :slight_smile:

Best regards,

Kenny

Hi Jan,

Just a quick update to let you know we shipped a fix for this bug in 2019.3.1. If you’re able to upgrade, I’d be interested to hear how you go. :slight_smile:

I appreciate your report of this bug as well, and please don’t hesitate to reach out if you have any questions or concerns going forward.

Best regards,

Kenny