|
|
@ -101,7 +101,7 @@ func bootstrapGitCmdRun(cmd *cobra.Command, args []string) error {
|
|
|
|
ctx, cancel := context.WithTimeout(context.Background(), rootArgs.timeout)
|
|
|
|
ctx, cancel := context.WithTimeout(context.Background(), rootArgs.timeout)
|
|
|
|
defer cancel()
|
|
|
|
defer cancel()
|
|
|
|
|
|
|
|
|
|
|
|
kubeClient, err := utils.KubeClient(rootArgs.kubeconfig, rootArgs.kubecontext)
|
|
|
|
kubeClient, err := utils.KubeClient(kubeconfigArgs)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -128,7 +128,7 @@ func bootstrapGitCmdRun(cmd *cobra.Command, args []string) error {
|
|
|
|
installOptions := install.Options{
|
|
|
|
installOptions := install.Options{
|
|
|
|
BaseURL: rootArgs.defaults.BaseURL,
|
|
|
|
BaseURL: rootArgs.defaults.BaseURL,
|
|
|
|
Version: bootstrapArgs.version,
|
|
|
|
Version: bootstrapArgs.version,
|
|
|
|
Namespace: rootArgs.namespace,
|
|
|
|
Namespace: *kubeconfigArgs.Namespace,
|
|
|
|
Components: bootstrapComponents(),
|
|
|
|
Components: bootstrapComponents(),
|
|
|
|
Registry: bootstrapArgs.registry,
|
|
|
|
Registry: bootstrapArgs.registry,
|
|
|
|
ImagePullSecret: bootstrapArgs.imagePullSecret,
|
|
|
|
ImagePullSecret: bootstrapArgs.imagePullSecret,
|
|
|
@ -149,7 +149,7 @@ func bootstrapGitCmdRun(cmd *cobra.Command, args []string) error {
|
|
|
|
// Source generation and secret config
|
|
|
|
// Source generation and secret config
|
|
|
|
secretOpts := sourcesecret.Options{
|
|
|
|
secretOpts := sourcesecret.Options{
|
|
|
|
Name: bootstrapArgs.secretName,
|
|
|
|
Name: bootstrapArgs.secretName,
|
|
|
|
Namespace: rootArgs.namespace,
|
|
|
|
Namespace: *kubeconfigArgs.Namespace,
|
|
|
|
TargetPath: gitArgs.path.String(),
|
|
|
|
TargetPath: gitArgs.path.String(),
|
|
|
|
ManifestFile: sourcesecret.MakeDefaultOptions().ManifestFile,
|
|
|
|
ManifestFile: sourcesecret.MakeDefaultOptions().ManifestFile,
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -194,8 +194,8 @@ func bootstrapGitCmdRun(cmd *cobra.Command, args []string) error {
|
|
|
|
// Sync manifest config
|
|
|
|
// Sync manifest config
|
|
|
|
syncOpts := sync.Options{
|
|
|
|
syncOpts := sync.Options{
|
|
|
|
Interval: gitArgs.interval,
|
|
|
|
Interval: gitArgs.interval,
|
|
|
|
Name: rootArgs.namespace,
|
|
|
|
Name: *kubeconfigArgs.Namespace,
|
|
|
|
Namespace: rootArgs.namespace,
|
|
|
|
Namespace: *kubeconfigArgs.Namespace,
|
|
|
|
URL: repositoryURL.String(),
|
|
|
|
URL: repositoryURL.String(),
|
|
|
|
Branch: bootstrapArgs.branch,
|
|
|
|
Branch: bootstrapArgs.branch,
|
|
|
|
Secret: bootstrapArgs.secretName,
|
|
|
|
Secret: bootstrapArgs.secretName,
|
|
|
@ -220,7 +220,7 @@ func bootstrapGitCmdRun(cmd *cobra.Command, args []string) error {
|
|
|
|
bootstrap.WithBranch(bootstrapArgs.branch),
|
|
|
|
bootstrap.WithBranch(bootstrapArgs.branch),
|
|
|
|
bootstrap.WithAuthor(bootstrapArgs.authorName, bootstrapArgs.authorEmail),
|
|
|
|
bootstrap.WithAuthor(bootstrapArgs.authorName, bootstrapArgs.authorEmail),
|
|
|
|
bootstrap.WithCommitMessageAppendix(bootstrapArgs.commitMessageAppendix),
|
|
|
|
bootstrap.WithCommitMessageAppendix(bootstrapArgs.commitMessageAppendix),
|
|
|
|
bootstrap.WithKubeconfig(rootArgs.kubeconfig, rootArgs.kubecontext),
|
|
|
|
bootstrap.WithKubeconfig(kubeconfigArgs),
|
|
|
|
bootstrap.WithPostGenerateSecretFunc(promptPublicKey),
|
|
|
|
bootstrap.WithPostGenerateSecretFunc(promptPublicKey),
|
|
|
|
bootstrap.WithLogger(logger),
|
|
|
|
bootstrap.WithLogger(logger),
|
|
|
|
bootstrap.WithCABundle(caBundle),
|
|
|
|
bootstrap.WithCABundle(caBundle),
|
|
|
|