Skip to content

Commit

Permalink
Merge pull request #298 from vshn/update-appuio-registry
Browse files Browse the repository at this point in the history
Set image registry and repository
  • Loading branch information
wejdross authored Jan 28, 2025
2 parents 5bfb2b4 + b1ecaca commit 8c30e7c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/comp-functions/functions/vshnkeycloak/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,6 @@ func newValues(ctx context.Context, svc *runtime.ServiceRuntime, comp *vshnv1.VS
"--spi-events-listener-jboss-logging-success-level=info",
"--spi-events-listener-jboss-logging-error-level=warn",
},
"image": map[string]any{
"repository": "docker-registry.inventage.com:10121/keycloak-competence-center/keycloak-managed",
},
"database": map[string]any{
"hostname": string(cd[vshnpostgres.PostgresqlHost]),
"port": string(cd[vshnpostgres.PostgresqlPort]),
Expand Down Expand Up @@ -398,6 +395,12 @@ func newValues(ctx context.Context, svc *runtime.ServiceRuntime, comp *vshnv1.VS
"podAnnotations": podAnnotations,
}

if svc.Config.Data["imageRegistry"] != "" {
values["image"] = map[string]interface{}{
"repository": svc.Config.Data["imageRegistry"],
}
}

jsonned, _ := json.Marshal(values)
fmt.Println(string(jsonned))

Expand Down
6 changes: 6 additions & 0 deletions pkg/comp-functions/functions/vshnmariadb/mariadb_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,12 @@ func newValues(ctx context.Context, svc *runtime.ServiceRuntime, comp *vshnv1.VS
},
}

if svc.Config.Data["imageRegistry"] != "" {
values["image"] = map[string]interface{}{
"registry": svc.Config.Data["imageRegistry"],
}
}

return values, nil
}

Expand Down
6 changes: 6 additions & 0 deletions pkg/comp-functions/functions/vshnminio/minio_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ func createObjectHelmRelease(ctx context.Context, comp *vshnv1.VSHNMinio, svc *r
},
}

if svc.Config.Data["imageRegistry"] != "" {
values["image"] = map[string]interface{}{
"registry": svc.Config.Data["imageRegistry"],
}
}

vb, err := json.Marshal(values)
if err != nil {
err = fmt.Errorf("cannot marshal helm values: %w", err)
Expand Down
6 changes: 6 additions & 0 deletions pkg/comp-functions/functions/vshnnextcloud/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,12 @@ func newValues(ctx context.Context, svc *runtime.ServiceRuntime, comp *vshnv1.VS
},
}

if svc.Config.Data["imageRegistry"] != "" {
values["image"] = map[string]interface{}{
"repository": svc.Config.Data["imageRegistry"],
}
}

return values, nil
}

Expand Down

0 comments on commit 8c30e7c

Please sign in to comment.