diff --git a/VERSION.txt b/VERSION.txt index c2f6de9..cea0e15 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -v2.0.5 +v2.0.6 diff --git a/config/config.go b/config/config.go index 0544633..d2237f3 100644 --- a/config/config.go +++ b/config/config.go @@ -68,6 +68,15 @@ type ValidationConfig struct { MaxExplanationLength int } +func GetEnvBool(key string, defaultValue bool) bool { + if value, exists := os.LookupEnv(key); exists { + if boolValue, err := strconv.ParseBool(value); err == nil { + return boolValue + } + } + return defaultValue +} + func getEnv(key, defaultValue string) string { if value, exists := os.LookupEnv(key); exists { return value diff --git a/deploy/VERSION.txt b/deploy/VERSION.txt index c2f6de9..cea0e15 100644 --- a/deploy/VERSION.txt +++ b/deploy/VERSION.txt @@ -1 +1 @@ -v2.0.5 +v2.0.6 diff --git a/kustomize/configmap.yaml b/kustomize/configmap.yaml index 0b6da9f..34ff390 100644 --- a/kustomize/configmap.yaml +++ b/kustomize/configmap.yaml @@ -5,7 +5,7 @@ metadata: namespace: lcg data: # Основные настройки - LCG_VERSION: "v2.0.5" + LCG_VERSION: "v2.0.6" LCG_BASE_PATH: "/lcg" LCG_SERVER_HOST: "0.0.0.0" LCG_SERVER_PORT: "8080" diff --git a/kustomize/deployment.yaml b/kustomize/deployment.yaml index 8d7f13e..c13d947 100644 --- a/kustomize/deployment.yaml +++ b/kustomize/deployment.yaml @@ -5,7 +5,7 @@ metadata: namespace: lcg labels: app: lcg - version: v2.0.5 + version: v2.0.6 spec: replicas: 1 selector: @@ -15,11 +15,11 @@ spec: metadata: labels: app: lcg - version: v2.0.5 + version: v2.0.6 spec: containers: - name: lcg - image: kuznetcovay/lcg:v2.0.5 + image: kuznetcovay/lcg:v2.0.6 imagePullPolicy: Always ports: - containerPort: 8080 diff --git a/kustomize/ingress-route.yaml b/kustomize/ingress-route.yaml index cfda849..633a0b0 100644 --- a/kustomize/ingress-route.yaml +++ b/kustomize/ingress-route.yaml @@ -5,7 +5,7 @@ metadata: namespace: lcg labels: app: lcg - version: v2.0.5 + version: v2.0.6 spec: entryPoints: - websecure diff --git a/kustomize/kustomization.yaml b/kustomize/kustomization.yaml index 6a4deb4..7cf8102 100644 --- a/kustomize/kustomization.yaml +++ b/kustomize/kustomization.yaml @@ -15,11 +15,11 @@ resources: # Common labels commonLabels: app: lcg - version: v2.0.5 + version: v2.0.6 managed-by: kustomize # Images images: - name: lcg newName: kuznetcovay/lcg - newTag: v2.0.5 + newTag: v2.0.6 diff --git a/kustomize/service.yaml b/kustomize/service.yaml index d77504c..0c7ddbe 100644 --- a/kustomize/service.yaml +++ b/kustomize/service.yaml @@ -5,7 +5,7 @@ metadata: namespace: lcg labels: app: lcg - version: v2.0.5 + version: v2.0.6 spec: type: ClusterIP ports: @@ -15,4 +15,4 @@ spec: name: http selector: app: lcg - version: v2.0.5 + version: v2.0.6 diff --git a/main.go b/main.go index be73063..be28cac 100644 --- a/main.go +++ b/main.go @@ -156,6 +156,9 @@ lcg [опции] <описание команды> Debug: c.Bool("debug"), } disableHistory = config.AppConfig.MainFlags.NoHistory || config.AppConfig.IsNoHistoryEnabled() + + config.AppConfig.MainFlags.Debug = config.AppConfig.MainFlags.Debug || config.GetEnvBool("LCG_DEBUG", false) + args := c.Args().Slice() if len(args) == 0 {