When you orchestrate complex workflows, the output of one step may be used as the input for a subsequent step. By configuring artifacts, you can pass the necessary parameters or data between workflow steps. This topic describes how to add artifact configuration to the ConfigMap of the Argo Workflows controller so that you can use Object Storage Service (OSS) to store artifact files. This setup enables the transmission of parameters between workflow steps.
Prerequisites
OSS is activated and an OSS bucket is created. For more information, see Activate OSS and Create a bucket.
If the OSS bucket and the cluster reside in the same virtual private cloud (VPC), you can access OSS resources over the internal endpoint at no additional traffic cost. For more information about OSS billing, see Billable items.
Procedure
Create a Secret named
my-oss-secretin the argo namespace to store the AccessKey used to access OSS.apiVersion: v1 stringData: accessKey: xxxxxxxxxx # Replace with the AccessKey ID used to access OSS. secretKey: xxxxxxxxxx # Replace with the AccessKey secret used to access OSS. kind: Secret metadata: name: my-oss-secret namespace: argo type: OpaqueRun the following command to edit the
workflow-controller-configmapfile:kubectl edit configmap workflow-controller-configmap -n argoInsert the artifact configuration into the
datafield.data: artifactRepository: | archiveLogs: true oss: endpoint: http://oss-cn-zhangjiakou-internal.aliyuncs.com # Replace with the OSS endpoint. bucket: my-bucket # Replace with the actual OSS bucket name. accessKeySecret: name: my-oss-secret key: accessKey secretKeySecret: name: my-oss-secret key: secretKeyAfter configuration, the Argo Workflows controller will monitor the ConfigMap, and perform operations such as uploading, downloading, and deleting files based on your workflow.