Argo 工件给出错误 "http: server gave HTTP response to HTTPS client"

Argo artifacts gives error "http: server gave HTTP response to HTTPS client"

我在 Argo 命名空间中的 k8s 集群中设置 Argo。

我还将 MinIO 安装为 Artifact 存储库 (https://github.com/argoproj/argo-workflows/blob/master/docs/configure-artifact-repository.md)。

我正在配置一个尝试访问非默认工件存储库的工作流:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: artifact-passing-
spec:
  entrypoint: artifact-example
  templates:
  - name: artifact-example
    steps:
    - - name: generate-artifact
        template: whalesay
    - - name: consume-artifact
        template: print-message
        arguments:
          artifacts:
          # bind message to the hello-art artifact
          # generated by the generate-artifact step
          - name: message
            from: "{{steps.generate-artifact.outputs.artifacts.hello-art}}"

  - name: whalesay
    container:
      image: docker/whalesay:latest
      command: [sh, -c]
      args: ["cowsay hello world | tee /tmp/hello_world.txt"]
    outputs:
      artifacts:
      # generate hello-art artifact from /tmp/hello_world.txt
      # artifacts can be directories as well as files
      - name: hello-art
        path: /tmp/hello_world.txt
        s3:
          endpoint: argo-artifacts-minio.argo:9000
          bucket: my-bucket
          key: /my-output-artifact.tgz
          accessKeySecret:
            name: argo-artifacts-minio
            key: accesskey
          secretKeySecret:
            name: argo-artifacts-minio
            key: secretkey

  - name: print-message
    inputs:
      artifacts:
      # unpack the message input artifact
      # and put it at /tmp/message
      - name: message
        path: /tmp/message
        s3:
          endpoint: argo-artifacts-minio.argo:9000 
          bucket: my-bucket
          accessKeySecret:
            name: argo-artifacts-minio
            key: accesskey
          secretKeySecret:
            name: argo-artifacts-minio
            key: secretkey
    container:
      image: alpine:latest
      command: [sh, -c]
      args: ["cat /tmp/message"]

我通过以下方式在 argo 命名空间中创建了工作流:

argo submit --watch artifact-passing-nondefault-new.yaml -n argo

但工作流失败并出现错误:

STEP                       PODNAME                           DURATION  MESSAGE

 ✖ artifact-passing-z9g64                                              child 'artifact-passing-z9g64-150231068' failed
 └---⚠ generate-artifact   artifact-passing-z9g64-150231068  12s       failed to save outputs: Get https://argo-artifacts-minio.argo:9000/my-bucket/?location=: http: server gave HTTP response to HTTPS client

有人可以帮我解决这个错误吗?

由于 minio 安装程序在未配置 TLS 的情况下运行,因此工作流应指定它应连接到不安全的工件存储库。

在工作流的 s3 定义部分包含一个字段 insecure: true 可以解决问题。

    s3:
      endpoint: argo-artifacts-minio.argo:9000
      insecure: true
      bucket: my-bucket
      key: /my-output-artifact.tgz
      accessKeySecret:
        name: argo-artifacts-minio
        key: accesskey
      secretKeySecret:
        name: argo-artifacts-minio
        key: secretkey