<p>I have the following <a href="https://github.com/shopozor/services/blob/dev/manifest.jps" rel="nofollow noreferrer">manifest</a>:</p>

<pre><code>jpsVersion: 1.3
jpsType: install
application:
  id: shopozor-k8s-cluster
  name: Shopozor k8s cluster
  version: 0.0

  baseUrl: https://raw.githubusercontent.com/shopozor/services/dev

  settings:
    fields:
      - name: envName
        caption: Env Name
        type: string
        default: shopozor
      - name: topo
        type: radio-fieldset
        values:
          0-dev: '&lt;b&gt;Development:&lt;/b&gt; one master (1) and one scalable worker (1+)'
          1-prod: '&lt;b&gt;Production:&lt;/b&gt; multi master (3) with API balancers (2+) and scalable workers (2+)'
        default: 0-dev
      - name: version
        type: string
        caption: Version
        default: v1.16.3

  onInstall:
    - installKubernetes
    - enableSubDomains

  actions:
    installKubernetes:
      install:
        jps: https://github.com/jelastic-jps/kubernetes/blob/${settings.version}/manifest.jps
        envName: ${settings.envName}
        displayName: ${settings.envName}
        settings:
          deploy: cmd
          cmd: |-
            curl -fsSL ${baseUrl}/scripts/install_k8s.sh | /bin/bash
          topo: ${settings.topo}
          dashboard: version2
          ingress-controller: Nginx
          storage: true
          api: true
          monitoring: true
          version: ${settings.version}
          jaeger: false
    enableSubDomains:
      - jelastic.env.binder.AddDomains[cp]:
          domains: staging,api-staging,assets-staging,api,assets
</code></pre>

<p>Unfortunately, when I run that manifest, the k8s cluster gets installed, but the subdomains cannot be created (yet), because:</p>

<pre><code>[15:26:28 Shopozor.cluster:3]: enableSubDomains:  {"action":"enableSubDomains","params":{}}
[15:26:29 Shopozor.cluster:4]: api [cp]:  {"method":"jelastic.env.binder.AddDomains","params":{"domains":"staging,api-staging,assets-staging,api,assets"},"nodeGroup":"cp"}
[15:26:29 Shopozor.cluster:4]: ERROR: api.response: {"result":2303,"source":"JEL","error":"env for appid [5ce25f5a6988fbbaf34999b08dd1d47c] not created."}
</code></pre>

<p>What jelastic API methods can I use to perform the necessary waiting until subdomain creation is possible? </p>

<p>My current workaround is to split that manifest into two manifests: one cluster installation manifest and one update manifest creating the subdomains. However, I'd like to have everything in the same manifest.</p>

Laurent Michel
<p>Please change this:</p>

<pre><code>enableSubDomains:
  - jelastic.env.binder.AddDomains[cp]:
      domains: staging,api-staging,assets-staging,api,assets
</code></pre>

<p>to: </p>

<pre><code>enableSubDomains:
  - jelastic.env.binder.AddDomains[cp]:
      envName: ${settings.envName}
      domains: staging,api-staging,assets-staging,api,assets
</code></pre>
