Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set image registry and repository #298

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"] != "" {
zugao marked this conversation as resolved.
Show resolved Hide resolved
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
Loading