mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Add directory in GitRepo and updated tests.
Update validate and gitRepo Update generated code
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
@@ -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.
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user