From 14334837b9df8ad9f80e36eb1095695ef38efe4d Mon Sep 17 00:00:00 2001 From: Harry Zhang Date: Thu, 15 Oct 2015 06:13:45 +0000 Subject: [PATCH] Add example of using gitRepo --- docs/user-guide/volumes.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/user-guide/volumes.md b/docs/user-guide/volumes.md index 9d57bddda27..4e4602daa6f 100644 --- a/docs/user-guide/volumes.md +++ b/docs/user-guide/volumes.md @@ -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, 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 A `secret` volume is used to pass sensitive information, such as passwords, to