代码之家  ›  专栏  ›  技术社区  ›  Jordi

tekton&buildpack:由未知权威机构签署的证书

  •  0
  • Jordi  · 技术社区  · 4 年前

    我已经部署了一个本地docker注册表。它使用自签名证书。

    当我尝试运行buildpacks任务时,我收到以下消息:

    x509: certificate signed by unknown authority
    

    我看了一些关于如何添加docker注册证书的文档,但我还没能设置它。

    pipeline.yaml 是:

    apiVersion: tekton.dev/v1beta1
    kind: Pipeline
    metadata:
      name: build-and-deploy-pipeline
    spec:
      workspaces:
        - name: git-source
          description: The git repo
        - name: dockerconfig-ws
          description: Docker configuration
      params:
        - name: gitUrl
          description: Git repository url
      tasks:
        - name: fetch-repository
          taskRef:
            name: git-clone
          workspaces:
            - name: output
              workspace: git-source
          params:
            - name: url
              value: "$(params.gitUrl)"
            - name: subdirectory
              value: "."
            - name: deleteExisting
              value: "true"
        - name: buildpacks
          taskRef:
            name: buildpacks
          runAfter:
            - fetch-repository
          workspaces:
            - name: source
              workspace: git-source
            - name: dockerconfig
              workspace: dockerconfig-ws
          params:
            - name: APP_IMAGE
              value: host.k3d.internal:5443/restservice
            - name: BUILDER_IMAGE
              value: paketobuildpacks/builder:tiny
    

    pipelinerun.yaml :

    apiVersion: tekton.dev/v1beta1
    kind: PipelineRun
    metadata:
      generateName: tekton101lab-pipelinerun-
    spec:
      pipelineRef:
        name: build-and-deploy-pipeline
      params:
        - name: gitUrl
          value: https://xxx@gitlab.com/cicdgitops/rest-service.git/
      workspaces:
        - name: git-source
          persistentVolumeClaim:
            claimName: git-pvc
        - name: cache-ws
          persistentVolumeClaim:
            claimName: cache-pvc
        - name: dockerconfig-ws
          secret:
            secretName: dockerconfig-secret
    

    有什么想法吗?

    我的意思是,我如何将我的docker注册证书添加为受信任的ca证书?

    你可以看到行为 here 。当构建包任务试图访问我的docker注册表时,会出现问题( host.k3d.internal )。

    0 回复  |  直到 4 年前
    推荐文章