Add fetch timeout arg to create source commands

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan 2021-11-01 15:32:22 +02:00
parent 404ffa5a91
commit 61be0775af
No known key found for this signature in database
GPG key ID: 3299AEB0E4085BAF
4 changed files with 23 additions and 0 deletions

View file

@ -206,6 +206,10 @@ func createSourceGitCmdRun(cmd *cobra.Command, args []string) error {
},
}
if createSourceArgs.fetchTimeout > 0 {
gitRepository.Spec.Timeout = &metav1.Duration{Duration: createSourceArgs.fetchTimeout}
}
if sourceGitArgs.gitImplementation != "" {
gitRepository.Spec.GitImplementation = sourceGitArgs.gitImplementation.String()
}