Skip to content

SAE namespace 相关字段设计 #90

Description

@heimanba

总体API设计

region: cn-hangzhou
namespace: ## 命名空间相关,或者为: auto  ## service
  config: # auto 或者 一个Object
    id: cn-hangzhou:test
    name: test-name
    description: namespace desc
    vpcConfig: # 选填
      vpcId: vpc-bxxxxc7pobl
      vSwitchId: vsw-bp17xxxxpfg9zr
      securityGroupId: sg-bp1xxxxxpzx4db    
  applications: ## 应用  ## function
    - name: test
      decription: This is a test description.
      code:
        packageType: PhpZip # 必填
        packageVersion: 0.0.1
        packageUrl: test.war # 文件路径
        ossConfig: bucket4sae
      cpu: 500 #  选填
      memory: 1024 #  选填
      replicas: 1 #  选填
slb:  ## 非必填
    Internet: [{ "port": 80, "targetPort": 8080, "protocol": "HTTP" }]

namespace

namespace 必须存在,可能为 Object对象或者 auto

namespace 还需要考虑创建

namespace 可以为 auto 字段,等价于 autoConfig: auto

namespace 不为auto时候

  1. id 必须存在 ,需要校验
  2. vpcConfig:
    a: auto:
    a1: 获取namespace下面的vpc信息获取成功,则进行下一步
    a2: 如果namespace下面不存在 vpc信息.。则直接报错,(当然也可以直接创建【TODO】)
    b: 对象值
    b1: 校验里面填写的字段:是否存在vpcId/vSwitchId/securityGroupId
    b2: 直接填写

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions