Kubernetes:如何使用gitRepo卷?

有人可以举例说明如何在gitRepo使用gitRepotypes的卷?

该文件说这是一个插件,不知道这是什么意思。 找不到任何地方的例子,我不知道正确的语法。

特别是有参数拉特定的分支,使用凭据(用户名,密码或SSH密钥)等…

编辑:通过Kubernetes代码这是我到目前为止:

 - name: data gitRepo: repository: "git repo url" revision: "hash of the commit to use" 

但看不出来,使其工作,不知道如何解决这个问题

这是我使用的示例应用程序:

 { "kind": "ReplicationController", "apiVersion": "v1", "metadata": { "name": "tess.io", "labels": { "name": "tess.io" } }, "spec": { "replicas": 3, "selector": { "name": "tess.io" }, "template": { "metadata": { "labels": { "name": "tess.io" } }, "spec": { "containers": [ { "image": "tess/tessio:0.0.3", "name": "tessio", "ports": [ { "containerPort": 80, "protocol": "TCP" } ], "volumeMounts": [ { "mountPath": "/tess", "name": "tess" } ] } ], "volumes": [ { "name": "tess", "gitRepo": { "repository": "https://<TOKEN>:x-oauth-basic@github.com/tess/tess.io" } } ] } } } } 

你也可以使用修订版

PS:上面的回购不存在了。

通过代码这是我的想法:

 - name: data gitRepo: repository: "git repo url" revision: "hash of the commit to use" 

修正我的mountPath中的拼写错误后,它工作正常。