mirror of
https://github.com/kubevela/kubevela.git
synced 2026-02-14 18:10:21 +00:00
Feat: add category for workflow step definition (#5471)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/apply-application-in-parallel.cue
|
||||
# Definition source cue file: vela-templates/definitions/deprecated/apply-application-in-parallel.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/apply-application.cue
|
||||
# Definition source cue file: vela-templates/definitions/deprecated/apply-application.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Apply application for your workflow steps, it has no arguments, should be used for custom steps before or after application applied.
|
||||
labels:
|
||||
custom.definition.oam.dev/deprecated: "true"
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Apply a specific component and its corresponding traits in application
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/alias: ""
|
||||
definition.oam.dev/description: Apply deployment with specified image and cmd.
|
||||
name: apply-deployment
|
||||
@@ -19,6 +20,7 @@ spec:
|
||||
)
|
||||
|
||||
output: op.#Apply & {
|
||||
cluster: parameter.cluster
|
||||
value: {
|
||||
apiVersion: "apps/v1"
|
||||
kind: "Deployment"
|
||||
@@ -28,6 +30,7 @@ spec:
|
||||
}
|
||||
spec: {
|
||||
selector: matchLabels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
|
||||
replicas: parameter.replicas
|
||||
template: {
|
||||
metadata: labels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
|
||||
spec: containers: [{
|
||||
@@ -42,10 +45,12 @@ spec:
|
||||
}
|
||||
}
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: output.value.status.readyReplicas == 1
|
||||
continue: output.value.status.readyReplicas == parameter.replicas
|
||||
}
|
||||
parameter: {
|
||||
image: string
|
||||
image: string
|
||||
replicas: *1 | int
|
||||
cluster: *"" | string
|
||||
cmd?: [...string]
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,8 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/description: Apply raw kubernetes objects for your workflow steps
|
||||
labels:
|
||||
custom.definition.oam.dev/ui-hidden: "true"
|
||||
name: apply-object
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/apply-remaining.cue
|
||||
# Definition source cue file: vela-templates/definitions/deprecated/apply-remaining.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Apply remaining components and traits
|
||||
labels:
|
||||
custom.definition.oam.dev/deprecated: "true"
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Terraform
|
||||
definition.oam.dev/alias: ""
|
||||
definition.oam.dev/description: Apply terraform configuration in the step
|
||||
name: apply-terraform-config
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Terraform
|
||||
definition.oam.dev/alias: ""
|
||||
definition.oam.dev/description: Apply terraform provider config
|
||||
name: apply-terraform-provider
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: CI Integration
|
||||
definition.oam.dev/alias: ""
|
||||
definition.oam.dev/description: Build and push image from git url
|
||||
name: build-push-image
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/description: clean applied jobs in the cluster
|
||||
name: clean-jobs
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Collect service endpoints for the application.
|
||||
name: collect-service-endpoints
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Config Management
|
||||
definition.oam.dev/description: Create or update a config
|
||||
name: create-config
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Config Management
|
||||
definition.oam.dev/description: Delete a config
|
||||
name: delete-config
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Wait for the specified Application to complete.
|
||||
name: depends-on-app
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Deploy cloud resource and deliver secret to multi clusters.
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: A powerful and unified deploy step for components multi-cluster delivery with policies.
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/deploy2env.cue
|
||||
# Definition source cue file: vela-templates/definitions/deprecated/deploy2env.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/deploy2runtime.cue
|
||||
# Definition source cue file: vela-templates/definitions/deprecated/deploy2runtime.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
|
||||
@@ -4,7 +4,10 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Export data to clusters specified by topology.
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
name: export-data
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
|
||||
@@ -4,7 +4,10 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Export service to clusters specified by topology.
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
name: export-service
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/description: Export data to specified Kubernetes ConfigMap in your workflow.
|
||||
name: export2config
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/description: Export data to Kubernetes Secret in your workflow.
|
||||
name: export2secret
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Terraform
|
||||
definition.oam.dev/description: Generate a JDBC connection based on Component of alibaba-rds
|
||||
name: generate-jdbc-connection
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Config Management
|
||||
definition.oam.dev/description: List the configs
|
||||
name: list-config
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: External Integration
|
||||
definition.oam.dev/description: Send notifications to Email, DingTalk, Slack, Lark or webhook in your workflow.
|
||||
name: notification
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Process Control
|
||||
definition.oam.dev/description: print message in workflow step status
|
||||
name: print-message-in-status
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Config Management
|
||||
definition.oam.dev/description: Read a config
|
||||
name: read-config
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/description: Read Kubernetes objects from cluster for your workflow steps
|
||||
name: read-object
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: External Intergration
|
||||
definition.oam.dev/alias: ""
|
||||
definition.oam.dev/description: Send request to the url
|
||||
name: request
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Sync secrets created by terraform component to runtime clusters so that runtime clusters can share the created cloud resource.
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Process Control
|
||||
definition.oam.dev/description: A special step that you can declare 'subSteps' in it, 'subSteps' is an array containing any step type whose valid parameters do not include the `step-group` step type itself. The sub steps were executed in parallel.
|
||||
name: step-group
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Process Control
|
||||
definition.oam.dev/description: Suspend the current workflow, it can be resumed by 'vela workflow resume' command.
|
||||
name: suspend
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Scripts & Commands
|
||||
definition.oam.dev/description: Run a vela command
|
||||
name: vela-cli
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,7 +4,8 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Send a request to the specified Webhook URL. If no request body is specified, the current Application body will be sent by default.
|
||||
custom.definition.oam.dev/category: External Intergration
|
||||
definition.oam.dev/description: Send a POST request to the specified Webhook URL. If no request body is specified, the current Application body will be sent by default.
|
||||
name: webhook
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Apply a specific component and its corresponding traits in application
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/alias: ""
|
||||
definition.oam.dev/description: Apply deployment with specified image and cmd.
|
||||
name: apply-deployment
|
||||
@@ -19,6 +20,7 @@ spec:
|
||||
)
|
||||
|
||||
output: op.#Apply & {
|
||||
cluster: parameter.cluster
|
||||
value: {
|
||||
apiVersion: "apps/v1"
|
||||
kind: "Deployment"
|
||||
@@ -28,6 +30,7 @@ spec:
|
||||
}
|
||||
spec: {
|
||||
selector: matchLabels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
|
||||
replicas: parameter.replicas
|
||||
template: {
|
||||
metadata: labels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
|
||||
spec: containers: [{
|
||||
@@ -42,10 +45,12 @@ spec:
|
||||
}
|
||||
}
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: output.value.status.readyReplicas == 1
|
||||
continue: output.value.status.readyReplicas == parameter.replicas
|
||||
}
|
||||
parameter: {
|
||||
image: string
|
||||
image: string
|
||||
replicas: *1 | int
|
||||
cluster: *"" | string
|
||||
cmd?: [...string]
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,8 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/description: Apply raw kubernetes objects for your workflow steps
|
||||
labels:
|
||||
custom.definition.oam.dev/ui-hidden: "true"
|
||||
name: apply-object
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Terraform
|
||||
definition.oam.dev/alias: ""
|
||||
definition.oam.dev/description: Apply terraform configuration in the step
|
||||
name: apply-terraform-config
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Terraform
|
||||
definition.oam.dev/alias: ""
|
||||
definition.oam.dev/description: Apply terraform provider config
|
||||
name: apply-terraform-provider
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: CI Integration
|
||||
definition.oam.dev/alias: ""
|
||||
definition.oam.dev/description: Build and push image from git url
|
||||
name: build-push-image
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/description: clean applied jobs in the cluster
|
||||
name: clean-jobs
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Collect service endpoints for the application.
|
||||
name: collect-service-endpoints
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Config Management
|
||||
definition.oam.dev/description: Create or update a config
|
||||
name: create-config
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Config Management
|
||||
definition.oam.dev/description: Delete a config
|
||||
name: delete-config
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Wait for the specified Application to complete.
|
||||
name: depends-on-app
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Deploy cloud resource and deliver secret to multi clusters.
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: A powerful and unified deploy step for components multi-cluster delivery with policies.
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
|
||||
@@ -4,7 +4,10 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Export data to clusters specified by topology.
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
name: export-data
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
|
||||
@@ -4,7 +4,10 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Export service to clusters specified by topology.
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
name: export-service
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/description: Export data to specified Kubernetes ConfigMap in your workflow.
|
||||
name: export2config
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/description: Export data to Kubernetes Secret in your workflow.
|
||||
name: export2secret
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Terraform
|
||||
definition.oam.dev/description: Generate a JDBC connection based on Component of alibaba-rds
|
||||
name: generate-jdbc-connection
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Config Management
|
||||
definition.oam.dev/description: List the configs
|
||||
name: list-config
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: External Integration
|
||||
definition.oam.dev/description: Send notifications to Email, DingTalk, Slack, Lark or webhook in your workflow.
|
||||
name: notification
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Process Control
|
||||
definition.oam.dev/description: print message in workflow step status
|
||||
name: print-message-in-status
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Config Management
|
||||
definition.oam.dev/description: Read a config
|
||||
name: read-config
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Resource Management
|
||||
definition.oam.dev/description: Read Kubernetes objects from cluster for your workflow steps
|
||||
name: read-object
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: External Intergration
|
||||
definition.oam.dev/alias: ""
|
||||
definition.oam.dev/description: Send request to the url
|
||||
name: request
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Application Delivery
|
||||
definition.oam.dev/description: Sync secrets created by terraform component to runtime clusters so that runtime clusters can share the created cloud resource.
|
||||
labels:
|
||||
custom.definition.oam.dev/scope: Application
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Process Control
|
||||
definition.oam.dev/description: A special step that you can declare 'subSteps' in it, 'subSteps' is an array containing any step type whose valid parameters do not include the `step-group` step type itself. The sub steps were executed in parallel.
|
||||
name: step-group
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Process Control
|
||||
definition.oam.dev/description: Suspend the current workflow, it can be resumed by 'vela workflow resume' command.
|
||||
name: suspend
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
custom.definition.oam.dev/category: Scripts & Commands
|
||||
definition.oam.dev/description: Run a vela command
|
||||
name: vela-cli
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
|
||||
@@ -4,7 +4,8 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Send a request to the specified Webhook URL. If no request body is specified, the current Application body will be sent by default.
|
||||
custom.definition.oam.dev/category: External Intergration
|
||||
definition.oam.dev/description: Send a POST request to the specified Webhook URL. If no request body is specified, the current Application body will be sent by default.
|
||||
name: webhook
|
||||
namespace: {{ include "systemDefinitionNamespace" . }}
|
||||
spec:
|
||||
|
||||
@@ -403,17 +403,16 @@ func (def *Definition) FromCUEString(cueString string, config *rest.Config) erro
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
var pd *packages.PackageDiscover
|
||||
// validate template
|
||||
if config != nil {
|
||||
pd, err := packages.NewPackageDiscover(config)
|
||||
pd, err = packages.NewPackageDiscover(config)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err = value.NewValue(templateString+"\n"+velacue.BaseTemplate, pd, ""); err != nil {
|
||||
return err
|
||||
}
|
||||
} else if val := cuectx.CompileString(templateString + "\n" + velacue.BaseTemplate); val.Err() != nil {
|
||||
return val.Err()
|
||||
}
|
||||
if _, err = value.NewValue(templateString+"\n"+velacue.BaseTemplate, pd, ""); err != nil {
|
||||
return err
|
||||
}
|
||||
return def.FromCUE(&inst, templateString)
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/types"
|
||||
"github.com/oam-dev/kubevela/pkg/stdlib"
|
||||
"github.com/oam-dev/kubevela/pkg/utils/common"
|
||||
)
|
||||
|
||||
@@ -310,6 +311,8 @@ var (
|
||||
)
|
||||
|
||||
func TestGenAllDef(t *testing.T) {
|
||||
err := stdlib.SetupBuiltinImports()
|
||||
assert.NoError(t, err)
|
||||
skipDefs := []string{
|
||||
// non-concrete structs like
|
||||
// foo: string|{secretRef: string}
|
||||
@@ -319,6 +322,7 @@ func TestGenAllDef(t *testing.T) {
|
||||
"notification.cue",
|
||||
"env.cue",
|
||||
"command.cue",
|
||||
"apply-terraform-config.cue",
|
||||
|
||||
// not supported
|
||||
"json-merge-patch.cue",
|
||||
@@ -327,8 +331,9 @@ func TestGenAllDef(t *testing.T) {
|
||||
// no args
|
||||
"apply-application.cue",
|
||||
"apply-application-in-parallel.cue",
|
||||
"step-group.cue",
|
||||
}
|
||||
glob, err := filepath.Glob("../../vela-templates/definitions/*/*.cue")
|
||||
glob, err := filepath.Glob("../../vela-templates/definitions/*/*/*.cue")
|
||||
assert.NoError(t, err)
|
||||
for _, f := range glob {
|
||||
if !stringInSlice(filepath.Base(f), skipDefs) {
|
||||
|
||||
@@ -4,7 +4,9 @@ import (
|
||||
|
||||
"apply-application": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Application Delivery"
|
||||
}
|
||||
labels: {
|
||||
"ui-hidden": "true"
|
||||
"deprecated": "true"
|
||||
@@ -4,7 +4,9 @@ import (
|
||||
|
||||
"apply-remaining": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Application Delivery"
|
||||
}
|
||||
labels: {
|
||||
"ui-hidden": "true"
|
||||
"deprecated": "true"
|
||||
@@ -1,6 +1,8 @@
|
||||
"apply-component": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Application Delivery"
|
||||
}
|
||||
labels: {
|
||||
"scope": "Application"
|
||||
}
|
||||
|
||||
@@ -9,12 +9,16 @@ import (
|
||||
annotations: {}
|
||||
attributes: {}
|
||||
description: "Apply deployment with specified image and cmd."
|
||||
annotations: {
|
||||
"category": "Resource Management"
|
||||
}
|
||||
labels: {}
|
||||
type: "workflow-step"
|
||||
}
|
||||
|
||||
template: {
|
||||
output: op.#Apply & {
|
||||
cluster: parameter.cluster
|
||||
value: {
|
||||
apiVersion: "apps/v1"
|
||||
kind: "Deployment"
|
||||
@@ -24,6 +28,7 @@ template: {
|
||||
}
|
||||
spec: {
|
||||
selector: matchLabels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
|
||||
replicas: parameter.replicas
|
||||
template: {
|
||||
metadata: labels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
|
||||
spec: containers: [{
|
||||
@@ -38,10 +43,12 @@ template: {
|
||||
}
|
||||
}
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: output.value.status.readyReplicas == 1
|
||||
continue: output.value.status.readyReplicas == parameter.replicas
|
||||
}
|
||||
parameter: {
|
||||
image: string
|
||||
image: string
|
||||
replicas: *1 | int
|
||||
cluster: *"" | string
|
||||
cmd?: [...string]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
|
||||
"apply-object": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
labels: {
|
||||
"ui-hidden": "true"
|
||||
annotations: {
|
||||
"category": "Resource Management"
|
||||
}
|
||||
labels: {}
|
||||
description: "Apply raw kubernetes objects for your workflow steps"
|
||||
}
|
||||
template: {
|
||||
|
||||
@@ -6,6 +6,9 @@ import (
|
||||
alias: ""
|
||||
attributes: {}
|
||||
description: "Apply terraform configuration in the step"
|
||||
annotations: {
|
||||
"category": "Terraform"
|
||||
}
|
||||
labels: {}
|
||||
type: "workflow-step"
|
||||
}
|
||||
|
||||
@@ -7,6 +7,9 @@ import (
|
||||
alias: ""
|
||||
attributes: {}
|
||||
description: "Apply terraform provider config"
|
||||
annotations: {
|
||||
"category": "Terraform"
|
||||
}
|
||||
labels: {}
|
||||
type: "workflow-step"
|
||||
}
|
||||
|
||||
@@ -8,6 +8,9 @@ import (
|
||||
alias: ""
|
||||
attributes: {}
|
||||
description: "Build and push image from git url"
|
||||
annotations: {
|
||||
"category": "CI Integration"
|
||||
}
|
||||
labels: {}
|
||||
type: "workflow-step"
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@ import (
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
labels: {}
|
||||
annotations: {
|
||||
"category": "Resource Management"
|
||||
}
|
||||
description: "clean applied jobs in the cluster"
|
||||
}
|
||||
template: {
|
||||
|
||||
@@ -8,6 +8,9 @@ import (
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
labels: {}
|
||||
annotations: {
|
||||
"category": "Application Delivery"
|
||||
}
|
||||
description: "Collect service endpoints for the application."
|
||||
}
|
||||
template: {
|
||||
|
||||
@@ -4,7 +4,9 @@ import (
|
||||
|
||||
"create-config": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Config Management"
|
||||
}
|
||||
labels: {}
|
||||
description: "Create or update a config"
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@ import (
|
||||
|
||||
"delete-config": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Config Management"
|
||||
}
|
||||
labels: {}
|
||||
description: "Delete a config"
|
||||
}
|
||||
|
||||
@@ -5,7 +5,9 @@ import (
|
||||
|
||||
"depends-on-app": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Application Delivery"
|
||||
}
|
||||
labels: {}
|
||||
description: "Wait for the specified Application to complete."
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@ import (
|
||||
|
||||
"deploy-cloud-resource": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Application Delivery"
|
||||
}
|
||||
labels: {
|
||||
"scope": "Application"
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@ import (
|
||||
|
||||
"deploy": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Application Delivery"
|
||||
}
|
||||
labels: {
|
||||
"scope": "Application"
|
||||
}
|
||||
|
||||
@@ -4,8 +4,12 @@ import (
|
||||
|
||||
"export-data": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
labels: {}
|
||||
annotations: {
|
||||
"category": "Application Delivery"
|
||||
}
|
||||
labels: {
|
||||
"scope": "Application"
|
||||
}
|
||||
description: "Export data to clusters specified by topology."
|
||||
}
|
||||
template: {
|
||||
|
||||
@@ -4,8 +4,12 @@ import (
|
||||
|
||||
"export-service": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
labels: {}
|
||||
annotations: {
|
||||
"category": "Application Delivery"
|
||||
}
|
||||
labels: {
|
||||
"scope": "Application"
|
||||
}
|
||||
description: "Export service to clusters specified by topology."
|
||||
}
|
||||
template: {
|
||||
|
||||
@@ -4,7 +4,9 @@ import (
|
||||
|
||||
"export2config": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Resource Management"
|
||||
}
|
||||
description: "Export data to specified Kubernetes ConfigMap in your workflow."
|
||||
}
|
||||
template: {
|
||||
|
||||
@@ -6,7 +6,9 @@ import (
|
||||
|
||||
"export2secret": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Resource Management"
|
||||
}
|
||||
description: "Export data to Kubernetes Secret in your workflow."
|
||||
}
|
||||
template: {
|
||||
|
||||
@@ -5,7 +5,9 @@ import (
|
||||
|
||||
"generate-jdbc-connection": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Terraform"
|
||||
}
|
||||
description: "Generate a JDBC connection based on Component of alibaba-rds"
|
||||
}
|
||||
template: {
|
||||
|
||||
@@ -4,7 +4,9 @@ import (
|
||||
|
||||
"list-config": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Config Management"
|
||||
}
|
||||
labels: {}
|
||||
description: "List the configs"
|
||||
}
|
||||
|
||||
@@ -5,7 +5,9 @@ import (
|
||||
|
||||
"notification": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "External Integration"
|
||||
}
|
||||
labels: {}
|
||||
description: "Send notifications to Email, DingTalk, Slack, Lark or webhook in your workflow."
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@ import (
|
||||
|
||||
"print-message-in-status": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Process Control"
|
||||
}
|
||||
description: "print message in workflow step status"
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,9 @@ import (
|
||||
|
||||
"read-config": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Config Management"
|
||||
}
|
||||
labels: {}
|
||||
description: "Read a config"
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@ import (
|
||||
|
||||
"read-object": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Resource Management"
|
||||
}
|
||||
description: "Read Kubernetes objects from cluster for your workflow steps"
|
||||
}
|
||||
template: {
|
||||
|
||||
@@ -7,6 +7,9 @@ request: {
|
||||
alias: ""
|
||||
attributes: {}
|
||||
description: "Send request to the url"
|
||||
annotations: {
|
||||
"category": "External Intergration"
|
||||
}
|
||||
labels: {}
|
||||
type: "workflow-step"
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@ import (
|
||||
|
||||
"share-cloud-resource": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Application Delivery"
|
||||
}
|
||||
labels: {
|
||||
"scope": "Application"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
"step-group": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Process Control"
|
||||
}
|
||||
description: "A special step that you can declare 'subSteps' in it, 'subSteps' is an array containing any step type whose valid parameters do not include the `step-group` step type itself. The sub steps were executed in parallel."
|
||||
}
|
||||
template: {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
"suspend": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "Process Control"
|
||||
}
|
||||
labels: {}
|
||||
description: "Suspend the current workflow, it can be resumed by 'vela workflow resume' command."
|
||||
}
|
||||
|
||||
@@ -3,7 +3,11 @@ import (
|
||||
)
|
||||
|
||||
"vela-cli": {
|
||||
type: "workflow-step"
|
||||
type: "workflow-step"
|
||||
annotations: {
|
||||
"category": "Scripts & Commands"
|
||||
}
|
||||
labels: {}
|
||||
description: "Run a vela command"
|
||||
}
|
||||
template: {
|
||||
|
||||
@@ -6,9 +6,11 @@ import (
|
||||
|
||||
"webhook": {
|
||||
type: "workflow-step"
|
||||
annotations: {}
|
||||
annotations: {
|
||||
"category": "External Intergration"
|
||||
}
|
||||
labels: {}
|
||||
description: "Send a request to the specified Webhook URL. If no request body is specified, the current Application body will be sent by default."
|
||||
description: "Send a POST request to the specified Webhook URL. If no request body is specified, the current Application body will be sent by default."
|
||||
}
|
||||
template: {
|
||||
data: op.#Steps & {
|
||||
|
||||
Reference in New Issue
Block a user