Skip to content

Commit 8c30e7c

Browse files
authored
Merge pull request #298 from vshn/update-appuio-registry
Set image registry and repository
2 parents 5bfb2b4 + b1ecaca commit 8c30e7c

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

pkg/comp-functions/functions/vshnkeycloak/deploy.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,6 @@ func newValues(ctx context.Context, svc *runtime.ServiceRuntime, comp *vshnv1.VS
332332
"--spi-events-listener-jboss-logging-success-level=info",
333333
"--spi-events-listener-jboss-logging-error-level=warn",
334334
},
335-
"image": map[string]any{
336-
"repository": "docker-registry.inventage.com:10121/keycloak-competence-center/keycloak-managed",
337-
},
338335
"database": map[string]any{
339336
"hostname": string(cd[vshnpostgres.PostgresqlHost]),
340337
"port": string(cd[vshnpostgres.PostgresqlPort]),
@@ -398,6 +395,12 @@ func newValues(ctx context.Context, svc *runtime.ServiceRuntime, comp *vshnv1.VS
398395
"podAnnotations": podAnnotations,
399396
}
400397

398+
if svc.Config.Data["imageRegistry"] != "" {
399+
values["image"] = map[string]interface{}{
400+
"repository": svc.Config.Data["imageRegistry"],
401+
}
402+
}
403+
401404
jsonned, _ := json.Marshal(values)
402405
fmt.Println(string(jsonned))
403406

pkg/comp-functions/functions/vshnmariadb/mariadb_deploy.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ func newValues(ctx context.Context, svc *runtime.ServiceRuntime, comp *vshnv1.VS
226226
},
227227
}
228228

229+
if svc.Config.Data["imageRegistry"] != "" {
230+
values["image"] = map[string]interface{}{
231+
"registry": svc.Config.Data["imageRegistry"],
232+
}
233+
}
234+
229235
return values, nil
230236
}
231237

pkg/comp-functions/functions/vshnminio/minio_deploy.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ func createObjectHelmRelease(ctx context.Context, comp *vshnv1.VSHNMinio, svc *r
139139
},
140140
}
141141

142+
if svc.Config.Data["imageRegistry"] != "" {
143+
values["image"] = map[string]interface{}{
144+
"registry": svc.Config.Data["imageRegistry"],
145+
}
146+
}
147+
142148
vb, err := json.Marshal(values)
143149
if err != nil {
144150
err = fmt.Errorf("cannot marshal helm values: %w", err)

pkg/comp-functions/functions/vshnnextcloud/deploy.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,12 @@ func newValues(ctx context.Context, svc *runtime.ServiceRuntime, comp *vshnv1.VS
369369
},
370370
}
371371

372+
if svc.Config.Data["imageRegistry"] != "" {
373+
values["image"] = map[string]interface{}{
374+
"repository": svc.Config.Data["imageRegistry"],
375+
}
376+
}
377+
372378
return values, nil
373379
}
374380

0 commit comments

Comments
 (0)