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:
3 files changed
+34
No files matched your search
@@ -1190,6 +1190,23 @@ func getGlobalLetsencryptEmailStag() string {
|
|||||||
return common.PropertyGetDefault("scheduler-k3s", "--global", "letsencrypt-email-stag", "")
|
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 {
|
func getNamespace(appName string) string {
|
||||||
return common.PropertyGetDefault("scheduler-k3s", appName, "namespace", "")
|
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-ingress-class": reportGlobalIngressClass,
|
||||||
"--scheduler-k3s-global-letsencrypt-email-prod": reportGlobalLetsencryptEmailProd,
|
"--scheduler-k3s-global-letsencrypt-email-prod": reportGlobalLetsencryptEmailProd,
|
||||||
"--scheduler-k3s-global-letsencrypt-email-stag": reportGlobalLetsencryptEmailStag,
|
"--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-computed-namespace": reportComputedNamespace,
|
||||||
"--scheduler-k3s-namespace": reportNamespace,
|
"--scheduler-k3s-namespace": reportNamespace,
|
||||||
"--scheduler-k3s-global-namespace": reportGlobalNamespace,
|
"--scheduler-k3s-global-namespace": reportGlobalNamespace,
|
||||||
@@ -148,6 +151,18 @@ func reportGlobalLetsencryptEmailStag(appName string) string {
|
|||||||
return getGlobalLetsencryptEmailStag()
|
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 {
|
func reportComputedNamespace(appName string) string {
|
||||||
return getComputedNamespace(appName)
|
return getComputedNamespace(appName)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ var (
|
|||||||
DefaultProperties = map[string]string{
|
DefaultProperties = map[string]string{
|
||||||
"deploy-timeout": "",
|
"deploy-timeout": "",
|
||||||
"letsencrypt-server": "",
|
"letsencrypt-server": "",
|
||||||
|
"kustomize-root-path": "",
|
||||||
"image-pull-secrets": "",
|
"image-pull-secrets": "",
|
||||||
"namespace": "",
|
"namespace": "",
|
||||||
"rollback-on-failure": "",
|
"rollback-on-failure": "",
|
||||||
@@ -33,6 +34,7 @@ var (
|
|||||||
"ingress-class": true,
|
"ingress-class": true,
|
||||||
"kube-context": true,
|
"kube-context": true,
|
||||||
"kubeconfig-path": true,
|
"kubeconfig-path": true,
|
||||||
|
"kustomize-root-path": true,
|
||||||
"letsencrypt-server": true,
|
"letsencrypt-server": true,
|
||||||
"letsencrypt-email-prod": true,
|
"letsencrypt-email-prod": true,
|
||||||
"letsencrypt-email-stag": true,
|
"letsencrypt-email-stag": true,
|
||||||
|
|||||||
Reference in new issue
Block a user