Concourse CI can't find kubernetes secrets

此生再无相见时 提交于 2019-12-13 17:34:46

问题


I'm receiving the following error when the runner is trying to retrieve a resource:

checking failed -
Expected to find variables: git

my resource looks similar to:

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

my values.yaml for the helm chart includes:

rbac:
  create: false

credentialManager:
  kubernetes:
    namespacePrefix: concourse

(regardless, the release name is concourse)

under namespace concourse-main i have the the secret:

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

Data
password:  bytes
username:  bytes 

further information:

  • 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.


来源:https://stackoverflow.com/questions/49432041/concourse-ci-cant-find-kubernetes-secrets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!