feat: add the ability to specify a kustomize-root-path
This will default to `config/kustomize`, though may change to `.dokku/kustomize` in the future.
This commit is contained in:
@@ -1190,6 +1190,23 @@ func getGlobalLetsencryptEmailStag() string {
|
||||
return common.PropertyGetDefault("scheduler-k3s", "--global", "letsencrypt-email-stag", "")
|
||||
}
|
||||
|
||||
func getKustomizeRootPath(appName string) string {
|
||||
return common.PropertyGetDefault("scheduler-k3s", appName, "kustomize-root-path", "")
|
||||
}
|
||||
|
||||
func getGlobalKustomizeRootPath() string {
|
||||
return common.PropertyGetDefault("scheduler-k3s", "--global", "kustomize-root-path", "config/kustomize")
|
||||
}
|
||||
|
||||
func getComputedKustomizeRootPath(appName string) string {
|
||||
kustomizeRootPath := getKustomizeRootPath(appName)
|
||||
if kustomizeRootPath == "" {
|
||||
kustomizeRootPath = getGlobalKustomizeRootPath()
|
||||
}
|
||||
|
||||
return kustomizeRootPath
|
||||
}
|
||||
|
||||
func getNamespace(appName string) string {
|
||||
return common.PropertyGetDefault("scheduler-k3s", appName, "namespace", "")
|
||||
}
|
||||
|
||||
@@ -28,6 +28,9 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
|
||||
"--scheduler-k3s-global-ingress-class": reportGlobalIngressClass,
|
||||
"--scheduler-k3s-global-letsencrypt-email-prod": reportGlobalLetsencryptEmailProd,
|
||||
"--scheduler-k3s-global-letsencrypt-email-stag": reportGlobalLetsencryptEmailStag,
|
||||
"--scheduler-k3s-computed-kustomize-root-path": reportComputedKustomizeRootPath,
|
||||
"--scheduler-k3s-kustomize-root-path": reportKustomizeRootPath,
|
||||
"--scheduler-k3s-global-kustomize-root-path": reportGlobalKustomizeRootPath,
|
||||
"--scheduler-k3s-computed-namespace": reportComputedNamespace,
|
||||
"--scheduler-k3s-namespace": reportNamespace,
|
||||
"--scheduler-k3s-global-namespace": reportGlobalNamespace,
|
||||
@@ -148,6 +151,18 @@ func reportGlobalLetsencryptEmailStag(appName string) string {
|
||||
return getGlobalLetsencryptEmailStag()
|
||||
}
|
||||
|
||||
func reportComputedKustomizeRootPath(appName string) string {
|
||||
return getComputedKustomizeRootPath(appName)
|
||||
}
|
||||
|
||||
func reportKustomizeRootPath(appName string) string {
|
||||
return getKustomizeRootPath(appName)
|
||||
}
|
||||
|
||||
func reportGlobalKustomizeRootPath(appName string) string {
|
||||
return getGlobalKustomizeRootPath()
|
||||
}
|
||||
|
||||
func reportComputedNamespace(appName string) string {
|
||||
return getComputedNamespace(appName)
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ var (
|
||||
DefaultProperties = map[string]string{
|
||||
"deploy-timeout": "",
|
||||
"letsencrypt-server": "",
|
||||
"kustomize-root-path": "",
|
||||
"image-pull-secrets": "",
|
||||
"namespace": "",
|
||||
"rollback-on-failure": "",
|
||||
@@ -33,6 +34,7 @@ var (
|
||||
"ingress-class": true,
|
||||
"kube-context": true,
|
||||
"kubeconfig-path": true,
|
||||
"kustomize-root-path": true,
|
||||
"letsencrypt-server": true,
|
||||
"letsencrypt-email-prod": true,
|
||||
"letsencrypt-email-stag": true,
|
||||
|
||||
Reference in New Issue
Block a user