Skip to content

Commit 07b95d4

Browse files
author
Simon Emms
committed
[installer]: give the RepoName function access to the config
1 parent 8f10490 commit 07b95d4

File tree

33 files changed

+148
-63
lines changed

33 files changed

+148
-63
lines changed

install/installer/cmd/mirror_list.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ func generateMirrorList(cfgVersion string, cfg *configv1.Config) ([]mirrorListRe
139139

140140
images = append(images, mirrorListRepo{
141141
Original: img,
142-
Target: target,
142+
Target: common.RepoName("", target, &configv1.Config{
143+
Repository: targetRepo,
144+
}),
143145
})
144146
}
145147

install/installer/pkg/common/ca.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func InternalCAContainer(ctx *RenderContext, mod ...func(*corev1.Container)) *co
3939
res := &corev1.Container{
4040
Name: "update-ca-certificates",
4141
// It's not possible to use images based on alpine due to errors running update-ca-certificates
42-
Image: ImageName(ctx.Config.Repository, "ca-updater", ctx.VersionManifest.Components.CAUpdater.Version),
42+
Image: ImageName(ctx.Config.Repository, "ca-updater", ctx.VersionManifest.Components.CAUpdater.Version, &ctx.Config),
4343
ImagePullPolicy: corev1.PullIfNotPresent,
4444
Command: []string{
4545
"bash", "-c",

install/installer/pkg/common/common.go

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ func DatabaseEnv(cfg *config.Config) (res []corev1.EnvVar) {
248248
func DatabaseWaiterContainer(ctx *RenderContext) *corev1.Container {
249249
return &corev1.Container{
250250
Name: "database-waiter",
251-
Image: ImageName(ctx.Config.Repository, "service-waiter", ctx.VersionManifest.Components.ServiceWaiter.Version),
251+
Image: ImageName(ctx.Config.Repository, "service-waiter", ctx.VersionManifest.Components.ServiceWaiter.Version, &ctx.Config),
252252
Args: []string{
253253
"-v",
254254
"database",
@@ -266,7 +266,7 @@ func DatabaseWaiterContainer(ctx *RenderContext) *corev1.Container {
266266
func MessageBusWaiterContainer(ctx *RenderContext) *corev1.Container {
267267
return &corev1.Container{
268268
Name: "msgbus-waiter",
269-
Image: ImageName(ctx.Config.Repository, "service-waiter", ctx.VersionManifest.Components.ServiceWaiter.Version),
269+
Image: ImageName(ctx.Config.Repository, "service-waiter", ctx.VersionManifest.Components.ServiceWaiter.Version, &ctx.Config),
270270
Args: []string{
271271
"-v",
272272
"messagebus",
@@ -284,7 +284,7 @@ func MessageBusWaiterContainer(ctx *RenderContext) *corev1.Container {
284284
func KubeRBACProxyContainer(ctx *RenderContext) *corev1.Container {
285285
return &corev1.Container{
286286
Name: "kube-rbac-proxy",
287-
Image: ImageName(ThirdPartyContainerRepo(ctx.Config.Repository, KubeRBACProxyRepo), KubeRBACProxyImage, KubeRBACProxyTag),
287+
Image: ImageName(ThirdPartyContainerRepo(ctx.Config.Repository, KubeRBACProxyRepo), KubeRBACProxyImage, KubeRBACProxyTag, &ctx.Config),
288288
Args: []string{
289289
"--v=5",
290290
"--logtostderr",
@@ -339,7 +339,7 @@ func Affinity(orLabels ...string) *corev1.Affinity {
339339
}
340340
}
341341

342-
func RepoName(repo, name string) string {
342+
func RepoName(repo, name string, cfg *config.Config) string {
343343
var ref string
344344
if repo == "" {
345345
ref = name
@@ -350,11 +350,26 @@ func RepoName(repo, name string) string {
350350
if err != nil {
351351
panic(fmt.Sprintf("cannot parse image repo %s: %v", ref, err))
352352
}
353-
return pref.String()
353+
354+
prefString := pref.String()
355+
356+
if cfg.Repository != GitpodContainerRegistry {
357+
// If not in the Gitpod registry, don't use namespaces unless specified in the config.
358+
// This is to match the KOTS registry format of no namespace in the name
359+
s := strings.Split(prefString, "/")
360+
361+
noNamespace := []string{
362+
cfg.Repository,
363+
s[len(s)-1],
364+
}
365+
return strings.Join(noNamespace, "/")
366+
}
367+
368+
return prefString
354369
}
355370

356-
func ImageName(repo, name, tag string) string {
357-
ref := fmt.Sprintf("%s:%s", RepoName(repo, name), tag)
371+
func ImageName(repo, name, tag string, cfg *config.Config) string {
372+
ref := fmt.Sprintf("%s:%s", RepoName(repo, name, cfg), tag)
358373
pref, err := reference.ParseNamed(ref)
359374
if err != nil {
360375
panic(fmt.Sprintf("cannot parse image ref %s: %v", ref, err))

install/installer/pkg/common/common_test.go

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
package common_test
66

77
import (
8-
"github.com/gitpod-io/gitpod/installer/pkg/common"
98
"testing"
109

10+
"github.com/gitpod-io/gitpod/installer/pkg/common"
11+
"github.com/gitpod-io/gitpod/installer/pkg/config/v1"
12+
1113
"github.com/google/go-cmp/cmp"
1214
)
1315

@@ -20,6 +22,7 @@ func TestRepoName(t *testing.T) {
2022
Repo string
2123
Name string
2224
Expectation Expectation
25+
CfgRepo string
2326
}{
2427
{
2528
Name: "gitpod-io/workspace-full",
@@ -41,6 +44,54 @@ func TestRepoName(t *testing.T) {
4144
Panics: true,
4245
},
4346
},
47+
// Custom repo, no namespace
48+
{
49+
Name: "gitpod-io/workspace-full",
50+
Expectation: Expectation{
51+
Result: "some.registry.com/workspace-full",
52+
},
53+
CfgRepo: "some.registry.com",
54+
},
55+
{
56+
Repo: "some-repo.com",
57+
Name: "some-image",
58+
Expectation: Expectation{
59+
Result: "some.registry.com/some-image",
60+
},
61+
CfgRepo: "some.registry.com",
62+
},
63+
{
64+
Repo: "some-repo",
65+
Name: "not@avalid#image-name",
66+
Expectation: Expectation{
67+
Panics: true,
68+
},
69+
CfgRepo: "some.registry.com",
70+
},
71+
// Custom repo, namespace
72+
{
73+
Name: "gitpod-io/workspace-full",
74+
Expectation: Expectation{
75+
Result: "some.registry.com/gitpod/workspace-full",
76+
},
77+
CfgRepo: "some.registry.com/gitpod",
78+
},
79+
{
80+
Repo: "some-repo.com",
81+
Name: "some-image",
82+
Expectation: Expectation{
83+
Result: "some.registry.com/gitpod/some-image",
84+
},
85+
CfgRepo: "some.registry.com/gitpod",
86+
},
87+
{
88+
Repo: "some-repo",
89+
Name: "not@avalid#image-name",
90+
Expectation: Expectation{
91+
Panics: true,
92+
},
93+
CfgRepo: "some.registry.com/gitpod",
94+
},
4495
}
4596

4697
for _, test := range tests {
@@ -52,7 +103,16 @@ func TestRepoName(t *testing.T) {
52103
act.Panics = true
53104
}
54105
}()
55-
act.Result = common.RepoName(test.Repo, test.Name)
106+
cfg := config.Config{
107+
Repository: func() string {
108+
if test.CfgRepo == "" {
109+
return common.GitpodContainerRegistry
110+
}
111+
112+
return test.CfgRepo
113+
}(),
114+
}
115+
act.Result = common.RepoName(test.Repo, test.Name, &cfg)
56116
}()
57117

58118
if diff := cmp.Diff(test.Expectation, act); diff != "" {

install/installer/pkg/components/agent-smith/daemonset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func daemonset(ctx *common.RenderContext) ([]runtime.Object, error) {
5151
TerminationGracePeriodSeconds: pointer.Int64(30),
5252
Containers: []corev1.Container{{
5353
Name: Component,
54-
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.AgentSmith.Version),
54+
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.AgentSmith.Version, &ctx.Config),
5555
ImagePullPolicy: corev1.PullIfNotPresent,
5656
Args: []string{"run", "--config", "/config/config.json"},
5757
Resources: corev1.ResourceRequirements{

install/installer/pkg/components/blobserve/configmap.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
3535
Port: ContainerPort,
3636
Timeout: util.Duration(time.Second * 5),
3737
Repos: map[string]blobserve.Repo{
38-
common.RepoName(ctx.Config.Repository, ide.CodeIDEImage): {
38+
common.RepoName(ctx.Config.Repository, ide.CodeIDEImage, &ctx.Config): {
3939
PrePull: []string{},
4040
Workdir: "/ide",
4141
Replacements: []blobserve.StringReplacement{{
@@ -88,7 +88,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
8888
Replacement: "${supervisor}",
8989
}},
9090
},
91-
common.RepoName(ctx.Config.Repository, workspace.SupervisorImage): {
91+
common.RepoName(ctx.Config.Repository, workspace.SupervisorImage, &ctx.Config): {
9292
PrePull: []string{},
9393
Workdir: "/.supervisor/frontend",
9494
},

install/installer/pkg/components/blobserve/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
9494
Containers: []corev1.Container{{
9595
Name: Component,
9696
Args: []string{"run", "/mnt/config/config.json"},
97-
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.Blobserve.Version),
97+
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.Blobserve.Version, &ctx.Config),
9898
ImagePullPolicy: corev1.PullIfNotPresent,
9999
Ports: []corev1.ContainerPort{{
100100
Name: ServicePortName,

install/installer/pkg/components/content-service/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
4141
}},
4242
Containers: []corev1.Container{{
4343
Name: Component,
44-
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.ContentService.Version),
44+
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.ContentService.Version, &ctx.Config),
4545
ImagePullPolicy: corev1.PullIfNotPresent,
4646
Args: []string{
4747
"run",

install/installer/pkg/components/dashboard/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
4848
TerminationGracePeriodSeconds: pointer.Int64(30),
4949
Containers: []corev1.Container{{
5050
Name: Component,
51-
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.Dashboard.Version),
51+
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.Dashboard.Version, &ctx.Config),
5252
ImagePullPolicy: corev1.PullIfNotPresent,
5353
Resources: corev1.ResourceRequirements{
5454
Requests: corev1.ResourceList{

install/installer/pkg/components/database/cloudsql/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
6565
Privileged: pointer.Bool(false),
6666
RunAsNonRoot: pointer.Bool(false),
6767
},
68-
Image: common.ImageName(ImageRepo, ImageName, ImageVersion),
68+
Image: common.ImageName(ImageRepo, ImageName, ImageVersion, &ctx.Config),
6969
Command: []string{
7070
"/cloud_sql_proxy",
7171
"-dir=/cloudsql",

install/installer/pkg/components/database/incluster/helm.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ var Helm = common.CompositeHelmFunc(
3434
helm.KeyValue("mysql.initdbScriptsConfigMap", SQLInitScripts),
3535
helm.KeyValue("mysql.serviceAccount.name", Component),
3636
helm.ImagePullSecrets("mysql.image.pullSecrets", cfg),
37-
helm.KeyValue("mysql.image.registry", common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL)),
37+
helm.KeyValue("mysql.image.registry", ""),
38+
helm.KeyValue("mysql.image.repository", common.RepoName(common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL), "bitnami/mysql", &cfg.Config)),
3839
helm.ImagePullSecrets("mysql.metrics.image.pullSecrets", cfg),
39-
helm.KeyValue("mysql.metrics.image.registry", common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL)),
40+
helm.KeyValue("mysql.metrics.image.registry", ""),
41+
helm.KeyValue("mysql.metrics.image.repository", common.RepoName(common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL), "bitnami/mysqld-exporter", &cfg.Config)),
4042
helm.ImagePullSecrets("mysql.volumePermissions.image.pullSecrets", cfg),
4143
helm.KeyValue("mysql.volumePermissions.image.pullPolicy", "IfNotPresent"),
42-
helm.KeyValue("mysql.volumePermissions.image.registry", common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL)),
44+
helm.KeyValue("mysql.volumePermissions.image.registry", ""),
45+
helm.KeyValue("mysql.volumePermissions.image.repository", common.RepoName(common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL), "bitnami/bitnami-shell", &cfg.Config)),
4346

4447
// improve start time
4548
helm.KeyValue("mysql.primary.startupProbe.enabled", "false"),

install/installer/pkg/components/database/init/job.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func job(ctx *common.RenderContext) ([]runtime.Object, error) {
4747
InitContainers: []corev1.Container{*common.DatabaseWaiterContainer(ctx)},
4848
Containers: []corev1.Container{{
4949
Name: fmt.Sprintf("%s-session", Component),
50-
Image: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, ""), dbSessionsImage, dbSessionsTag),
50+
Image: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, ""), dbSessionsImage, dbSessionsTag, &ctx.Config),
5151
ImagePullPolicy: corev1.PullIfNotPresent,
5252
Env: common.MergeEnv(
5353
common.DatabaseEnv(&ctx.Config),

install/installer/pkg/components/docker-registry/helm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var Helm = common.CompositeHelmFunc(
2323
return nil, err
2424
}
2525

26-
repository := fmt.Sprintf("%s/library/registry", common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL))
26+
repository := common.RepoName(common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL), "library/registry", &cfg.Config)
2727

2828
registryValues := []string{
2929
helm.KeyValue(fmt.Sprintf("docker-registry.podAnnotations.%s", strings.Replace(common.AnnotationConfigChecksum, ".", "\\.", -1)), secretHash),

install/installer/pkg/components/gitpod/cronjob.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func cronjob(ctx *common.RenderContext) ([]runtime.Object, error) {
5353
Containers: []v1.Container{
5454
{
5555
Name: installationTelemetryComponent,
56-
Image: common.ImageName(ctx.Config.Repository, "installation-telemetry", ctx.VersionManifest.Components.InstallationTelemetry.Version),
56+
Image: common.ImageName(ctx.Config.Repository, "installation-telemetry", ctx.VersionManifest.Components.InstallationTelemetry.Version, &ctx.Config),
5757
ImagePullPolicy: v1.PullIfNotPresent,
5858
Args: []string{
5959
"send",

install/installer/pkg/components/ide-proxy/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
4848
TerminationGracePeriodSeconds: pointer.Int64(30),
4949
Containers: []corev1.Container{{
5050
Name: Component,
51-
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.IDEProxy.Version),
51+
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.IDEProxy.Version, &ctx.Config),
5252
ImagePullPolicy: corev1.PullIfNotPresent,
5353
Resources: corev1.ResourceRequirements{
5454
Requests: corev1.ResourceList{

install/installer/pkg/components/image-builder-mk3/configmap.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
4949
PullSecret: secretName,
5050
PullSecretFile: PullSecretFile,
5151
BaseImageRepository: fmt.Sprintf("%s/base-images", registryName),
52-
BuilderImage: common.ImageName(ctx.Config.Repository, BuilderImage, ctx.VersionManifest.Components.ImageBuilderMk3.BuilderImage.Version),
52+
BuilderImage: common.ImageName(ctx.Config.Repository, BuilderImage, ctx.VersionManifest.Components.ImageBuilderMk3.BuilderImage.Version, &ctx.Config),
5353
WorkspaceImageRepository: fmt.Sprintf("%s/workspace-images", registryName),
5454
}
5555

@@ -58,7 +58,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
5858
RefCache: config.RefCacheConfig{
5959
Interval: util.Duration(time.Hour * 6).String(),
6060
Refs: []string{
61-
common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, ""), workspace.DefaultWorkspaceImage, workspace.DefaultWorkspaceImageVersion),
61+
common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, ""), workspace.DefaultWorkspaceImage, workspace.DefaultWorkspaceImageVersion, &ctx.Config),
6262
},
6363
},
6464
Service: config.Service{

install/installer/pkg/components/image-builder-mk3/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
143143
},
144144
Containers: []corev1.Container{{
145145
Name: Component,
146-
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.ImageBuilderMk3.Version),
146+
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.ImageBuilderMk3.Version, &ctx.Config),
147147
ImagePullPolicy: corev1.PullIfNotPresent,
148148
Args: []string{
149149
"run",

install/installer/pkg/components/migrations/job.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func job(ctx *common.RenderContext) ([]runtime.Object, error) {
3737
InitContainers: []corev1.Container{*common.DatabaseWaiterContainer(ctx)},
3838
Containers: []corev1.Container{{
3939
Name: Component,
40-
Image: common.ImageName(ctx.Config.Repository, "db-migrations", ctx.VersionManifest.Components.DBMigrations.Version),
40+
Image: common.ImageName(ctx.Config.Repository, "db-migrations", ctx.VersionManifest.Components.DBMigrations.Version, &ctx.Config),
4141
ImagePullPolicy: corev1.PullIfNotPresent,
4242
Env: common.MergeEnv(
4343
common.DatabaseEnv(&ctx.Config),

install/installer/pkg/components/minio/helm.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ var Helm = common.CompositeHelmFunc(
1818
func(cfg *common.RenderContext) ([]string, error) {
1919
commonHelmValues := []string{
2020
helm.ImagePullSecrets("minio.image.pullSecrets", cfg),
21-
helm.KeyValue("minio.image.registry", common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL)),
21+
helm.KeyValue("minio.image.registry", ""),
22+
helm.KeyValue("minio.image.repository", common.RepoName(common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL), "bitnami/minio", &cfg.Config)),
2223
helm.ImagePullSecrets("minio.volumePermissions.image.pullSecrets", cfg),
23-
helm.KeyValue("minio.volumePermissions.image.registry", common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL)),
24+
helm.KeyValue("minio.volumePermissions.image.registry", ""),
25+
helm.KeyValue("minio.volumePermissions.image.repository", common.RepoName(common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL), "bitnami/bitnami-shell", &cfg.Config)),
2426
}
2527

2628
if pointer.BoolDeref(cfg.Config.ObjectStorage.InCluster, false) {

install/installer/pkg/components/openvsx-proxy/statefulset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func statefulset(ctx *common.RenderContext) ([]runtime.Object, error) {
6868
}},
6969
Containers: []v1.Container{{
7070
Name: Component,
71-
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.OpenVSXProxy.Version),
71+
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.OpenVSXProxy.Version, &ctx.Config),
7272
Args: []string{"/config/config.json"},
7373
ReadinessProbe: &v1.Probe{
7474
ProbeHandler: v1.ProbeHandler{

install/installer/pkg/components/proxy/deployment.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
130130
Volumes: volumes,
131131
InitContainers: []corev1.Container{{
132132
Name: "sysctl",
133-
Image: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, common.DockerRegistryURL), InitContainerImage, InitContainerTag),
133+
Image: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, common.DockerRegistryURL), InitContainerImage, InitContainerTag, &ctx.Config),
134134
ImagePullPolicy: corev1.PullIfNotPresent,
135135
SecurityContext: &corev1.SecurityContext{
136136
Privileged: pointer.Bool(true),
@@ -143,7 +143,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
143143
}},
144144
Containers: []corev1.Container{{
145145
Name: "kube-rbac-proxy",
146-
Image: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, KubeRBACProxyRepo), KubeRBACProxyImage, KubeRBACProxyTag),
146+
Image: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, KubeRBACProxyRepo), KubeRBACProxyImage, KubeRBACProxyTag, &ctx.Config),
147147
ImagePullPolicy: corev1.PullIfNotPresent,
148148
Args: []string{
149149
"--v=10",
@@ -178,7 +178,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
178178
},
179179
}, {
180180
Name: Component,
181-
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.Proxy.Version),
181+
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.Proxy.Version, &ctx.Config),
182182
ImagePullPolicy: corev1.PullIfNotPresent,
183183
Resources: corev1.ResourceRequirements{
184184
Requests: corev1.ResourceList{

install/installer/pkg/components/public-api-server/deployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
6161
TerminationGracePeriodSeconds: pointer.Int64(30),
6262
Containers: []corev1.Container{{
6363
Name: Component,
64-
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.PublicAPIServer.Version),
64+
Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.PublicAPIServer.Version, &ctx.Config),
6565
ImagePullPolicy: corev1.PullIfNotPresent,
6666
Resources: corev1.ResourceRequirements{
6767
Requests: corev1.ResourceList{

0 commit comments

Comments
 (0)