mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #15693 from ZJU-SEL/gitrepo-doc
Auto commit by PR queue bot
This commit is contained in:
commit
d42f2399f4
@ -376,6 +376,27 @@ mounts an empty directory and clones a git repository into it for your pod to
|
|||||||
use. In the future, such volumes may be moved to an even more decoupled model,
|
use. In the future, such volumes may be moved to an even more decoupled model,
|
||||||
rather than extending the Kubernetes API for every such use case.
|
rather than extending the Kubernetes API for every such use case.
|
||||||
|
|
||||||
|
Here is a example for gitRepo volume:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: server
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: nginx
|
||||||
|
name: nginx
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /mypath
|
||||||
|
name: git-volume
|
||||||
|
volumes:
|
||||||
|
- name: git-volume
|
||||||
|
gitRepo:
|
||||||
|
repository: "git@somewhere:me/my-git-repository.git"
|
||||||
|
revision: "22f1d8406d464b0c0874075539c1f2e96c253775"
|
||||||
|
```
|
||||||
|
|
||||||
### secret
|
### secret
|
||||||
|
|
||||||
A `secret` volume is used to pass sensitive information, such as passwords, to
|
A `secret` volume is used to pass sensitive information, such as passwords, to
|
||||||
|
Loading…
Reference in New Issue
Block a user