Skip to content

Commit 0f1e891

Browse files
authored
In default buildless mode do not use default registry (#2113)
1 parent a8b0e7c commit 0f1e891

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

components/operator/internal/state/registry.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,14 @@ func setExternalRegistryConfig(ctx context.Context, r *reconciler, s *systemStat
131131
}
132132

133133
func setK3dRegistryConfig(s *systemState) {
134-
s.instance.Status.DockerRegistry = v1alpha1.DefaultServerAddress
134+
if isLegacyEnabled(s.instance.Annotations) {
135+
s.instance.Status.DockerRegistry = v1alpha1.DefaultServerAddress
136+
}
135137
s.flagsBuilder.WithRegistryEnableInternal(
136138
getEnableInternal(s.instance.Spec.DockerRegistry),
137139
).WithRegistryAddresses(
138140
v1alpha1.DefaultRegistryAddress,
139-
s.instance.Status.DockerRegistry,
141+
v1alpha1.DefaultServerAddress,
140142
)
141143
}
142144

components/operator/internal/state/registry_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ func Test_sFnRegistryConfiguration(t *testing.T) {
167167
instance: v1alpha1.Serverless{
168168
ObjectMeta: metav1.ObjectMeta{
169169
Namespace: "some-namespace",
170+
Annotations: map[string]string{
171+
buildlessModeAnnotation: buildlessModeDisabled,
172+
},
170173
},
171174
Spec: v1alpha1.ServerlessSpec{
172175
DockerRegistry: &v1alpha1.DockerRegistry{

0 commit comments

Comments
 (0)