Dynamic Kubernetes V2 Manifest


#1

Hi, I need to have dynamic parts in the Kubernetes V2 manifest. Depending on a certain condition I want to either use nodeSelector or nodeAffinity
I’m trying to do something like this:

    spec:
        {#if stage environment == true}
        nodeSelector:
            cloud.google.com/gke-preemptible: true
        {#else }
        nodeAffinity:
        .....
        {#endif }

Anyway to achieve this?
Thanks