Configure artifacts
When you orchestrate complex workflow steps, the output of one step often becomes the input of another. Add an artifacts configuration to the ConfigMap of Argo Workflows Controller to store artifact files in Object Storage Service (OSS) and pass the required parameters between workflow steps.
Prerequisites
You have completed the operations described in Activate OSS and Create a bucket.
If the OSS bucket and the cluster are in the same Virtual Private Cloud (VPC), you can access OSS resources over the internal endpoint of OSS. No traffic fees are charged. For more information about OSS billing, see Billable items.
Procedure
-
Create a Secret named
my-oss-secretin the argo namespace of the cluster to store the credentials used to access OSS.apiVersion: v1 stringData: accessKey: xxxxxxxxxx # Replace with the AccessKey ID that can be used to access OSS. secretKey: xxxxxxxxxx # Replace with the AccessKey secret that can be used to access OSS. kind: Secret metadata: name: my-oss-secret namespace: argo type: Opaque -
Edit the
workflow-controller-configmapConfigMap.kubectl edit configmap workflow-controller-configmap -n argoIn the
datafield, add an artifacts configuration.data: artifactRepository: | archiveLogs: true oss: endpoint: http://oss-cn-zhangjiakou-internal.aliyuncs.com # Replace with the endpoint of OSS. bucket: my-bucket # Replace with the actual name of the OSS bucket. accessKeySecret: name: my-oss-secret key: accessKey secretKeySecret: name: my-oss-secret key: secretKeyAfter the configuration is created, the Argo Workflows Controller watches the ConfigMap and performs operations such as uploading, downloading, and deleting files based on your workflow definition.