diff --git a/controllers/v1beta2/build_controller.go b/controllers/v1beta2/build_controller.go index 67550833..c33d0ded 100644 --- a/controllers/v1beta2/build_controller.go +++ b/controllers/v1beta2/build_controller.go @@ -75,6 +75,7 @@ type LagoonBuildReconciler struct { LagoonFeatureFlags map[string]string LagoonAPIConfiguration helpers.LagoonAPIConfiguration ProxyConfig ProxyConfig + UnauthenticatedRegistry string } // BackupConfig holds all the backup configuration settings diff --git a/controllers/v1beta2/build_helpers.go b/controllers/v1beta2/build_helpers.go index 9b903cb8..1d07dc85 100644 --- a/controllers/v1beta2/build_helpers.go +++ b/controllers/v1beta2/build_helpers.go @@ -508,7 +508,7 @@ func (r *LagoonBuildReconciler) processBuild(ctx context.Context, opLog logr.Log }) podEnvs = append(podEnvs, corev1.EnvVar{ Name: "REGISTRY", - Value: lagoonBuild.Spec.Project.Registry, + Value: r.UnauthenticatedRegistry, }) // this is enabled by default for now // eventually will be disabled by default because support for the generation/modification of this will diff --git a/main.go b/main.go index 65624be8..c722dc09 100644 --- a/main.go +++ b/main.go @@ -924,6 +924,7 @@ func main() { HTTPSProxy: httpsProxy, NoProxy: noProxy, }, + UnauthenticatedRegistry: unauthenticatedRegistry, }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "LagoonBuild") os.Exit(1)