Compare commits

...

6 Commits

13 changed files with 40 additions and 45 deletions

View File

@@ -1 +1 @@
v2.0.6
v2.0.7

View File

@@ -17,6 +17,7 @@ data:
LCG_NO_HISTORY: "false"
LCG_ALLOW_EXECUTION: "false"
LCG_DEBUG: "true"
LCG_PROVIDER: "proxy"
# Настройки аутентификации
LCG_SERVER_REQUIRE_AUTH: "true"

View File

@@ -14,8 +14,7 @@ spec:
template:
metadata:
labels:
app: lcg
version: ${VERSION}
app: lcg
spec:
containers:
- name: lcg

View File

@@ -1 +1 @@
v2.0.6
v2.0.7

View File

@@ -4,8 +4,7 @@ metadata:
name: lcg-route
namespace: lcg
labels:
app: lcg
version: ${VERSION}
app: lcg
spec:
entryPoints:
- websecure

View File

@@ -13,13 +13,13 @@ resources:
- ingress-route.yaml
# Common labels
commonLabels:
app: lcg
version: ${VERSION}
managed-by: kustomize
# commonLabels:
# app: lcg
# version: ${VERSION}
# managed-by: kustomize
# Images
images:
- name: lcg
newName: ${REPOSITORY}
newTag: ${VERSION}
# images:
# - name: lcg
# newName: ${REPOSITORY}
# newTag: ${VERSION}

View File

@@ -4,8 +4,7 @@ metadata:
name: lcg
namespace: lcg
labels:
app: lcg
version: ${VERSION}
app: lcg
spec:
type: ClusterIP
ports:
@@ -14,5 +13,4 @@ spec:
protocol: TCP
name: http
selector:
app: lcg
version: ${VERSION}
app: lcg

View File

@@ -5,7 +5,7 @@ metadata:
namespace: lcg
data:
# Основные настройки
LCG_VERSION: "v2.0.6"
LCG_VERSION: "v2.0.7"
LCG_BASE_PATH: "/lcg"
LCG_SERVER_HOST: "0.0.0.0"
LCG_SERVER_PORT: "8080"
@@ -17,6 +17,7 @@ data:
LCG_NO_HISTORY: "false"
LCG_ALLOW_EXECUTION: "false"
LCG_DEBUG: "true"
LCG_PROVIDER: "proxy"
# Настройки аутентификации
LCG_SERVER_REQUIRE_AUTH: "true"

View File

@@ -5,7 +5,7 @@ metadata:
namespace: lcg
labels:
app: lcg
version: v2.0.6
version: v2.0.7
spec:
replicas: 1
selector:
@@ -14,12 +14,11 @@ spec:
template:
metadata:
labels:
app: lcg
version: v2.0.6
app: lcg
spec:
containers:
- name: lcg
image: kuznetcovay/lcg:v2.0.6
image: kuznetcovay/lcg:v2.0.7
imagePullPolicy: Always
ports:
- containerPort: 8080

View File

@@ -4,8 +4,7 @@ metadata:
name: lcg-route
namespace: lcg
labels:
app: lcg
version: v2.0.6
app: lcg
spec:
entryPoints:
- websecure

View File

@@ -13,13 +13,13 @@ resources:
- ingress-route.yaml
# Common labels
commonLabels:
app: lcg
version: v2.0.6
managed-by: kustomize
# commonLabels:
# app: lcg
# version: v2.0.7
# managed-by: kustomize
# Images
images:
- name: lcg
newName: kuznetcovay/lcg
newTag: v2.0.6
# images:
# - name: lcg
# newName: kuznetcovay/lcg
# newTag: v2.0.7

View File

@@ -4,8 +4,7 @@ metadata:
name: lcg
namespace: lcg
labels:
app: lcg
version: v2.0.6
app: lcg
spec:
type: ClusterIP
ports:
@@ -14,5 +13,4 @@ spec:
protocol: TCP
name: http
selector:
app: lcg
version: v2.0.6
app: lcg

17
main.go
View File

@@ -156,9 +156,12 @@ 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)
fmt.Println("Debug:", config.AppConfig.MainFlags.Debug)
fmt.Println("LCG_DEBUG:", config.GetEnvBool("LCG_DEBUG", false))
args := c.Args().Slice()
if len(args) == 0 {
@@ -178,7 +181,7 @@ lcg [опции] <описание команды>
}
}
if CompileConditions.NoServe {
if CompileConditions.NoServe {
if len(args) > 1 && args[0] == "serve" {
printColored("❌ Error: serve command is disabled in this build\n", colorRed)
os.Exit(1)
@@ -569,11 +572,9 @@ func getCommands() []*cli.Command {
host := c.String("host")
openBrowser := c.Bool("browser")
// Пробрасываем глобальный флаг debug для web-сервера
// Позволяет запускать: lcg -d serve -p ...
if c.Bool("debug") {
config.AppConfig.MainFlags.Debug = true
}
// Пробрасываем debug: флаг или переменная окружения LCG_DEBUG
// Позволяет запускать: LCG_DEBUG=1 lcg serve ... или lcg -d serve ...
config.AppConfig.MainFlags.Debug = c.Bool("debug") || config.GetEnvBool("LCG_DEBUG", false)
// Обновляем конфигурацию сервера с новыми параметрами
config.AppConfig.Server.Host = host