简体   繁体   English

如何等到在 jelastic manifest 安装中为 appid 创建 env?

[英]How to wait until env for appid is created in jelastic manifest installation?

I have the following manifest :我有以下清单

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: '<b>Development:</b> one master (1) and one scalable worker (1+)'
          1-prod: '<b>Production:</b> 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

Unfortunately, when I run that manifest, the k8s cluster gets installed, but the subdomains cannot be created (yet), because:不幸的是,当我运行该清单时,会安装 k8s 集群,但无法创建子域(还),因为:

[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."}

What jelastic API methods can I use to perform the necessary waiting until subdomain creation is possible?我可以使用哪些 jelastic API 方法来执行必要的等待,直到可以创建子域?

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.但是,我希望将所有内容都放在同一个清单中。

Please change this:请更改此:

enableSubDomains:
  - jelastic.env.binder.AddDomains[cp]:
      domains: staging,api-staging,assets-staging,api,assets

to:到:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我不能通过我的 jelastic 安装清单附加外部 IP? - Why can't I attach an external IP through my jelastic installation manifest? 在 CDK 中,我可以等到安装了 Helm 的操作符运行后再应用清单吗? - In CDK, can I wait until a Helm-installed operator is running before applying a manifest? 如何等待kubernetes服务启动? - How to wait until kubernetes service starts? 如何等到分配 EXTERNAL-IP? - How to wait until EXTERNAL-IP is assigned? 如何更新使用 kubernetes 清单创建的所有资源? - How to update all resources that were created with kubernetes manifest? 如何在 jelastic 上托管的 kubernetes 中配置服务的入口? - How to configure ingress to a service in kubernetes hosted on jelastic? 如何使用 shell 脚本等待 Kubernetes 的 Pod 列表成功 - How to wait until Kubernetes list of pods are successful using shell script 如何使用 init 容器等到另一个 pod 开始运行? - How to wait until another pod starts running using init containers? 如何保持等待 pod 终止,直到 kubernetes 中的当前进程完成? - How to keep wait pod termination until current processes done in kubernetes? 如何等到 Kubernetes 将外部 IP 分配给 LoadBalancer 服务? - How to wait until Kubernetes assigned an external IP to a LoadBalancer service?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM