1
0
mirror of synced 2026-02-06 19:05:55 +00:00

Add cluster-domain option for bootstrap command

Signed-off-by: Léopold Jacquot <leopold.jacquot@infomaniak.com>
This commit is contained in:
Léopold Jacquot
2020-12-12 16:11:55 +01:00
parent b6c63a1aa4
commit 4d7df52dbe
8 changed files with 31 additions and 0 deletions

View File

@@ -59,6 +59,7 @@ var (
bootstrapLogLevel = flags.LogLevel(defaults.LogLevel)
bootstrapRequiredComponents = []string{"source-controller", "kustomize-controller"}
bootstrapTokenAuth bool
bootstrapClusterDomain string
)
const (
@@ -87,6 +88,7 @@ func init() {
"when enabled, the personal access token will be used instead of SSH deploy key")
bootstrapCmd.PersistentFlags().Var(&bootstrapLogLevel, "log-level", bootstrapLogLevel.Description())
bootstrapCmd.PersistentFlags().StringVar(&bootstrapManifestsPath, "manifests", "", "path to the manifest directory")
bootstrapCmd.PersistentFlags().StringVar(&bootstrapClusterDomain, "cluster-domain", "cluster.local", "internal cluster domain")
bootstrapCmd.PersistentFlags().MarkHidden("manifests")
rootCmd.AddCommand(bootstrapCmd)
}
@@ -121,6 +123,7 @@ func generateInstallManifests(targetPath, namespace, tmpDir string, localManifes
ManifestFile: defaults.ManifestFile,
Timeout: timeout,
TargetPath: targetPath,
ClusterDomain: bootstrapClusterDomain,
}
if localManifests == "" {

View File

@@ -64,6 +64,7 @@ var (
installNetworkPolicy bool
installArch = flags.Arch(defaults.Arch)
installLogLevel = flags.LogLevel(defaults.LogLevel)
installClusterDomain string
)
func init() {
@@ -89,6 +90,7 @@ func init() {
installCmd.Flags().Var(&installLogLevel, "log-level", installLogLevel.Description())
installCmd.Flags().BoolVar(&installNetworkPolicy, "network-policy", defaults.NetworkPolicy,
"deny ingress access to the toolkit controllers from other namespaces using network policies")
installCmd.Flags().StringVar(&installClusterDomain, "cluster-domain", defaults.ClusterDomain, "internal cluster domain")
rootCmd.AddCommand(installCmd)
}