feat(v0.1.59): in-cluster registry:2 — insecure HTTP mode, ImageExists error handling

This commit is contained in:
Naeel
2026-03-23 06:41:30 +03:00
parent 9edd43edc5
commit c033adec11
6 changed files with 143 additions and 79 deletions
+10
View File
@@ -40,6 +40,11 @@ type Config struct {
// Создаётся через hack/create-registry-secret.sh
RegistrySecret string
// RegistryInsecure — использовать HTTP (без TLS) для registry.
// Нужно для in-cluster registry:2 где нет сертификата.
// Включается через REGISTRY_INSECURE=true.
RegistryInsecure bool
// BuilderImage — образ для сборки функций (kaniko или buildah)
BuilderImage string
@@ -128,6 +133,11 @@ func Load() (*Config, error) {
cfg.RegistrySecret = "sless-registry-auth"
}
// REGISTRY_INSECURE=true — использовать HTTP вместо HTTPS для registry (in-cluster registry:2)
if os.Getenv("REGISTRY_INSECURE") == "true" {
cfg.RegistryInsecure = true
}
// Опциональные параметры с дефолтами
if v := os.Getenv("BUILDER_IMAGE"); v != "" {
cfg.BuilderImage = v