为什么我不能通过我的 jelastic 安装清单附加外部 IP?

Why can't I attach an external IP through my jelastic installation manifest?

我有一个非常简单的 jelastic 安装清单,用于安装 kubernetes 集群:

jpsVersion: 1.3
jpsType: install
application:
  id: shopozor-k8s-cluster
  name: Shopozor k8s cluster
  version: 0.0

  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: k8s-version
      type: string
      caption: k8s manifest version
      default: v1.16.3

  onInstall:
  - installKubernetes
  - attachIpToWorkerNodes

  actions:
    installKubernetes:
      install:
        jps: https://github.com/jelastic-jps/kubernetes/blob/${settings.k8s-version}/manifest.jps
        envName: ${settings.envName}
        displayName: ${settings.envName}
        settings:
          deploy: cc
          topo: ${settings.topo}
          dashboard: version2
          ingress-controller: Nginx
          storage: true
          api: true
          monitoring: true
          version: ${settings.k8s-version}
          jaeger: false
    attachIpToWorkerNodes:
    - forEach(node:nodes.cp):
      - jelastic.env.binder.AttachExtIp:
          envName: ${settings.envName}
          nodeId: ${@node.id}

如果我安装了那个清单,那么我就启动了我的集群并且 运行,但是工作节点没有连接 IPv4。安装该清单后,如果我另外安装以下更新清单,则它可以工作:

jpsVersion: 1.3
jpsType: update
application:
  id: attach-ext-ip
  name: Attach external IP
  version: 0.0

  onInstall:
  - attachIpToWorkerNodes

  actions:
    attachIpToWorkerNodes:
    - forEach(node:nodes.cp):
      - jelastic.env.binder.AttachExtIp:
          nodeId: ${@node.id}

我在安装清单中做错了什么?为什么 ip 没有附加到我的工作节点,而如果我在安装更新清单后执行该操作,则有?

请注意,"public IP binding" 功能在正式版中尚不可用。它正在积极开发中,将在我们的下一个版本中正式宣布。 在当前的稳定版本中,与它相关的部分功能可能无法正常使用。目前,不建议将其用于生产,但您可以仅出于测试目的尝试使用它。 至于原始清单中的 "attachIpToWorkerNodes" 操作,问题是所创建环境的 "nodes.cp" 未在调用 "forEach" 的范围内声明。动作的正确版本是:

attachIpToWorkerNodes:
  install:
    envName: ${settings.envName}
    jps:
      type: update
      name: Attach IP To Worker Nodes
      onInstall: jelastic.env.binder.AttachExtIp [nodes.cp.join(id,)]

如果您还有任何问题,请告诉我们。