diff --git a/components/schemas/environments/task/EnvironmentDeploymentDeprecateAction.yml b/components/schemas/environments/task/EnvironmentDeploymentDeprecateAction.yml new file mode 100644 index 00000000..dbe595e2 --- /dev/null +++ b/components/schemas/environments/task/EnvironmentDeploymentDeprecateAction.yml @@ -0,0 +1,32 @@ +title: EnvironmentDeploymentDeprecateAction +type: object +description: | + Deprecates containers in a specific deployment within an environment. + Deprecated deployments will not receive new traffic but existing instances + continue running until explicitly stopped. +required: + - action + - contents +properties: + action: + type: string + enum: + - deployment.deprecate + contents: + type: object + required: + - deployment + properties: + deployment: + description: The selector for which deployment to deprecate. + oneOf: + - type: object + properties: + version: + description: Targets the deployment with this exact version. + $ref: ../../Version.yml + - type: object + properties: + tag: + description: Targets the deployment with this exact tag applied to it. + type: string diff --git a/components/schemas/environments/task/EnvironmentDeploymentReinstateAction.yml b/components/schemas/environments/task/EnvironmentDeploymentReinstateAction.yml new file mode 100644 index 00000000..15a4fd6d --- /dev/null +++ b/components/schemas/environments/task/EnvironmentDeploymentReinstateAction.yml @@ -0,0 +1,32 @@ +title: EnvironmentDeploymentReinstateAction +type: object +description: | + Reinstates containers in a previously deprecated deployment within an + environment, restoring them to active status and allowing them to + receive traffic again. +required: + - action + - contents +properties: + action: + type: string + enum: + - deployment.reinstate + contents: + type: object + required: + - deployment + properties: + deployment: + description: The selector for which deployment to reinstate. + oneOf: + - type: object + properties: + version: + description: Targets the deployment with this exact version. + $ref: ../../Version.yml + - type: object + properties: + tag: + description: Targets the deployment with this exact tag applied to it. + type: string diff --git a/components/schemas/environments/task/EnvironmentDeploymentStartAction.yml b/components/schemas/environments/task/EnvironmentDeploymentStartAction.yml new file mode 100644 index 00000000..2074d3eb --- /dev/null +++ b/components/schemas/environments/task/EnvironmentDeploymentStartAction.yml @@ -0,0 +1,31 @@ +title: EnvironmentDeploymentStartAction +type: object +description: | + Starts a specific deployment within an environment. Requires a deployment + object identifying the tag or version to start. +required: + - action + - contents +properties: + action: + type: string + enum: + - deployment.start + contents: + type: object + required: + - deployment + properties: + deployment: + description: The selector for which deployment to start. + oneOf: + - type: object + properties: + version: + description: Targets the deployment with this exact version. + $ref: ../../Version.yml + - type: object + properties: + tag: + description: Targets the deployment with this exact tag applied to it. + type: string diff --git a/components/schemas/environments/task/EnvironmentDeploymentStopAction.yml b/components/schemas/environments/task/EnvironmentDeploymentStopAction.yml new file mode 100644 index 00000000..89da17d6 --- /dev/null +++ b/components/schemas/environments/task/EnvironmentDeploymentStopAction.yml @@ -0,0 +1,31 @@ +title: EnvironmentDeploymentStopAction +type: object +description: | + Stops a specific deployment within an environment. Requires a deployment + object identifying the tag or version to stop. +required: + - action + - contents +properties: + action: + type: string + enum: + - deployment.stop + contents: + type: object + required: + - deployment + properties: + deployment: + description: The selector for which deployment to stop. + oneOf: + - type: object + properties: + version: + description: Targets the deployment with this exact version. + $ref: ../../Version.yml + - type: object + properties: + tag: + description: Targets the deployment with this exact tag applied to it. + type: string diff --git a/components/schemas/environments/task/EnvironmentDeploymentsPruneAction.yml b/components/schemas/environments/task/EnvironmentDeploymentsPruneAction.yml new file mode 100644 index 00000000..1daf7f27 --- /dev/null +++ b/components/schemas/environments/task/EnvironmentDeploymentsPruneAction.yml @@ -0,0 +1,11 @@ +title: EnvironmentDeploymentsPruneAction +type: object +description: | + Remove any containers that are part of a deployment that does NOT have a tag associated with it. +required: + - action +properties: + action: + type: string + enum: + - deployments.prune diff --git a/components/schemas/environments/task/EnvironmentTask.yml b/components/schemas/environments/task/EnvironmentTask.yml index b3619a99..abbce7d7 100644 --- a/components/schemas/environments/task/EnvironmentTask.yml +++ b/components/schemas/environments/task/EnvironmentTask.yml @@ -6,10 +6,20 @@ discriminator: stop: EnvironmentStopAction.yml initialize: EnvironmentInitializeAction.yml deployments.reconfigure: EnvironmentReconfigureDeploymentsAction.yml + deployment.start: EnvironmentDeploymentStartAction.yml + deployment.stop: EnvironmentDeploymentStopAction.yml + deployment.deprecate: EnvironmentDeploymentDeprecateAction.yml + deployment.reinstate: EnvironmentDeploymentReinstateAction.yml + deployments.prune: EnvironmentDeploymentsPruneAction.yml monitoring.reconfigure: EnvironmentReconfigureMonitoringAction.yml oneOf: - $ref: EnvironmentStartAction.yml - $ref: EnvironmentStopAction.yml - $ref: EnvironmentInitializeAction.yml - $ref: EnvironmentReconfigureDeploymentsAction.yml + - $ref: EnvironmentDeploymentStartAction.yml + - $ref: EnvironmentDeploymentStopAction.yml + - $ref: EnvironmentDeploymentDeprecateAction.yml + - $ref: EnvironmentDeploymentReinstateAction.yml + - $ref: EnvironmentDeploymentsPruneAction.yml - $ref: EnvironmentReconfigureMonitoringAction.yml diff --git a/components/schemas/hubs/activity/Activity.yml b/components/schemas/hubs/activity/Activity.yml index a21ec6e0..9b36d742 100644 --- a/components/schemas/hubs/activity/Activity.yml +++ b/components/schemas/hubs/activity/Activity.yml @@ -148,6 +148,8 @@ properties: - environment.deployments.prune - environment.deployment.start - environment.deployment.stop + - environment.deployment.deprecate + - environment.deployment.reinstate - environment.scoped-variable.delete - environment.scoped-variable.update diff --git a/components/schemas/pipelines/PipelineSteps.yml b/components/schemas/pipelines/PipelineSteps.yml index ab92e369..92dfe1cc 100644 --- a/components/schemas/pipelines/PipelineSteps.yml +++ b/components/schemas/pipelines/PipelineSteps.yml @@ -26,6 +26,8 @@ discriminator: environment.deployments.tag: steps/EnvironmentDeploymentsTagStep.yml environment.deployments.prune: steps/EnvironmentDeploymentsPruneStep.yml environment.deployment.healthy.watch: steps/EnvironmentDeploymentHealthyWatchStep.yml + environment.deployment.deprecate: steps/EnvironmentDeploymentDeprecateStep.yml + environment.deployment.reinstate: steps/EnvironmentDeploymentReinstateStep.yml stack.build.create: steps/StackBuildCreateStep.yml stack.build.generate: steps/StackBuildGenerateStep.yml @@ -61,6 +63,8 @@ oneOf: - $ref: steps/EnvironmentDeploymentStopStep.yml - $ref: steps/EnvironmentDeploymentsTagStep.yml - $ref: steps/EnvironmentDeploymentsPruneStep.yml + - $ref: steps/EnvironmentDeploymentDeprecateStep.yml + - $ref: steps/EnvironmentDeploymentReinstateStep.yml - $ref: steps/EnvironmentDeploymentHealthyWatchStep.yml # stack steps diff --git a/components/schemas/pipelines/runs/PipelineRunStep.yml b/components/schemas/pipelines/runs/PipelineRunStep.yml index d3b2b290..adf33f94 100644 --- a/components/schemas/pipelines/runs/PipelineRunStep.yml +++ b/components/schemas/pipelines/runs/PipelineRunStep.yml @@ -20,6 +20,8 @@ properties: - environment.deployment.start - environment.deployment.stop - environment.deployment.healthy.watch + - environment.deployment.deprecate + - environment.deployment.reinstate - image.create - image.import - images.prune diff --git a/components/schemas/pipelines/steps/EnvironmentDeploymentDeprecateStep.yml b/components/schemas/pipelines/steps/EnvironmentDeploymentDeprecateStep.yml new file mode 100644 index 00000000..f0cda0dd --- /dev/null +++ b/components/schemas/pipelines/steps/EnvironmentDeploymentDeprecateStep.yml @@ -0,0 +1,37 @@ +title: EnvironmentDeploymentDeprecateStep +type: object +description: | + Deprecates a tagged deployment within an environment. Deprecated deployments + will not receive new traffic but existing instances continue running until stopped. +required: + - action + - details +properties: + identifier: + type: string + description: An identifier for the step. + options: + type: object + properties: + skip: + type: boolean + action: + type: string + description: The action that the step takes. + enum: + - environment.deployment.deprecate + details: + type: object + required: + - environment + properties: + environment: + $ref: ../FluidIdentifier.yml + tag: + type: + - string + - "null" + version: + type: + - string + - "null" diff --git a/components/schemas/pipelines/steps/EnvironmentDeploymentReinstateStep.yml b/components/schemas/pipelines/steps/EnvironmentDeploymentReinstateStep.yml new file mode 100644 index 00000000..8371d52a --- /dev/null +++ b/components/schemas/pipelines/steps/EnvironmentDeploymentReinstateStep.yml @@ -0,0 +1,37 @@ +title: EnvironmentDeploymentReinstateStep +type: object +description: | + Reinstates a previously deprecated deployment within an environment, + restoring it to active status and allowing it to receive traffic again. +required: + - action + - details +properties: + identifier: + type: string + description: An identifier for the step. + options: + type: object + properties: + skip: + type: boolean + action: + type: string + description: The action that the step takes. + enum: + - environment.deployment.reinstate + details: + type: object + required: + - environment + properties: + environment: + $ref: ../FluidIdentifier.yml + tag: + type: + - string + - "null" + version: + type: + - string + - "null" diff --git a/components/schemas/search/Component.yml b/components/schemas/search/Component.yml index f0a94042..aca941bd 100644 --- a/components/schemas/search/Component.yml +++ b/components/schemas/search/Component.yml @@ -8,6 +8,7 @@ required: - events - context_blobs - associations + - annotations properties: id: description: ID of the component @@ -58,3 +59,8 @@ properties: provider-location: description: Associated provider location Id type: string + annotations: + description: Key-value pairs for additional component metadata + type: object + additionalProperties: + type: string