Skip to content

Commit 39f1c5c

Browse files
author
Paulo Gomes
authored
Merge pull request #711 from pjbgf/add-hostkey-flag
Add new flag `--ssh-hostkey-algos`
2 parents 1a06b7a + 9fddf69 commit 39f1c5c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

main.go

+3-7
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ func main() {
9191
helmCacheMaxSize int
9292
helmCacheTTL string
9393
helmCachePurgeInterval string
94-
kexAlgos []string
9594
artifactRetentionTTL time.Duration
9695
artifactRetentionRecords int
9796
)
@@ -124,8 +123,10 @@ func main() {
124123
"The TTL of an index in the cache. Valid time units are ns, us (or µs), ms, s, m, h.")
125124
flag.StringVar(&helmCachePurgeInterval, "helm-cache-purge-interval", "1m",
126125
"The interval at which the cache is purged. Valid time units are ns, us (or µs), ms, s, m, h.")
127-
flag.StringSliceVar(&kexAlgos, "ssh-kex-algos", []string{},
126+
flag.StringSliceVar(&git.KexAlgos, "ssh-kex-algos", []string{},
128127
"The list of key exchange algorithms to use for ssh connections, arranged from most preferred to the least.")
128+
flag.StringSliceVar(&git.HostKeyAlgos, "ssh-hostkey-algos", []string{},
129+
"The list of hostkey algorithms to use for ssh connections, arranged from most preferred to the least.")
129130
flag.DurationVar(&artifactRetentionTTL, "artifact-retention-ttl", 60*time.Second,
130131
"The duration of time that artifacts will be kept in storage before being garbage collected.")
131132
flag.IntVar(&artifactRetentionRecords, "artifact-retention-records", 2,
@@ -185,7 +186,6 @@ func main() {
185186
storageAdvAddr = determineAdvStorageAddr(storageAddr, setupLog)
186187
}
187188
storage := mustInitStorage(storagePath, storageAdvAddr, artifactRetentionTTL, artifactRetentionRecords, setupLog)
188-
setPreferredKexAlgos(kexAlgos)
189189

190190
if err = (&controllers.GitRepositoryReconciler{
191191
Client: mgr.GetClient(),
@@ -345,7 +345,3 @@ func envOrDefault(envName, defaultValue string) string {
345345

346346
return defaultValue
347347
}
348-
349-
func setPreferredKexAlgos(algos []string) {
350-
git.KexAlgos = algos
351-
}

0 commit comments

Comments
 (0)