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,424 @@
|
||||
name: nextcloud
|
||||
service_id: 50
|
||||
service_display_name: Nextcloud
|
||||
service_short_name: nextcloud
|
||||
service_man: 'Ресурсная платформа: k8s. Автоматизация: helm chart'
|
||||
lifecycle:
|
||||
suspendOnDestroyDefault: true
|
||||
adoptExistingOnCreateDefault: false
|
||||
operations:
|
||||
- svcOperationId: 16
|
||||
operation: create
|
||||
kind: instance
|
||||
action: create
|
||||
- svcOperationId: 404
|
||||
operation: create_backup
|
||||
kind: subresource
|
||||
action: create
|
||||
- svcOperationId: 17
|
||||
operation: delete
|
||||
kind: instance
|
||||
action: delete
|
||||
- svcOperationId: 67
|
||||
operation: modify
|
||||
kind: instance
|
||||
action: modify
|
||||
- svcOperationId: 390
|
||||
operation: reconcile
|
||||
kind: action
|
||||
action: reconcile
|
||||
- svcOperationId: 406
|
||||
operation: recovery
|
||||
kind: action
|
||||
action: recovery
|
||||
- svcOperationId: 66
|
||||
operation: restart
|
||||
kind: action
|
||||
action: restart
|
||||
- svcOperationId: 129
|
||||
operation: resume
|
||||
kind: instance
|
||||
action: resume
|
||||
- svcOperationId: 128
|
||||
operation: suspend
|
||||
kind: instance
|
||||
action: suspend
|
||||
stateOut:
|
||||
backups: {}
|
||||
cfsParams:
|
||||
- svcOperationCfsParamId: 1055
|
||||
svcOperationCfsParam: startupConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: false
|
||||
dataDescriptor:
|
||||
redisEnabled:
|
||||
dataType: boolean
|
||||
defaultValue: 'true'
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- 'true'
|
||||
psqlUid:
|
||||
dataType: uuid
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
redisUid:
|
||||
dataType: uuid
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
resourceRealm:
|
||||
dataType: string
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- k8s-3-sandbox-nubes-ru
|
||||
- k8s-4-sandbox-nubes-ru
|
||||
psqlEnabled:
|
||||
dataType: boolean
|
||||
defaultValue: 'true'
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- 'true'
|
||||
- svcOperationCfsParamId: 1056
|
||||
svcOperationCfsParam: clusterConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: true
|
||||
dataDescriptor:
|
||||
cpu:
|
||||
dataType: integer > 0
|
||||
defaultValue: '1000'
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- '1000'
|
||||
- '2000'
|
||||
- '3000'
|
||||
- '4000'
|
||||
memory:
|
||||
dataType: integer > 0
|
||||
defaultValue: '1024'
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- '1024'
|
||||
- '2048'
|
||||
- '3072'
|
||||
- '4096'
|
||||
- '5120'
|
||||
- '6144'
|
||||
- '7168'
|
||||
- '8192'
|
||||
replicas:
|
||||
dataType: integer > 0
|
||||
defaultValue: '1'
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- '1'
|
||||
- '2'
|
||||
disk:
|
||||
dataType: integer > 0
|
||||
defaultValue: '10'
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
- svcOperationCfsParamId: 1057
|
||||
svcOperationCfsParam: accessConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: false
|
||||
dataDescriptor:
|
||||
domain:
|
||||
dataType: string
|
||||
defaultValue: nextcloud-vbxjicr2
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
- svcOperationCfsParamId: 1058
|
||||
svcOperationCfsParam: appConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: true
|
||||
dataDescriptor:
|
||||
version:
|
||||
dataType: string
|
||||
defaultValue: 33.0.4
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- 33.0.4
|
||||
documentServer:
|
||||
dataType: string
|
||||
defaultValue: collabora
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- collabora
|
||||
logLevel:
|
||||
dataType: string
|
||||
defaultValue: INFO
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- DEBUG
|
||||
- INFO
|
||||
- WARN
|
||||
- ERROR
|
||||
- FATAL
|
||||
- NONE
|
||||
- svcOperationCfsParamId: 1077
|
||||
svcOperationCfsParam: startupConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: false
|
||||
dataDescriptor:
|
||||
veleroUid:
|
||||
dataType: string
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
- svcOperationCfsParamId: 1059
|
||||
svcOperationCfsParam: clusterConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: true
|
||||
dataDescriptor:
|
||||
replicas:
|
||||
dataType: integer > 0
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- '1'
|
||||
- '2'
|
||||
disk:
|
||||
dataType: integer > 0
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
cpu:
|
||||
dataType: integer > 0
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- '1000'
|
||||
- '2000'
|
||||
- '3000'
|
||||
- '4000'
|
||||
memory:
|
||||
dataType: integer > 0
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- '1024'
|
||||
- '2048'
|
||||
- '3072'
|
||||
- '4096'
|
||||
- '5120'
|
||||
- '6144'
|
||||
- '7168'
|
||||
- '8192'
|
||||
- svcOperationCfsParamId: 1060
|
||||
svcOperationCfsParam: appConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: true
|
||||
dataDescriptor:
|
||||
version:
|
||||
dataType: string
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- 33.0.4
|
||||
documentServer:
|
||||
dataType: string
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- collabora
|
||||
logLevel:
|
||||
dataType: string
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- DEBUG
|
||||
- INFO
|
||||
- WARN
|
||||
- ERROR
|
||||
- FATAL
|
||||
- NONE
|
||||
- svcOperationCfsParamId: 1078
|
||||
svcOperationCfsParam: startupConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: true
|
||||
dataDescriptor:
|
||||
resourceRealm:
|
||||
dataType: string
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- k8s-3-sandbox-nubes-ru
|
||||
- k8s-4-sandbox-nubes-ru
|
||||
veleroUid:
|
||||
dataType: string
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
recoveryPoint:
|
||||
dataType: string
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
psqlEnabled:
|
||||
dataType: boolean
|
||||
defaultValue: 'true'
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- 'true'
|
||||
redisEnabled:
|
||||
dataType: boolean
|
||||
defaultValue: 'true'
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- 'true'
|
||||
psqlUid:
|
||||
dataType: uuid
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
redisUid:
|
||||
dataType: uuid
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
- svcOperationCfsParamId: 1079
|
||||
svcOperationCfsParam: clusterConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: true
|
||||
dataDescriptor:
|
||||
replicas:
|
||||
dataType: integer > 0
|
||||
defaultValue: 1,2
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
disk:
|
||||
dataType: integer > 0
|
||||
defaultValue: '10'
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
cpu:
|
||||
dataType: integer > 0
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- '1000'
|
||||
- '2000'
|
||||
- '3000'
|
||||
- '4000'
|
||||
memory:
|
||||
dataType: integer > 0
|
||||
defaultValue: ''
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- '1024'
|
||||
- '2048'
|
||||
- '3072'
|
||||
- '4096'
|
||||
- '5120'
|
||||
- '6144'
|
||||
- '7168'
|
||||
- '8192'
|
||||
- svcOperationCfsParamId: 1080
|
||||
svcOperationCfsParam: accessConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: true
|
||||
dataDescriptor:
|
||||
domain:
|
||||
dataType: string
|
||||
defaultValue: nextcloud-bcdguda1
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
- svcOperationCfsParamId: 1081
|
||||
svcOperationCfsParam: appConfiguration
|
||||
dataType: map-fixed
|
||||
isRequired: true
|
||||
defaultValue: ''
|
||||
isModifiable: true
|
||||
dataDescriptor:
|
||||
logLevel:
|
||||
dataType: string
|
||||
defaultValue: NONE
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- DEBUG
|
||||
- INFO
|
||||
- WARN
|
||||
- ERROR
|
||||
- FATAL
|
||||
- NONE
|
||||
version:
|
||||
dataType: string
|
||||
defaultValue: ''
|
||||
isRequired: false
|
||||
isModifiable: false
|
||||
documentServer:
|
||||
dataType: string
|
||||
defaultValue: collabora
|
||||
isRequired: true
|
||||
isModifiable: false
|
||||
valueList:
|
||||
- collabora
|
||||
cfsParamsByOp:
|
||||
16:
|
||||
- 1055
|
||||
- 1056
|
||||
- 1057
|
||||
- 1058
|
||||
404:
|
||||
- 1077
|
||||
17: []
|
||||
67:
|
||||
- 1059
|
||||
- 1060
|
||||
390: []
|
||||
406:
|
||||
- 1078
|
||||
- 1079
|
||||
- 1080
|
||||
- 1081
|
||||
66: []
|
||||
129: []
|
||||
128: []
|
||||
stateParams:
|
||||
startupConfiguration: '{"redisEnabled": true, "psqlUid": "", "redisUid": "", "resourceRealm": "", "psqlEnabled": true}'
|
||||
clusterConfiguration: '{"cpu": 1000, "memory": 1024, "replicas": 1, "disk": 10}'
|
||||
accessConfiguration: '{"domain": "nextcloud-vbxjicr2"}'
|
||||
appConfiguration: '{"version": "33.0.4", "documentServer": "collabora", "logLevel": "INFO"}'
|
||||
Reference in New Issue
Block a user