Concourse CI 找不到 kubernetes 機密 (Concourse CI can't find kubernetes secrets)


問題描述

Concourse CI 找不到 kubernetes 機密 (Concourse CI can't find kubernetes secrets)

當跑步者嘗試檢索資源時,我收到以下錯誤:

checking failed ‑
Expected to find variables: git

我的資源類似於:

‑ name: resource‑repo
  type: git
  source:
    uri: https://[url]
    branch: master
    tag_filter: '*'
    username: ((git.username))
    password: ((git.password))

舵圖的我的 values.yaml包括:

rbac:
  create: false

credentialManager:
  kubernetes:
    namespacePrefix: concourse

(不管發布名稱是concourse)

在命名空間concourse‑main下我有秘密:

Details
Name: git
Namespace: concourse‑main
Type: Opaque

Data
password:  bytes
username:  bytes 

更多信息:

  • k8s 1.8.6
  • kops 1.8.1
  • weavenet
  • Concourse 3.9.1

參考解法

方法 1:

Based on information from the documentation:

By default, this chart will use Kubernetes Secrets as a credential manager. For a given Concourse team, a pipeline will look for secrets in a namespace named [namespacePrefix][teamName]. The namespace prefix is the release name hyphen by default, and can be overridden with the value credentialManager.kubernetes.namespacePrefix.

In your configuration, I see the secret in a namespace of your secret is concourse‑main, but a default namespacePrefix is concourse.

So, Concourse trying to get your secret from a wrong namespace.

You can fix it using two ways:

  1. Create a secret in the namespace concourse.
  2. Change namespacePrefix to concourse‑main.

(by DeanoAnton Kostenko)

參考文件

  1. Concourse CI can't find kubernetes secrets (CC BY‑SA 2.5/3.0/4.0)

#concourse #Kubernetes #kubernetes-secrets






相關問題

進行飛行同步時的未知目標 (unknown target when doing a fly sync)

從另一個大廳到達一個大廳任務的容器 (Reach one concourse task's container from another one)

從 Concourse 克隆 Bitbucket 上的 git 存儲庫的問題 (Issues cloning a git repo on Bitbucket from Concourse)

如果作業被取消,Concourse 會阻止後台進程停止 (Concourse prevent background processes from being stopped if job is canceled)

Concourse 流水線:如何讓嵌入式腳本使流水線失敗 (Concourse Pipeline: How to have an Embedded Script Fail the Pipeline)

將構建目錄 (/dist) 從一個作業傳遞到大廳中的下一個作業 (Pass build directory (/dist) from a job to next job in concourse)

Concourse CI 找不到 kubernetes 機密 (Concourse CI can't find kubernetes secrets)

大廳工作人員“找不到文件” (Concourse Worker "file not found")

windows系統需要安裝Concourse(CI/CD) (Need to Install Concourse(CI/CD) on windows system)

在管道任務中指定運行時參數 (Specify runtime parameter in a pipeline task)

如何遍歷大廳中的數組 (How to iterate through an array in concourse)







留言討論