Add directory in GitRepo and updated tests.

Update validate and gitRepo

Update generated code
This commit is contained in:
Harry Zhang
2015-10-10 18:10:45 +08:00
committed by harry zhang
parent f4ea77bede
commit 70a9c0bf56
19 changed files with 27957 additions and 27564 deletions

View File

@@ -826,6 +826,7 @@ func autoconvert_api_GitRepoVolumeSource_To_v1_GitRepoVolumeSource(in *api.GitRe
}
out.Repository = in.Repository
out.Revision = in.Revision
out.Directory = in.Directory
return nil
}
@@ -3851,6 +3852,7 @@ func autoconvert_v1_GitRepoVolumeSource_To_api_GitRepoVolumeSource(in *GitRepoVo
}
out.Repository = in.Repository
out.Revision = in.Revision
out.Directory = in.Directory
return nil
}

View File

@@ -623,6 +623,7 @@ func deepCopy_v1_GCEPersistentDiskVolumeSource(in GCEPersistentDiskVolumeSource,
func deepCopy_v1_GitRepoVolumeSource(in GitRepoVolumeSource, out *GitRepoVolumeSource, c *conversion.Cloner) error {
out.Repository = in.Repository
out.Revision = in.Revision
out.Directory = in.Directory
return nil
}

File diff suppressed because it is too large Load Diff

View File

@@ -673,7 +673,12 @@ type GitRepoVolumeSource struct {
// Repository URL
Repository string `json:"repository"`
// Commit hash for the specified revision.
Revision string `json:"revision"`
Revision string `json:"revision,omitempty"`
// Target directory name.
// Must not contain or start with '..'. If '.' is supplied, the volume directory will be the
// git repository. Otherwise, if specified, the volume will contain the git repository in
// the subdirectory with the given name.
Directory string `json:"directory,omitempty"`
}
// SecretVolumeSource adapts a Secret into a VolumeSource.

View File

@@ -416,6 +416,7 @@ var map_GitRepoVolumeSource = map[string]string{
"": "GitRepoVolumeSource represents a volume that is pulled from git when the pod is created.",
"repository": "Repository URL",
"revision": "Commit hash for the specified revision.",
"directory": "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.",
}
func (GitRepoVolumeSource) SwaggerDoc() map[string]string {