1
1
/* eslint-disable no-loop-func */
2
2
/* eslint-disable no-await-in-loop */
3
+ import { AppsV1Api , CoreV1Api , CustomObjectsApi , KubeConfig , V1Secret } from '@kubernetes/client-node'
4
+ import { V1ResourceRequirements } from '@kubernetes/client-node/dist/gen/model/v1ResourceRequirements'
3
5
import retry , { Options } from 'async-retry'
4
6
import { AnyAaaaRecord , AnyARecord } from 'dns'
5
7
import { resolveAny } from 'dns/promises'
@@ -16,8 +18,6 @@ import { env } from './envalid'
16
18
import { hfValues } from './hf'
17
19
import { parser } from './yargs'
18
20
import { askYesNo } from './zx-enhance'
19
- import { AppsV1Api , CoreV1Api , CustomObjectsApi , KubeConfig , V1Secret } from '@kubernetes/client-node'
20
- import { V1ResourceRequirements } from '@kubernetes/client-node/dist/gen/model/v1ResourceRequirements'
21
21
22
22
export const secretId = `secret/otomi/${ DEPLOYMENT_PASSWORDS_SECRET } `
23
23
@@ -243,7 +243,7 @@ type WaitTillAvailableOptions = Options & {
243
243
244
244
export const waitTillGitRepoAvailable = async ( repoUrl ) : Promise < void > => {
245
245
const retryOptions : Options = {
246
- retries : 10 ,
246
+ retries : 20 ,
247
247
maxTimeout : 30000 ,
248
248
}
249
249
const d = terminal ( 'common:k8s:waitTillGitRepoAvailable' )
@@ -253,7 +253,7 @@ export const waitTillGitRepoAvailable = async (repoUrl): Promise<void> => {
253
253
// the ls-remote exist with zero even if repo is empty
254
254
await $ `git ls-remote ${ repoUrl } `
255
255
} catch ( e ) {
256
- d . warn ( e . message )
256
+ d . warn ( `The ${ repoUrl } is not yet reachable. Retrying in ${ retryOptions . maxTimeout } ms` )
257
257
throw e
258
258
}
259
259
} , retryOptions )
0 commit comments