Merge pull request #28140 from GreenApple10/feature/translate_SecretExample2

[zh]Translate new add secretGenerato example
This commit is contained in:
Kubernetes Prow Robot 2021-05-27 02:48:24 -07:00 committed by GitHub
commit 9d5c3d4798
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 1 deletions

View File

@ -68,7 +68,25 @@ secretGenerator:
- password=1f2d1e2e67df
```
<!-- Note that in both cases, you don't need to base64 encode the values. -->
<!--
You can also define the `secretGenerator` in the `kustomization.yaml`
file by providing `.env` files.
For example, the following `kustomization.yaml` file pulls in data from
`.env.secret` file:
-->
你也可以使用 `.env` 文件在 `kustomization.yaml` 中定义 `secretGenerator`
例如:下面的 `kustomization.yaml` 文件从 `.env.secret` 文件获取数据。
```yaml
secretGenerator:
- name: db-user-pass
envs:
- .env.secret
```
<!--
Note that in all cases, you don't need to base64 encode the values.
-->
注意,上面两种情况,你都不需要使用 base64 编码。
<!-- ## Create the Secret -->