【发布时间】:2022-08-08 21:48:14
【问题描述】:
我在保险库中创建了一些秘密,我正在传递如下变量。但秘密没有被提取。
annotations:
vault.hashicorp.com/agent-inject: \'true\'
vault.hashicorp.com/agent-vault-addr: \'https://vaultadd.com\'
vault.hashicorp.com/auth-type: \'approle\'
vault.hashicorp.com/auth-path: \'auth/approle\'
vault.hashicorp.com/auth-config-role-id-file-path: \'/vault/custom/role-id\'
vault.hashicorp.com/auth-config-secret-id-file-path: \'/vault/custom/secret-id\'
vault.hashicorp.com/agent-extra-secret: \'mysecret\'
vault.hashicorp.com/role: \'myrole\'
vault.hashicorp.com/auth-config-remove_secret_id_file_after_reading: \'false\'
vault.hashicorp.com/log-level: \'debug\'
vault.hashicorp.com/agent-inject-secret-MY-SECRET: \'secret/mysecret/secrets\'
vault.hashicorp.com/agent-inject-template-MY-SECRET: |
{{ with secret \"secret/mysecret/secrets\" -}}
export username={{ .Data.username}}
export password={{ .Data.password }}
{{- end }}
我在下面提到的 Args
args:
[\"sh\", \"-c\", \"source /vault/secrets/config && MY_ENTRYPOINT\"]
标签: kubernetes vault