From 3c95eb85dbad1a970b3bb1f0f2e1152c944a159a Mon Sep 17 00:00:00 2001 From: Anton Kuznetcov Date: Tue, 28 Oct 2025 14:33:40 +0600 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=20=D0=B2=D0=B5=D1=82=D0=BA?= =?UTF-8?q?=D0=B5=20main?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERSION.txt | 2 +- config/config.go | 9 +++++++++ deploy/VERSION.txt | 2 +- kustomize/configmap.yaml | 2 +- kustomize/deployment.yaml | 6 +++--- kustomize/ingress-route.yaml | 2 +- kustomize/kustomization.yaml | 4 ++-- kustomize/service.yaml | 4 ++-- main.go | 3 +++ 9 files changed, 23 insertions(+), 11 deletions(-) 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 {