v0.5.0: 3 стенда — изоляция состояния, WSGI middleware, OpenAPI server selector, POLYGON_STANDS env
- loader.py: STANDS dict, get_services/get_ops_index per stand, POLYGON_STANDS env
- mock_state.py: get_state(stand_id) — ленивая инициализация
- app.py: StandMiddleware — перезапись PATH_INFO до Flask-роутинга
- Все роуты: LocalProxy(state), LocalProxy(SERVICES/OPS_INDEX) через g.stand_id
- openapi.py: _build_servers() — по одному серверу на стенд
- services/stand{1,2,3}/ — 37 YAML на стенд из STANDS/dev и STANDS/test
- tests/test_api.py: +4 multi-stand теста (изоляция, fail-next, OpenAPI servers)
- Обратная совместимость: /api/v1/svc/... → стенд по умолчанию
This commit is contained in:
@@ -0,0 +1,229 @@
|
||||
name: nodejs
|
||||
service_id: 95
|
||||
service_display_name: NodeJS
|
||||
service_short_name: nodejs
|
||||
service_man: Развертывает контейнер в k8s кластере с node, который можно использовать для запуска своих приложений.<br/>Приложение должно быть доступно по ссылки в git репозитории, которая является входным
|
||||
параметром.
|
||||
lifecycle:
|
||||
suspendOnDestroyDefault: true
|
||||
adoptExistingOnCreateDefault: false
|
||||
operations:
|
||||
- svcOperationId: 58
|
||||
operation: create
|
||||
kind: instance
|
||||
action: create
|
||||
- svcOperationId: 61
|
||||
operation: delete
|
||||
kind: instance
|
||||
action: delete
|
||||
- svcOperationId: 59
|
||||
operation: modify
|
||||
kind: instance
|
||||
action: modify
|
||||
- svcOperationId: 374
|
||||
operation: reconcile
|
||||
kind: action
|
||||
action: reconcile
|
||||
- svcOperationId: 60
|
||||
operation: redeploy
|
||||
kind: action
|
||||
action: redeploy
|
||||
- svcOperationId: 121
|
||||
operation: resume
|
||||
kind: instance
|
||||
action: resume
|
||||
- svcOperationId: 120
|
||||
operation: suspend
|
||||
kind: instance
|
||||
action: suspend
|
||||
stateOut: {}
|
||||
cfsParams:
|
||||
- svcOperationCfsParamId: 1028
|
||||
svcOperationCfsParam: startupConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: false
|
||||
dataDescriptor:
|
||||
resourceRealm:
|
||||
dataType: string
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- iot-naeel
|
||||
- k8s-3-sandbox-nubes-ru
|
||||
- k8s-4-sandbox-nubes-ru
|
||||
- naeel-test-3
|
||||
- svcOperationCfsParamId: 1029
|
||||
svcOperationCfsParam: clusterConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: true
|
||||
dataDescriptor:
|
||||
cpu:
|
||||
dataType: integer > 0
|
||||
defaultValue: '200'
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
memory:
|
||||
dataType: integer > 0
|
||||
defaultValue: '256'
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
replicas:
|
||||
dataType: integer > 0
|
||||
defaultValue: '1'
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- '1'
|
||||
- '3'
|
||||
- '5'
|
||||
- '7'
|
||||
- svcOperationCfsParamId: 1030
|
||||
svcOperationCfsParam: accessConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: false
|
||||
dataDescriptor:
|
||||
domain:
|
||||
dataType: string
|
||||
defaultValue: node-btf263ja
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
- svcOperationCfsParamId: 1031
|
||||
svcOperationCfsParam: appConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: true
|
||||
dataDescriptor:
|
||||
version:
|
||||
dataType: string
|
||||
defaultValue: '23'
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- '18'
|
||||
- '20'
|
||||
- '22'
|
||||
- '23'
|
||||
gitPath:
|
||||
dataType: string
|
||||
defaultValue: https://github.com/xahys/testnode.git
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
healthPath:
|
||||
dataType: string
|
||||
defaultValue: ''
|
||||
isRequired: false
|
||||
isModifiable: false
|
||||
- svcOperationCfsParamId: 1032
|
||||
svcOperationCfsParam: jsonEnv
|
||||
dataType: map
|
||||
isRequired: false
|
||||
defaultValue: '{}'
|
||||
isModifiable: true
|
||||
- svcOperationCfsParamId: 1033
|
||||
svcOperationCfsParam: clusterConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: true
|
||||
dataDescriptor:
|
||||
cpu:
|
||||
dataType: integer > 0
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
memory:
|
||||
dataType: integer > 0
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
replicas:
|
||||
dataType: integer > 0
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- '1'
|
||||
- '3'
|
||||
- '5'
|
||||
- '7'
|
||||
- svcOperationCfsParamId: 1034
|
||||
svcOperationCfsParam: appConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: true
|
||||
dataDescriptor:
|
||||
version:
|
||||
dataType: string
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- '18'
|
||||
- '20'
|
||||
- '22'
|
||||
- '23'
|
||||
gitPath:
|
||||
dataType: string
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
healthPath:
|
||||
dataType: string
|
||||
defaultValue: ''
|
||||
isRequired: false
|
||||
isModifiable: false
|
||||
- svcOperationCfsParamId: 1035
|
||||
svcOperationCfsParam: jsonEnv
|
||||
dataType: map
|
||||
isRequired: false
|
||||
defaultValue: ''
|
||||
isModifiable: true
|
||||
- svcOperationCfsParamId: 1036
|
||||
svcOperationCfsParam: startupConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: true
|
||||
dataDescriptor:
|
||||
resourceRealm:
|
||||
dataType: string
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- iot-naeel
|
||||
- k8s-3-sandbox-nubes-ru
|
||||
- k8s-4-sandbox-nubes-ru
|
||||
- naeel-test-3
|
||||
cfsParamsByOp:
|
||||
58:
|
||||
- 1028
|
||||
- 1029
|
||||
- 1030
|
||||
- 1031
|
||||
- 1032
|
||||
61: []
|
||||
59:
|
||||
- 1033
|
||||
- 1034
|
||||
- 1035
|
||||
374: []
|
||||
60:
|
||||
- 1036
|
||||
121: []
|
||||
120: []
|
||||
stateParams:
|
||||
startupConfiguration: '{"resourceRealm": ""}'
|
||||
clusterConfiguration: '{"cpu": 200, "memory": 256, "replicas": 1}'
|
||||
accessConfiguration: '{"domain": "node-btf263ja"}'
|
||||
appConfiguration: '{"version": "23", "gitPath": "https://github.com/xahys/testnode.git", "healthPath": ""}'
|
||||
jsonEnv: '{}'
|
||||
Reference in New Issue
Block a user