@opensoha/contracts 0.1.11 → 0.1.13
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/compat/json-schema-ecosystem-0.1.0.json +1 -1
- package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
- package/fixtures/openapi/DockerHostAgentCredentialsEnvelope/invalid/missing-runtime-token.json +9 -0
- package/fixtures/openapi/DockerHostAgentCredentialsEnvelope/valid/credentials.json +10 -0
- package/fixtures/openapi/DockerHostAgentEnrollmentRequest/invalid/short-token.json +4 -0
- package/fixtures/openapi/DockerHostAgentEnrollmentRequest/valid/enrollment.json +4 -0
- package/fixtures/openapi/KubernetesWorkloadSnapshotEnvelope/invalid/missing-content.json +8 -0
- package/fixtures/openapi/KubernetesWorkloadSnapshotEnvelope/valid/job.json +14 -0
- package/fixtures/openapi/KubernetesWorkloadSnapshotRequest/invalid/cronjob-missing-schedule.json +8 -0
- package/fixtures/openapi/KubernetesWorkloadSnapshotRequest/invalid/workload-cronjob-missing-schedule.json +8 -0
- package/fixtures/openapi/KubernetesWorkloadSnapshotRequest/valid/cronjob.json +9 -0
- package/fixtures/openapi/KubernetesWorkloadSnapshotRequest/valid/job-zero-values.json +11 -0
- package/fixtures/openapi/KubernetesWorkloadSnapshotRequest/valid/workload-cronjob.json +9 -0
- package/gen/go/sohaapi/client.go +10 -1
- package/gen/go/sohaapi/client_test.go +29 -0
- package/gen/go/sohaapi/types.go +156 -0
- package/gen/go/sohaapi/types_test.go +17 -0
- package/gen/ts/sohaapi/index.ts +182 -0
- package/openapi/soha-api.json +413 -2
- package/openapi/soha-api.yaml +245 -2
- package/openapi/spec_generated.go +3 -3
- package/package.json +1 -1
package/openapi/soha-api.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
openapi: 3.1.0
|
|
2
2
|
info:
|
|
3
3
|
title: Soha API
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.13
|
|
5
5
|
description: >
|
|
6
6
|
Public OpenSoha core API contract. This first contract focuses on stable
|
|
7
7
|
cross-repository boundaries: auth, health, runner-facing control-plane
|
|
@@ -3295,6 +3295,38 @@ paths:
|
|
|
3295
3295
|
$ref: "#/components/responses/Error"
|
|
3296
3296
|
"410":
|
|
3297
3297
|
$ref: "#/components/responses/Error"
|
|
3298
|
+
/docker/agent-installations/{operationID}/enroll:
|
|
3299
|
+
post:
|
|
3300
|
+
tags: [Runner]
|
|
3301
|
+
operationId: exchangeDockerHostAgentEnrollment
|
|
3302
|
+
security: []
|
|
3303
|
+
parameters:
|
|
3304
|
+
- $ref: "#/components/parameters/OperationID"
|
|
3305
|
+
requestBody:
|
|
3306
|
+
required: true
|
|
3307
|
+
content:
|
|
3308
|
+
application/json:
|
|
3309
|
+
schema:
|
|
3310
|
+
$ref: "#/components/schemas/DockerHostAgentEnrollmentRequest"
|
|
3311
|
+
responses:
|
|
3312
|
+
"201":
|
|
3313
|
+
description: One-time host-bound Agent and control-plane credentials. The enrollment token is atomically consumed by a successful response.
|
|
3314
|
+
headers:
|
|
3315
|
+
Cache-Control:
|
|
3316
|
+
description: Prevents credential responses from being cached.
|
|
3317
|
+
schema: { type: string, const: no-store }
|
|
3318
|
+
content:
|
|
3319
|
+
application/json:
|
|
3320
|
+
schema:
|
|
3321
|
+
$ref: "#/components/schemas/DockerHostAgentCredentialsEnvelope"
|
|
3322
|
+
"400":
|
|
3323
|
+
$ref: "#/components/responses/Error"
|
|
3324
|
+
"404":
|
|
3325
|
+
$ref: "#/components/responses/Error"
|
|
3326
|
+
"409":
|
|
3327
|
+
$ref: "#/components/responses/Error"
|
|
3328
|
+
"410":
|
|
3329
|
+
$ref: "#/components/responses/Error"
|
|
3298
3330
|
/docker/hosts/quick-create/plan:
|
|
3299
3331
|
post:
|
|
3300
3332
|
tags: [Docker]
|
|
@@ -6272,6 +6304,35 @@ paths:
|
|
|
6272
6304
|
$ref: "#/components/responses/Error"
|
|
6273
6305
|
"404":
|
|
6274
6306
|
$ref: "#/components/responses/Error"
|
|
6307
|
+
/clusters/{clusterID}/resource-creation/workload-snapshot:
|
|
6308
|
+
post:
|
|
6309
|
+
tags: [Platform]
|
|
6310
|
+
operationId: generateKubernetesWorkloadSnapshot
|
|
6311
|
+
x-soha-capability:
|
|
6312
|
+
name: k8s.workloads.snapshot.generate
|
|
6313
|
+
riskLevel: analyze
|
|
6314
|
+
requiresApproval: false
|
|
6315
|
+
parameters:
|
|
6316
|
+
- $ref: "#/components/parameters/ClusterID"
|
|
6317
|
+
requestBody:
|
|
6318
|
+
required: true
|
|
6319
|
+
content:
|
|
6320
|
+
application/json:
|
|
6321
|
+
schema:
|
|
6322
|
+
$ref: "#/components/schemas/KubernetesWorkloadSnapshotRequest"
|
|
6323
|
+
responses:
|
|
6324
|
+
"200":
|
|
6325
|
+
description: A native Job or CronJob manifest, or a workloads.soha.io/v1alpha1 WorkloadCronJob manifest, generated from a same-namespace workload Pod template. This operation does not create resources.
|
|
6326
|
+
content:
|
|
6327
|
+
application/json:
|
|
6328
|
+
schema:
|
|
6329
|
+
$ref: "#/components/schemas/KubernetesWorkloadSnapshotEnvelope"
|
|
6330
|
+
"400":
|
|
6331
|
+
$ref: "#/components/responses/Error"
|
|
6332
|
+
"403":
|
|
6333
|
+
$ref: "#/components/responses/Error"
|
|
6334
|
+
"404":
|
|
6335
|
+
$ref: "#/components/responses/Error"
|
|
6275
6336
|
/clusters/{clusterID}/resource-creation/preflight:
|
|
6276
6337
|
post:
|
|
6277
6338
|
tags: [Platform]
|
|
@@ -11944,7 +12005,7 @@ components:
|
|
|
11944
12005
|
runtimeBearerAuth:
|
|
11945
12006
|
type: http
|
|
11946
12007
|
scheme: bearer
|
|
11947
|
-
description: Runtime execution runner token.
|
|
12008
|
+
description: Runtime execution runner token, including host-bound Docker Agent credentials.
|
|
11948
12009
|
agentBearerAuth:
|
|
11949
12010
|
type: http
|
|
11950
12011
|
scheme: bearer
|
|
@@ -25915,6 +25976,58 @@ components:
|
|
|
25915
25976
|
data:
|
|
25916
25977
|
$ref: "#/components/schemas/DockerHostAgentInstallation"
|
|
25917
25978
|
additionalProperties: false
|
|
25979
|
+
DockerHostAgentEnrollmentRequest:
|
|
25980
|
+
type: object
|
|
25981
|
+
required: [agentId, enrollmentToken]
|
|
25982
|
+
properties:
|
|
25983
|
+
agentId:
|
|
25984
|
+
type: string
|
|
25985
|
+
minLength: 1
|
|
25986
|
+
maxLength: 200
|
|
25987
|
+
enrollmentToken:
|
|
25988
|
+
type: string
|
|
25989
|
+
minLength: 32
|
|
25990
|
+
maxLength: 512
|
|
25991
|
+
format: password
|
|
25992
|
+
description: Short-lived one-time secret delivered only inside the installer.
|
|
25993
|
+
additionalProperties: false
|
|
25994
|
+
DockerHostAgentCredentials:
|
|
25995
|
+
type: object
|
|
25996
|
+
required: [hostId, operationId, agentId, agentBearerToken, runtimeBearerToken, issuedAt]
|
|
25997
|
+
properties:
|
|
25998
|
+
hostId:
|
|
25999
|
+
type: string
|
|
26000
|
+
minLength: 1
|
|
26001
|
+
operationId:
|
|
26002
|
+
type: string
|
|
26003
|
+
minLength: 1
|
|
26004
|
+
agentId:
|
|
26005
|
+
type: string
|
|
26006
|
+
minLength: 1
|
|
26007
|
+
maxLength: 200
|
|
26008
|
+
agentBearerToken:
|
|
26009
|
+
type: string
|
|
26010
|
+
minLength: 32
|
|
26011
|
+
maxLength: 512
|
|
26012
|
+
format: password
|
|
26013
|
+
description: Credential for the Agent's local HTTP API, returned only by the successful enrollment response.
|
|
26014
|
+
runtimeBearerToken:
|
|
26015
|
+
type: string
|
|
26016
|
+
minLength: 32
|
|
26017
|
+
maxLength: 512
|
|
26018
|
+
format: password
|
|
26019
|
+
description: Revocable credential restricted to Docker operations for this host.
|
|
26020
|
+
issuedAt:
|
|
26021
|
+
type: string
|
|
26022
|
+
format: date-time
|
|
26023
|
+
additionalProperties: false
|
|
26024
|
+
DockerHostAgentCredentialsEnvelope:
|
|
26025
|
+
type: object
|
|
26026
|
+
required: [data]
|
|
26027
|
+
properties:
|
|
26028
|
+
data:
|
|
26029
|
+
$ref: "#/components/schemas/DockerHostAgentCredentials"
|
|
26030
|
+
additionalProperties: false
|
|
25918
26031
|
ObservabilityProviderSignal:
|
|
25919
26032
|
type: string
|
|
25920
26033
|
enum: [logs, metrics, traces, profiles]
|
|
@@ -27643,6 +27756,136 @@ components:
|
|
|
27643
27756
|
required: [type]
|
|
27644
27757
|
then:
|
|
27645
27758
|
required: [status]
|
|
27759
|
+
KubernetesWorkloadSnapshotSourceKind:
|
|
27760
|
+
type: string
|
|
27761
|
+
enum: [Deployment, StatefulSet, DaemonSet]
|
|
27762
|
+
x-enum-varnames:
|
|
27763
|
+
- KubernetesWorkloadSnapshotSourceKindDeployment
|
|
27764
|
+
- KubernetesWorkloadSnapshotSourceKindStatefulSet
|
|
27765
|
+
- KubernetesWorkloadSnapshotSourceKindDaemonSet
|
|
27766
|
+
KubernetesWorkloadSnapshotTargetKind:
|
|
27767
|
+
type: string
|
|
27768
|
+
enum: [Job, CronJob, WorkloadCronJob]
|
|
27769
|
+
x-enum-varnames:
|
|
27770
|
+
- KubernetesWorkloadSnapshotTargetKindJob
|
|
27771
|
+
- KubernetesWorkloadSnapshotTargetKindCronJob
|
|
27772
|
+
- KubernetesWorkloadSnapshotTargetKindWorkloadCronJob
|
|
27773
|
+
KubernetesWorkloadSnapshotRestartPolicy:
|
|
27774
|
+
type: string
|
|
27775
|
+
enum: [Never, OnFailure]
|
|
27776
|
+
x-enum-varnames:
|
|
27777
|
+
- KubernetesWorkloadSnapshotRestartPolicyNever
|
|
27778
|
+
- KubernetesWorkloadSnapshotRestartPolicyOnFailure
|
|
27779
|
+
KubernetesWorkloadSnapshotRequest:
|
|
27780
|
+
type: object
|
|
27781
|
+
required: [namespace, sourceKind, sourceName, targetKind, targetName, restartPolicy]
|
|
27782
|
+
properties:
|
|
27783
|
+
namespace:
|
|
27784
|
+
type: string
|
|
27785
|
+
minLength: 1
|
|
27786
|
+
description: Namespace shared by the source workload and generated target because referenced Secrets, ConfigMaps, ServiceAccounts, and PVCs are namespace-scoped.
|
|
27787
|
+
sourceKind:
|
|
27788
|
+
$ref: "#/components/schemas/KubernetesWorkloadSnapshotSourceKind"
|
|
27789
|
+
sourceName:
|
|
27790
|
+
type: string
|
|
27791
|
+
minLength: 1
|
|
27792
|
+
sourceContainer:
|
|
27793
|
+
type: string
|
|
27794
|
+
minLength: 1
|
|
27795
|
+
description: Regular container to retain. When omitted, the first regular container is selected.
|
|
27796
|
+
targetKind:
|
|
27797
|
+
$ref: "#/components/schemas/KubernetesWorkloadSnapshotTargetKind"
|
|
27798
|
+
targetName:
|
|
27799
|
+
type: string
|
|
27800
|
+
minLength: 1
|
|
27801
|
+
description:
|
|
27802
|
+
type: string
|
|
27803
|
+
maxLength: 512
|
|
27804
|
+
labels:
|
|
27805
|
+
type: object
|
|
27806
|
+
maxProperties: 64
|
|
27807
|
+
additionalProperties: { type: string }
|
|
27808
|
+
annotations:
|
|
27809
|
+
type: object
|
|
27810
|
+
maxProperties: 64
|
|
27811
|
+
additionalProperties: { type: string }
|
|
27812
|
+
command:
|
|
27813
|
+
type: array
|
|
27814
|
+
maxItems: 128
|
|
27815
|
+
items: { type: string, maxLength: 4096 }
|
|
27816
|
+
args:
|
|
27817
|
+
type: array
|
|
27818
|
+
maxItems: 128
|
|
27819
|
+
items: { type: string, maxLength: 4096 }
|
|
27820
|
+
restartPolicy:
|
|
27821
|
+
$ref: "#/components/schemas/KubernetesWorkloadSnapshotRestartPolicy"
|
|
27822
|
+
parallelism:
|
|
27823
|
+
type: integer
|
|
27824
|
+
minimum: 0
|
|
27825
|
+
description: Zero leaves the Kubernetes default unchanged.
|
|
27826
|
+
completions:
|
|
27827
|
+
type: integer
|
|
27828
|
+
minimum: 0
|
|
27829
|
+
description: Zero leaves the Kubernetes default unchanged.
|
|
27830
|
+
backoffLimit:
|
|
27831
|
+
type: integer
|
|
27832
|
+
minimum: 0
|
|
27833
|
+
activeDeadlineSeconds:
|
|
27834
|
+
type: integer
|
|
27835
|
+
minimum: 0
|
|
27836
|
+
description: Zero leaves the Kubernetes default unchanged.
|
|
27837
|
+
schedule:
|
|
27838
|
+
type: string
|
|
27839
|
+
minLength: 1
|
|
27840
|
+
description: Required when targetKind is CronJob or WorkloadCronJob.
|
|
27841
|
+
suspend:
|
|
27842
|
+
type: boolean
|
|
27843
|
+
additionalProperties: false
|
|
27844
|
+
if:
|
|
27845
|
+
properties:
|
|
27846
|
+
targetKind:
|
|
27847
|
+
enum: [CronJob, WorkloadCronJob]
|
|
27848
|
+
required: [targetKind]
|
|
27849
|
+
then:
|
|
27850
|
+
required: [schedule]
|
|
27851
|
+
KubernetesWorkloadSnapshotContainer:
|
|
27852
|
+
type: object
|
|
27853
|
+
required: [name, image]
|
|
27854
|
+
properties:
|
|
27855
|
+
name: { type: string, minLength: 1 }
|
|
27856
|
+
image: { type: string }
|
|
27857
|
+
additionalProperties: false
|
|
27858
|
+
KubernetesWorkloadSnapshot:
|
|
27859
|
+
type: object
|
|
27860
|
+
required: [content, sourceUid, selectedContainer, containers, warnings]
|
|
27861
|
+
properties:
|
|
27862
|
+
content:
|
|
27863
|
+
type: string
|
|
27864
|
+
minLength: 1
|
|
27865
|
+
maxLength: 1048576
|
|
27866
|
+
description: Generated native batch/v1 Job or CronJob YAML, or workloads.soha.io/v1alpha1 WorkloadCronJob YAML whose selected container image follows the source workload, ready for the existing resource-creation preflight.
|
|
27867
|
+
sourceUid:
|
|
27868
|
+
type: string
|
|
27869
|
+
minLength: 1
|
|
27870
|
+
selectedContainer:
|
|
27871
|
+
type: string
|
|
27872
|
+
minLength: 1
|
|
27873
|
+
containers:
|
|
27874
|
+
type: array
|
|
27875
|
+
minItems: 1
|
|
27876
|
+
items:
|
|
27877
|
+
$ref: "#/components/schemas/KubernetesWorkloadSnapshotContainer"
|
|
27878
|
+
warnings:
|
|
27879
|
+
type: array
|
|
27880
|
+
items: { type: string }
|
|
27881
|
+
additionalProperties: false
|
|
27882
|
+
KubernetesWorkloadSnapshotEnvelope:
|
|
27883
|
+
type: object
|
|
27884
|
+
required: [data]
|
|
27885
|
+
properties:
|
|
27886
|
+
data:
|
|
27887
|
+
$ref: "#/components/schemas/KubernetesWorkloadSnapshot"
|
|
27888
|
+
additionalProperties: false
|
|
27646
27889
|
KubernetesResourceCreateSource:
|
|
27647
27890
|
type: string
|
|
27648
27891
|
enum: [list, global_yaml, form]
|
|
@@ -5,9 +5,9 @@ package openapi
|
|
|
5
5
|
import _ "embed"
|
|
6
6
|
|
|
7
7
|
const (
|
|
8
|
-
Version = "0.1.
|
|
9
|
-
YAMLSHA256 = "
|
|
10
|
-
JSONSHA256 = "
|
|
8
|
+
Version = "0.1.13"
|
|
9
|
+
YAMLSHA256 = "480571290460492a4f422ecf2c2098720989c31a4413c1bf29fc45b1ecaa5c7b"
|
|
10
|
+
JSONSHA256 = "8327233124b473bdfe2a57582eb66ed9c844630bedd0c947eefb707b71f7d3cf"
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
//go:embed soha-api.yaml
|