当尝试在to.be.continuous中使用Hashicorp保险库模板(kubernetes和Google引擎)时,我遇到了一些问题。
实际上,当我将它与Google层一起使用时,我收到了一条错误消息:.坏地址‘保险库-秘密-提供者’。
似乎Kaniko不认识保险库-秘密提供者层。你能帮我一下吗?或者,在哪里我可以寻求帮助?
这是..gitlab ci.yml的摘要
# Kubernetes template
- project: 'to-be-continuous/kubernetes'
ref: '2.0.4'
file: '/templates/gitlab-ci-k8s.yml'
- project: "to-be-continuous/kubernetes"
ref: "2.0.4"
file: "templates/gitlab-ci-k8s-vault.yml"
...
K8S_DEFAULT_KUBE_CONFIG: "@url@http://vault-secrets-provider/api/secrets/noprod?field=kube_config"
VAULT_BASE_URL: "http://myvault.myserver.com/v1"错误信息:
[ERROR] Failed getting secret K8S_DEFAULT_KUBE_CONFIG:
... wget: bad address 'vault-secrets-provider'我尝试了很多次直接没有跳台层和Kaniko工作正常,我的意思是没有跳台的秘密。
我怎么能做到这一点?我试过修改kaniko模板,但没有成功。
对此,我将不胜感激。
发布于 2022-01-09 14:42:20
要解决问题,首先将docker模板升级到其最新版本(编写此响应时的2.3.0)。
然后,根据您的情况,您有两个选项:
您只需在.gitlab-ci.yml文件中使用它:
include:
# Docker template
- project: 'to-be-continuous/docker'
ref: '2.3.0'
file: '/templates/gitlab-ci-docker.yml'
# Vault variant for Docker (depending on your above case)
- project: 'to-be-continuous/docker'
ref: '2.3.0'
file: '/templates/gitlab-ci-docker-vault.yml'
# Kubernetes template
- project: 'to-be-continuous/kubernetes'
ref: '2.0.4'
file: '/templates/gitlab-ci-k8s.yml'
- project: "to-be-continuous/kubernetes"
ref: "2.0.4"
file: "/templates/gitlab-ci-k8s-vault.yml"
K8S_DEFAULT_KUBE_CONFIG: "@url@http://vault-secrets-provider/api/secrets/noprod?field=kube_config"
VAULT_BASE_URL: "http://myvault.myserver.com/v1"https://stackoverflow.com/questions/70499419
复制相似问题