Skip to content

Commit

Permalink
Merge pull request #388 from pjbgf/add-hostkey-flag
Browse files Browse the repository at this point in the history
Add new flag --ssh-hostkey-algos
  • Loading branch information
stefanprodan authored Jun 14, 2022
2 parents 9f24443 + d46a42e commit 1346cac
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func main() {
featureGates feathelper.FeatureGates
watchAllNamespaces bool
concurrent int
kexAlgos []string
)

flag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.")
Expand All @@ -87,8 +86,10 @@ func main() {
flag.BoolVar(&watchAllNamespaces, "watch-all-namespaces", true,
"Watch for custom resources in all namespaces, if set to false it will only watch the runtime namespace.")
flag.IntVar(&concurrent, "concurrent", 4, "The number of concurrent resource reconciles.")
flag.StringSliceVar(&kexAlgos, "ssh-kex-algos", []string{},
flag.StringSliceVar(&git.KexAlgos, "ssh-kex-algos", []string{},
"The list of key exchange algorithms to use for ssh connections, arranged from most preferred to the least.")
flag.StringSliceVar(&git.HostKeyAlgos, "ssh-hostkey-algos", []string{},
"The list of hostkey algorithms to use for ssh connections, arranged from most preferred to the least.")

clientOptions.BindFlags(flag.CommandLine)
logOptions.BindFlags(flag.CommandLine)
Expand Down Expand Up @@ -164,15 +165,9 @@ func main() {
managed.InitManagedTransport(ctrl.Log.WithName("managed-transport"))
}

setPreferredKexAlgos(kexAlgos)

setupLog.Info("starting manager")
if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {
setupLog.Error(err, "problem running manager")
os.Exit(1)
}
}

func setPreferredKexAlgos(algos []string) {
git.KexAlgos = algos
}

0 comments on commit 1346cac

Please sign in to comment.