@opensoha/contracts 0.1.24 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMPATIBILITY.md +24 -0
- package/README.md +1 -1
- package/agent/environment/export.go +1 -0
- package/agent/environment/protocol_test.go +1 -1
- package/agent/guest/protocol_test.go +2 -2
- package/auth/catalog_generated.go +2 -2
- package/auth/gateway_permissions_test.go +48 -0
- package/auth/permission-catalog.json +300 -1
- package/compat/consumer-revisions.json +1 -1
- package/compat/json-schema-ecosystem-0.1.0.json +1 -1
- package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
- package/delivery/document.schema.json +127 -9
- package/examples/relations_compat_test.go +18 -0
- package/fixtures/openapi/DeliveryDocument/invalid/migration-missing-guide-build-template.json +30 -0
- package/fixtures/openapi/DeliveryDocument/invalid/migration-missing-guide-deployment-template.json +30 -0
- package/fixtures/openapi/DeliveryDocument/invalid/migration-missing-guide-workflow-template.json +27 -0
- package/fixtures/openapi/DeliveryDocument/valid/migration-build-template.json +31 -0
- package/fixtures/openapi/DeliveryDocument/valid/migration-deployment-template.json +31 -0
- package/fixtures/openapi/DeliveryDocument/valid/migration-workflow-template.json +28 -0
- package/fixtures/openapi/DeliveryPlanInput/invalid/manual-plan.json +7 -0
- package/fixtures/openapi/DeliveryPlanInput/valid/manual-plan.json +6 -0
- package/fixtures/openapi/DeliveryTargetInput/invalid/candidate-on-runtime-deploy.json +9 -0
- package/fixtures/openapi/DeliveryTargetInput/invalid/config-update-missing-service.json +7 -0
- package/fixtures/openapi/DeliveryTargetInput/valid/template-configuration-only.json +8 -0
- package/fixtures/openapi/DeliveryTargetInput/valid/template-configuration-without-runtime-environment.json +1 -0
- package/fixtures/openapi/KubernetesAgentActionCheck/invalid/unproven-state.json +6 -0
- package/fixtures/openapi/KubernetesAgentActionCheck/valid/configured-denied.json +9 -0
- package/fixtures/openapi/KubernetesAgentActionProfile/invalid/wildcard.json +1 -0
- package/fixtures/openapi/KubernetesAgentActionProfile/valid/workbench.json +1 -0
- package/fixtures/openapi/KubernetesClusterRegistrationRequest/invalid/action-profile.json +3 -0
- package/fixtures/openapi/KubernetesClusterRegistrationRequest/valid/action-profile.json +5 -0
- package/fixtures/openapi/KubernetesImportCandidateListEnvelope/invalid/source-with-spec.json +33 -0
- package/fixtures/openapi/KubernetesImportCandidateListEnvelope/invalid/source-without-uid.json +29 -0
- package/fixtures/openapi/KubernetesImportCandidateListEnvelope/valid/stable-source.json +30 -0
- package/fixtures/openapi/KubernetesNodeListEnvelope/invalid/condition-status-boolean.json +17 -0
- package/fixtures/openapi/KubernetesNodeListEnvelope/invalid/taint-effect-missing.json +16 -0
- package/fixtures/openapi/KubernetesNodeListEnvelope/valid/legacy-fields-absent.json +11 -0
- package/fixtures/openapi/KubernetesNodeListEnvelope/valid/no-taints.json +13 -0
- package/fixtures/openapi/KubernetesNodeListEnvelope/valid/ready-cordoned-tainted.json +28 -0
- package/fixtures/openapi/KubernetesNodeListEnvelope/valid/unknown-fields-null.json +13 -0
- package/fixtures/openapi/KubernetesPod/invalid/pod-uid.json +9 -0
- package/fixtures/openapi/KubernetesPod/valid/pod-uid.json +9 -0
- package/fixtures/openapi/KubernetesPodDetail/invalid/pod-uid.json +6 -0
- package/fixtures/openapi/KubernetesPodDetail/valid/pod-uid.json +6 -0
- package/fixtures/openapi/KubernetesServiceImportRequest/invalid/empty-source-uid.json +48 -0
- package/fixtures/openapi/KubernetesServiceImportRequest/valid/pinned-workloads-and-cr.json +48 -0
- package/fixtures/openapi/KubernetesTopologyCoverage/invalid/empty-as-success.json +5 -0
- package/fixtures/openapi/KubernetesTopologyCoverage/valid/not-installed.json +6 -0
- package/fixtures/openapi/KubernetesTopologyGraphEdge/invalid/negative-weight.json +8 -0
- package/fixtures/openapi/KubernetesTopologyGraphEdge/valid/zero-weight.json +20 -0
- package/fixtures/openapi/KubernetesTopologyGraphNode/invalid/fake-flow-kind.json +42 -0
- package/fixtures/openapi/KubernetesTopologyGraphNode/valid/rule.json +42 -0
- package/fixtures/openapi/KubernetesTopologySnapshot/invalid/raw-source-field.json +33 -0
- package/fixtures/openapi/KubernetesTopologySnapshot/valid/projected-source.json +32 -0
- package/fixtures/openapi/KubernetesTopologySnapshotRequest/invalid/arbitrary-gvr.json +8 -0
- package/fixtures/openapi/KubernetesTopologySnapshotRequest/valid/bounded-sources.json +11 -0
- package/fixtures/openapi/KubernetesTopologySourceQuery/invalid/cluster-namespace.json +4 -0
- package/fixtures/openapi/KubernetesTopologySourceQuery/valid/all-namespaces.json +4 -0
- package/fixtures/openapi/ManifestExecutionTaskPayload/invalid/initialization.json +7 -0
- package/fixtures/openapi/ManifestExecutionTaskPayload/valid/initialization.json +7 -0
- package/fixtures/openapi/ManifestRootResource/invalid/root.json +1 -0
- package/fixtures/openapi/ManifestRootResource/valid/root.json +1 -0
- package/fixtures/openapi/ResourceMonitoringPanel/invalid/unknown-quality.json +7 -0
- package/fixtures/openapi/ResourceMonitoringPanel/valid/not-collected.json +7 -0
- package/fixtures/openapi/ResourceMonitoringPoint/invalid/string-zero.json +4 -0
- package/fixtures/openapi/ResourceMonitoringPoint/valid/missing.json +4 -0
- package/fixtures/openapi/ResourceMonitoringPoint/valid/zero.json +4 -0
- package/fixtures/openapi/ResourceMonitoringView/invalid/raw-query.json +12 -0
- package/fixtures/openapi/ResourceMonitoringView/valid/unconfigured.json +12 -0
- package/fixtures/openapi/ResourceRelationConfig/invalid/executable-rule.json +17 -0
- package/fixtures/openapi/ResourceRelationConfig/valid/unknown-kind.json +13 -0
- package/fixtures/openapi/ServiceDeploymentTemplateInput/invalid/migration-missing-guide-valid-yaml.json +38 -0
- package/fixtures/openapi/ServiceDeploymentTemplateInput/valid/migration-valid-yaml.json +39 -0
- package/fixtures/openapi/TemplateMigrationAssessment/invalid/initialization.json +9 -0
- package/fixtures/openapi/TemplateMigrationAssessment/valid/initialization.json +9 -0
- package/fixtures/openapi/TemplateMigrationPolicy/invalid/blank-guide.json +5 -0
- package/fixtures/openapi/TemplateMigrationPolicy/invalid/missing-guide.json +4 -0
- package/fixtures/openapi/TemplateMigrationPolicy/invalid/unknown-escape-hatch.json +6 -0
- package/fixtures/openapi/TemplateMigrationPolicy/valid/legacy-safe.json +4 -0
- package/fixtures/openapi/TemplateMigrationPolicy/valid/ordered-data-change.json +5 -0
- package/fixtures/openapi/TemplateUpdateBatchInput/invalid/duplicate-candidates.json +11 -0
- package/fixtures/openapi/TemplateUpdateBatchInput/invalid/empty-identities.json +10 -0
- package/fixtures/openapi/TemplateUpdateBatchInput/valid/staged-adoption.json +10 -0
- package/fixtures/openapi/TemplateUpdatePolicyInput/invalid/unknown-mode.json +8 -0
- package/fixtures/openapi/TemplateUpdatePolicyInput/valid/explicit-automatic.json +8 -0
- package/fixtures/openapi/TemplateUpdatePreviewInput/invalid/empty-identities.json +10 -0
- package/fixtures/openapi/TemplateUpdatePreviewInput/invalid/empty-targets.json +6 -0
- package/fixtures/openapi/TemplateUpdatePreviewInput/valid/cross-version-manual.json +14 -0
- package/gen/go/sohaapi/client.go +1 -1
- package/gen/go/sohaapi/client_test.go +2 -2
- package/gen/go/sohaapi/import_source_compat_test.go +12 -0
- package/gen/go/sohaapi/kubernetes_monitoring_test.go +67 -0
- package/gen/go/sohaapi/types.go +2210 -387
- package/gen/ts/sohaapi/index.ts +1862 -5
- package/go.mod +2 -2
- package/helmrelease/delivery.go +4 -1
- package/helmrelease/initialization.go +10 -0
- package/helmrelease/runtime/delivery.go +40 -10
- package/helmrelease/runtime/delivery_test.go +4 -0
- package/helmrelease/runtime/initialization.go +186 -0
- package/helmrelease/runtime/initialization_test.go +203 -0
- package/openapi/soha-api.json +5514 -1179
- package/openapi/soha-api.yaml +1080 -11
- package/openapi/spec_generated.go +3 -3
- package/openapi/spec_test.go +76 -0
- package/package.json +1 -1
- package/resource/agent_access.go +12 -0
- package/resource/agent_profiles.go +62 -0
- package/resource/agent_profiles_test.go +36 -0
- package/resource/kubernetes_kinds.go +73 -0
- package/resource/kubernetes_kinds_test.go +38 -0
- package/resource/models.go +25 -14
- package/resource/network_topology.go +166 -0
- package/resource/network_topology_projection.go +208 -0
- package/resource/network_topology_projection_test.go +53 -0
- package/resource/network_topology_test.go +51 -0
- package/resource/network_topology_validation.go +29 -0
- package/resource/node_drain.go +34 -0
- package/resource/relations.go +225 -0
- package/resource/relations_test.go +47 -0
- package/resource/resource_monitoring.go +99 -0
- package/resource/root_cr.go +38 -0
- package/resource/runtime/argocd_integration_test.go +1 -1
- package/resource/runtime/initialization.go +66 -0
- package/resource/runtime/initialization_test.go +80 -0
- package/resource/runtime/network_topology.go +232 -0
- package/resource/runtime/network_topology_test.go +62 -0
- package/resource/runtime/node_drain.go +124 -0
- package/resource/runtime/node_drain_test.go +95 -0
- package/resource/runtime/relations.go +161 -0
- package/resource/runtime/relations_test.go +100 -0
- package/resource/runtime/resource_edit.go +128 -0
- package/resource/runtime/resource_edit_test.go +183 -0
- package/resource/runtime/resource_monitoring.go +243 -0
- package/resource/runtime/resource_monitoring_test.go +88 -0
- package/resource/runtime/root_cr.go +79 -0
- package/resource/runtime/root_cr_test.go +118 -0
|
@@ -177,6 +177,9 @@
|
|
|
177
177
|
"default": true,
|
|
178
178
|
"type": "boolean"
|
|
179
179
|
},
|
|
180
|
+
"migrationPolicy": {
|
|
181
|
+
"$ref": "#/$defs/TemplateMigrationPolicy"
|
|
182
|
+
},
|
|
180
183
|
"variableSchema": {
|
|
181
184
|
"additionalProperties": {
|
|
182
185
|
"$ref": "#/$defs/DeliveryBuildVariableSchema"
|
|
@@ -317,6 +320,9 @@
|
|
|
317
320
|
"health": {
|
|
318
321
|
"$ref": "#/$defs/DeploymentTemplateHealth"
|
|
319
322
|
},
|
|
323
|
+
"migrationPolicy": {
|
|
324
|
+
"$ref": "#/$defs/TemplateMigrationPolicy"
|
|
325
|
+
},
|
|
320
326
|
"parameterSchema": {
|
|
321
327
|
"$ref": "#/$defs/TemplateParameterSchema"
|
|
322
328
|
},
|
|
@@ -804,21 +810,68 @@
|
|
|
804
810
|
"additionalProperties": false,
|
|
805
811
|
"allOf": [
|
|
806
812
|
{
|
|
807
|
-
"
|
|
813
|
+
"else": {
|
|
814
|
+
"allOf": [
|
|
815
|
+
{
|
|
816
|
+
"if": {
|
|
817
|
+
"properties": {
|
|
818
|
+
"action": {
|
|
819
|
+
"enum": [
|
|
820
|
+
"build_deploy",
|
|
821
|
+
"deploy",
|
|
822
|
+
"config_update"
|
|
823
|
+
]
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
"then": {
|
|
828
|
+
"required": [
|
|
829
|
+
"applicationEnvironmentId"
|
|
830
|
+
]
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
],
|
|
808
834
|
"properties": {
|
|
809
|
-
"
|
|
810
|
-
"
|
|
811
|
-
|
|
812
|
-
"deploy",
|
|
813
|
-
"config_update"
|
|
814
|
-
]
|
|
835
|
+
"serviceId": {
|
|
836
|
+
"minLength": 1,
|
|
837
|
+
"type": "string"
|
|
815
838
|
}
|
|
816
839
|
}
|
|
817
840
|
},
|
|
818
|
-
"
|
|
841
|
+
"if": {
|
|
819
842
|
"required": [
|
|
820
|
-
"
|
|
843
|
+
"templateCandidateId"
|
|
821
844
|
]
|
|
845
|
+
},
|
|
846
|
+
"then": {
|
|
847
|
+
"not": {
|
|
848
|
+
"anyOf": [
|
|
849
|
+
{
|
|
850
|
+
"required": [
|
|
851
|
+
"helmRevision"
|
|
852
|
+
]
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
"required": [
|
|
856
|
+
"buildArgs"
|
|
857
|
+
]
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
"required": [
|
|
861
|
+
"repositoryRefs"
|
|
862
|
+
]
|
|
863
|
+
}
|
|
864
|
+
]
|
|
865
|
+
},
|
|
866
|
+
"properties": {
|
|
867
|
+
"action": {
|
|
868
|
+
"const": "config_update"
|
|
869
|
+
},
|
|
870
|
+
"releaseBundleId": {
|
|
871
|
+
"maxLength": 0,
|
|
872
|
+
"type": "string"
|
|
873
|
+
}
|
|
874
|
+
}
|
|
822
875
|
}
|
|
823
876
|
},
|
|
824
877
|
{
|
|
@@ -897,6 +950,10 @@
|
|
|
897
950
|
"type": "array"
|
|
898
951
|
},
|
|
899
952
|
"serviceId": {
|
|
953
|
+
"type": "string"
|
|
954
|
+
},
|
|
955
|
+
"templateCandidateId": {
|
|
956
|
+
"maxLength": 256,
|
|
900
957
|
"minLength": 1,
|
|
901
958
|
"type": "string"
|
|
902
959
|
}
|
|
@@ -1068,6 +1125,9 @@
|
|
|
1068
1125
|
"enabled": {
|
|
1069
1126
|
"default": true,
|
|
1070
1127
|
"type": "boolean"
|
|
1128
|
+
},
|
|
1129
|
+
"migrationPolicy": {
|
|
1130
|
+
"$ref": "#/$defs/TemplateMigrationPolicy"
|
|
1071
1131
|
}
|
|
1072
1132
|
},
|
|
1073
1133
|
"required": [
|
|
@@ -1376,6 +1436,64 @@
|
|
|
1376
1436
|
},
|
|
1377
1437
|
"type": "object"
|
|
1378
1438
|
},
|
|
1439
|
+
"TemplateMigrationPolicy": {
|
|
1440
|
+
"additionalProperties": false,
|
|
1441
|
+
"if": {
|
|
1442
|
+
"anyOf": [
|
|
1443
|
+
{
|
|
1444
|
+
"properties": {
|
|
1445
|
+
"sequential": {
|
|
1446
|
+
"const": true
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
"required": [
|
|
1450
|
+
"sequential"
|
|
1451
|
+
]
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
"properties": {
|
|
1455
|
+
"irreversible": {
|
|
1456
|
+
"const": true
|
|
1457
|
+
}
|
|
1458
|
+
},
|
|
1459
|
+
"required": [
|
|
1460
|
+
"irreversible"
|
|
1461
|
+
]
|
|
1462
|
+
}
|
|
1463
|
+
]
|
|
1464
|
+
},
|
|
1465
|
+
"properties": {
|
|
1466
|
+
"guide": {
|
|
1467
|
+
"description": "Human migration/recovery instructions. Never executed as a script.",
|
|
1468
|
+
"maxLength": 2000,
|
|
1469
|
+
"type": "string"
|
|
1470
|
+
},
|
|
1471
|
+
"irreversible": {
|
|
1472
|
+
"description": "Forward changes require approval; ordinary rollback across this boundary is forbidden.",
|
|
1473
|
+
"type": "boolean"
|
|
1474
|
+
},
|
|
1475
|
+
"sequential": {
|
|
1476
|
+
"description": "Must cross this boundary as adjacent published versions; approval cannot waive it.",
|
|
1477
|
+
"type": "boolean"
|
|
1478
|
+
}
|
|
1479
|
+
},
|
|
1480
|
+
"required": [
|
|
1481
|
+
"sequential",
|
|
1482
|
+
"irreversible"
|
|
1483
|
+
],
|
|
1484
|
+
"then": {
|
|
1485
|
+
"properties": {
|
|
1486
|
+
"guide": {
|
|
1487
|
+
"minLength": 1,
|
|
1488
|
+
"pattern": "\\S"
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
"required": [
|
|
1492
|
+
"guide"
|
|
1493
|
+
]
|
|
1494
|
+
},
|
|
1495
|
+
"type": "object"
|
|
1496
|
+
},
|
|
1379
1497
|
"TemplateParameterSchema": {
|
|
1380
1498
|
"additionalProperties": false,
|
|
1381
1499
|
"description": "Restricted JSON Schema. Objects reject undeclared keys unless mapValues specifies their schema. secret_reference accepts only a namespaced Secret name/key reference, never a plaintext credential. External references and executable expressions are unsupported.",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
package examples
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
sdk "github.com/opensoha/soha-contracts/gen/go/sohaapi"
|
|
5
|
+
"testing"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
func TestRelationAdditionPreservesPublishedEnumNames(t *testing.T) {
|
|
9
|
+
values := []sdk.PersonalGuestRuntimeInputKind{sdk.Browser, sdk.Docker, sdk.Execute, sdk.FileRead, sdk.FileWrite}
|
|
10
|
+
for i, want := range []string{"browser", "docker", "execute", "file_read", "file_write"} {
|
|
11
|
+
if string(values[i]) != want {
|
|
12
|
+
t.Fatalf("published enum %d changed", i)
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
if sdk.JSON != sdk.ExportDeliveryDocumentParamsFormatJSON || sdk.Yaml != sdk.ExportDeliveryDocumentParamsFormatYaml {
|
|
16
|
+
t.Fatal("published format aliases changed")
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "delivery.soha.io/v1alpha1",
|
|
3
|
+
"kind": "BuildTemplate",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"name": "node-image"
|
|
6
|
+
},
|
|
7
|
+
"spec": {
|
|
8
|
+
"buildCommands": [
|
|
9
|
+
"npm ci",
|
|
10
|
+
"npm run build"
|
|
11
|
+
],
|
|
12
|
+
"variableSchema": {
|
|
13
|
+
"MODE": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"required": true,
|
|
16
|
+
"enum": [
|
|
17
|
+
"production",
|
|
18
|
+
"development"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"defaultVariables": {
|
|
23
|
+
"MODE": "production"
|
|
24
|
+
},
|
|
25
|
+
"migrationPolicy": {
|
|
26
|
+
"sequential": true,
|
|
27
|
+
"irreversible": false
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
package/fixtures/openapi/DeliveryDocument/invalid/migration-missing-guide-deployment-template.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "delivery.soha.io/v1alpha1",
|
|
3
|
+
"kind": "DeploymentTemplate",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"name": "http-service"
|
|
6
|
+
},
|
|
7
|
+
"spec": {
|
|
8
|
+
"source": {
|
|
9
|
+
"renderer": "raw_yaml",
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "config.yaml",
|
|
13
|
+
"content": "apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: example\ndata:\n mode: prod\n"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"parameterSchema": {
|
|
18
|
+
"type": "object"
|
|
19
|
+
},
|
|
20
|
+
"defaults": {},
|
|
21
|
+
"health": {
|
|
22
|
+
"mode": "configuration_only",
|
|
23
|
+
"timeoutSeconds": 60
|
|
24
|
+
},
|
|
25
|
+
"migrationPolicy": {
|
|
26
|
+
"sequential": true,
|
|
27
|
+
"irreversible": false
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
package/fixtures/openapi/DeliveryDocument/invalid/migration-missing-guide-workflow-template.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "delivery.soha.io/v1alpha1",
|
|
3
|
+
"kind": "WorkflowTemplate",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"name": "build-release",
|
|
6
|
+
"displayName": "\u8054\u5408\u6784\u5efa\u53d1\u5e03"
|
|
7
|
+
},
|
|
8
|
+
"spec": {
|
|
9
|
+
"definition": {
|
|
10
|
+
"mode": "delivery_batch",
|
|
11
|
+
"schemaVersion": 1,
|
|
12
|
+
"stages": [
|
|
13
|
+
"build",
|
|
14
|
+
"plan",
|
|
15
|
+
"deploy",
|
|
16
|
+
"health"
|
|
17
|
+
],
|
|
18
|
+
"executionMode": "build_all_then_deploy",
|
|
19
|
+
"stopOnFailure": true,
|
|
20
|
+
"maxConcurrency": 4
|
|
21
|
+
},
|
|
22
|
+
"migrationPolicy": {
|
|
23
|
+
"sequential": true,
|
|
24
|
+
"irreversible": false
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "delivery.soha.io/v1alpha1",
|
|
3
|
+
"kind": "BuildTemplate",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"name": "node-image"
|
|
6
|
+
},
|
|
7
|
+
"spec": {
|
|
8
|
+
"buildCommands": [
|
|
9
|
+
"npm ci",
|
|
10
|
+
"npm run build"
|
|
11
|
+
],
|
|
12
|
+
"variableSchema": {
|
|
13
|
+
"MODE": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"required": true,
|
|
16
|
+
"enum": [
|
|
17
|
+
"production",
|
|
18
|
+
"development"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"defaultVariables": {
|
|
23
|
+
"MODE": "production"
|
|
24
|
+
},
|
|
25
|
+
"migrationPolicy": {
|
|
26
|
+
"sequential": true,
|
|
27
|
+
"irreversible": true,
|
|
28
|
+
"guide": "Backup, migrate in order, verify; forward repair only."
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "delivery.soha.io/v1alpha1",
|
|
3
|
+
"kind": "DeploymentTemplate",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"name": "http-service"
|
|
6
|
+
},
|
|
7
|
+
"spec": {
|
|
8
|
+
"source": {
|
|
9
|
+
"renderer": "raw_yaml",
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "config.yaml",
|
|
13
|
+
"content": "apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: example\ndata:\n mode: prod\n"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"parameterSchema": {
|
|
18
|
+
"type": "object"
|
|
19
|
+
},
|
|
20
|
+
"defaults": {},
|
|
21
|
+
"health": {
|
|
22
|
+
"mode": "configuration_only",
|
|
23
|
+
"timeoutSeconds": 60
|
|
24
|
+
},
|
|
25
|
+
"migrationPolicy": {
|
|
26
|
+
"sequential": true,
|
|
27
|
+
"irreversible": true,
|
|
28
|
+
"guide": "Backup, migrate in order, verify; forward repair only."
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "delivery.soha.io/v1alpha1",
|
|
3
|
+
"kind": "WorkflowTemplate",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"name": "build-release",
|
|
6
|
+
"displayName": "\u8054\u5408\u6784\u5efa\u53d1\u5e03"
|
|
7
|
+
},
|
|
8
|
+
"spec": {
|
|
9
|
+
"definition": {
|
|
10
|
+
"mode": "delivery_batch",
|
|
11
|
+
"schemaVersion": 1,
|
|
12
|
+
"stages": [
|
|
13
|
+
"build",
|
|
14
|
+
"plan",
|
|
15
|
+
"deploy",
|
|
16
|
+
"health"
|
|
17
|
+
],
|
|
18
|
+
"executionMode": "build_all_then_deploy",
|
|
19
|
+
"stopOnFailure": true,
|
|
20
|
+
"maxConcurrency": 4
|
|
21
|
+
},
|
|
22
|
+
"migrationPolicy": {
|
|
23
|
+
"sequential": true,
|
|
24
|
+
"irreversible": true,
|
|
25
|
+
"guide": "Backup, migrate in order, verify; forward repair only."
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"adopt-build","applicationId":"retail","serviceId":"","action":"config_update","templateCandidateId":"candidate-1"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"*"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"workbench"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"items": [
|
|
3
|
+
{
|
|
4
|
+
"clusterId": "test",
|
|
5
|
+
"namespace": "middleware",
|
|
6
|
+
"workloadKind": "StatefulSet",
|
|
7
|
+
"workloadName": "database",
|
|
8
|
+
"desiredReplicas": 3,
|
|
9
|
+
"readyReplicas": 3,
|
|
10
|
+
"relatedResources": [],
|
|
11
|
+
"source": {
|
|
12
|
+
"resource": {
|
|
13
|
+
"clusterId": "test",
|
|
14
|
+
"apiVersion": "apps/v1",
|
|
15
|
+
"kind": "StatefulSet",
|
|
16
|
+
"namespace": "middleware",
|
|
17
|
+
"name": "database",
|
|
18
|
+
"scopeMode": "namespace",
|
|
19
|
+
"uid": "uid-1",
|
|
20
|
+
"resourceVersion": "42"
|
|
21
|
+
},
|
|
22
|
+
"specDigest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
23
|
+
"generation": 3,
|
|
24
|
+
"observedAt": "2026-10-21T08:00:00Z",
|
|
25
|
+
"owners": [],
|
|
26
|
+
"spec": {
|
|
27
|
+
"password": "must-not-be-in-contract"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"truncated": false
|
|
33
|
+
}
|
package/fixtures/openapi/KubernetesImportCandidateListEnvelope/invalid/source-without-uid.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"items": [
|
|
3
|
+
{
|
|
4
|
+
"clusterId": "test",
|
|
5
|
+
"namespace": "middleware",
|
|
6
|
+
"workloadKind": "StatefulSet",
|
|
7
|
+
"workloadName": "database",
|
|
8
|
+
"desiredReplicas": 3,
|
|
9
|
+
"readyReplicas": 3,
|
|
10
|
+
"relatedResources": [],
|
|
11
|
+
"source": {
|
|
12
|
+
"resource": {
|
|
13
|
+
"clusterId": "test",
|
|
14
|
+
"apiVersion": "apps/v1",
|
|
15
|
+
"kind": "StatefulSet",
|
|
16
|
+
"namespace": "middleware",
|
|
17
|
+
"name": "database",
|
|
18
|
+
"scopeMode": "namespace",
|
|
19
|
+
"resourceVersion": "42"
|
|
20
|
+
},
|
|
21
|
+
"specDigest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
22
|
+
"generation": 3,
|
|
23
|
+
"observedAt": "2026-10-21T08:00:00Z",
|
|
24
|
+
"owners": []
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"truncated": false
|
|
29
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"items": [
|
|
3
|
+
{
|
|
4
|
+
"clusterId": "test",
|
|
5
|
+
"namespace": "middleware",
|
|
6
|
+
"workloadKind": "StatefulSet",
|
|
7
|
+
"workloadName": "database",
|
|
8
|
+
"desiredReplicas": 3,
|
|
9
|
+
"readyReplicas": 3,
|
|
10
|
+
"relatedResources": [],
|
|
11
|
+
"source": {
|
|
12
|
+
"resource": {
|
|
13
|
+
"clusterId": "test",
|
|
14
|
+
"apiVersion": "apps/v1",
|
|
15
|
+
"kind": "StatefulSet",
|
|
16
|
+
"namespace": "middleware",
|
|
17
|
+
"name": "database",
|
|
18
|
+
"scopeMode": "namespace",
|
|
19
|
+
"uid": "uid-1",
|
|
20
|
+
"resourceVersion": "42"
|
|
21
|
+
},
|
|
22
|
+
"specDigest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
23
|
+
"generation": 3,
|
|
24
|
+
"observedAt": "2026-10-21T08:00:00Z",
|
|
25
|
+
"owners": []
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"truncated": false
|
|
30
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"items": [
|
|
3
|
+
{
|
|
4
|
+
"name": "worker-a",
|
|
5
|
+
"status": "ready",
|
|
6
|
+
"unschedulable": true,
|
|
7
|
+
"podCount": 2,
|
|
8
|
+
"ageSeconds": 3600,
|
|
9
|
+
"taints": [
|
|
10
|
+
{
|
|
11
|
+
"key": "maintenance",
|
|
12
|
+
"value": "task113",
|
|
13
|
+
"effect": "NoSchedule"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"conditions": [
|
|
17
|
+
{
|
|
18
|
+
"type": "Ready",
|
|
19
|
+
"status": "True"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "DiskPressure",
|
|
23
|
+
"status": "True"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|