Skip to content

Commit 9d5c3d4

Browse files
authored
Merge pull request #28140 from GreenApple10/feature/translate_SecretExample2
[zh]Translate new add secretGenerato example
2 parents 95d0cc6 + 1f822ba commit 9d5c3d4

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

content/zh/docs/tasks/configmap-secret/managing-secret-using-kustomize.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,25 @@ secretGenerator:
6868
- password=1f2d1e2e67df
6969
```
7070

71-
<!-- Note that in both cases, you don't need to base64 encode the values. -->
71+
<!--
72+
You can also define the `secretGenerator` in the `kustomization.yaml`
73+
file by providing `.env` files.
74+
For example, the following `kustomization.yaml` file pulls in data from
75+
`.env.secret` file:
76+
-->
77+
你也可以使用 `.env` 文件在 `kustomization.yaml` 中定义 `secretGenerator`。
78+
例如:下面的 `kustomization.yaml` 文件从 `.env.secret` 文件获取数据。
79+
80+
```yaml
81+
secretGenerator:
82+
- name: db-user-pass
83+
envs:
84+
- .env.secret
85+
```
86+
87+
<!--
88+
Note that in all cases, you don't need to base64 encode the values.
89+
-->
7290
注意,上面两种情况,你都不需要使用 base64 编码。
7391

7492
<!-- ## Create the Secret -->

0 commit comments

Comments
 (0)