Argo工件给出错误“ http:服务器向HTTPS客户端提供了HTTP响应”

时间:2019-12-11 10:28:19

标签: http workflow artifact minio argo

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

我还安装了MinIO作为工件存储库(https://github.com/argoproj/argo/blob/master/ARTIFACT_REPO.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

有人可以帮助我解决此错误吗?

1 个答案:

答案 0 :(得分:1)

由于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