diff --git a/install/installer/pkg/components/agent-smith/daemonset.go b/install/installer/pkg/components/agent-smith/daemonset.go index 77feb29829d8c4..f6b5b6dd98374c 100644 --- a/install/installer/pkg/components/agent-smith/daemonset.go +++ b/install/installer/pkg/components/agent-smith/daemonset.go @@ -51,7 +51,7 @@ func daemonset(ctx *common.RenderContext) ([]runtime.Object, error) { TerminationGracePeriodSeconds: pointer.Int64(30), Containers: []corev1.Container{{ Name: Component, - Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.AgentSmith.Version), + Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.AgentSmith.Version, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, Args: []string{"run", "--config", "/config/config.json"}, Resources: corev1.ResourceRequirements{ diff --git a/install/installer/pkg/components/blobserve/configmap.go b/install/installer/pkg/components/blobserve/configmap.go index bf63eeec5704c1..caa2e0141c00d4 100644 --- a/install/installer/pkg/components/blobserve/configmap.go +++ b/install/installer/pkg/components/blobserve/configmap.go @@ -35,7 +35,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { Port: ContainerPort, Timeout: util.Duration(time.Second * 5), Repos: map[string]blobserve.Repo{ - common.RepoName(ctx.Config.Repository, ide.CodeIDEImage): { + common.RepoName(ctx.Config.Repository, ide.CodeIDEImage, &ctx.Config): { PrePull: []string{}, Workdir: "/ide", Replacements: []blobserve.StringReplacement{{ @@ -88,7 +88,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { Replacement: "${supervisor}", }}, }, - common.RepoName(ctx.Config.Repository, workspace.SupervisorImage): { + common.RepoName(ctx.Config.Repository, workspace.SupervisorImage, &ctx.Config): { PrePull: []string{}, Workdir: "/.supervisor/frontend", }, diff --git a/install/installer/pkg/components/blobserve/deployment.go b/install/installer/pkg/components/blobserve/deployment.go index dac76e434ca770..b5aec5cad76e1d 100644 --- a/install/installer/pkg/components/blobserve/deployment.go +++ b/install/installer/pkg/components/blobserve/deployment.go @@ -94,7 +94,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { Containers: []corev1.Container{{ Name: Component, Args: []string{"run", "/mnt/config/config.json"}, - Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.Blobserve.Version), + Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.Blobserve.Version, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, Ports: []corev1.ContainerPort{{ Name: ServicePortName, diff --git a/install/installer/pkg/components/content-service/deployment.go b/install/installer/pkg/components/content-service/deployment.go index e6906ad2768324..3c06374b208105 100644 --- a/install/installer/pkg/components/content-service/deployment.go +++ b/install/installer/pkg/components/content-service/deployment.go @@ -41,7 +41,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { }}, Containers: []corev1.Container{{ Name: Component, - Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.ContentService.Version), + Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.ContentService.Version, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, Args: []string{ "run", diff --git a/install/installer/pkg/components/dashboard/deployment.go b/install/installer/pkg/components/dashboard/deployment.go index 270a4bc45ac276..3ff25ac55e4e74 100644 --- a/install/installer/pkg/components/dashboard/deployment.go +++ b/install/installer/pkg/components/dashboard/deployment.go @@ -48,7 +48,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { TerminationGracePeriodSeconds: pointer.Int64(30), Containers: []corev1.Container{{ Name: Component, - Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.Dashboard.Version), + Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.Dashboard.Version, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{ diff --git a/install/installer/pkg/components/database/cloudsql/deployment.go b/install/installer/pkg/components/database/cloudsql/deployment.go index 9ed634fd38e18e..fb7c2f499a0569 100644 --- a/install/installer/pkg/components/database/cloudsql/deployment.go +++ b/install/installer/pkg/components/database/cloudsql/deployment.go @@ -65,7 +65,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { Privileged: pointer.Bool(false), RunAsNonRoot: pointer.Bool(false), }, - Image: common.ImageName(ImageRepo, ImageName, ImageVersion), + Image: common.ImageName(ImageRepo, ImageName, ImageVersion, &ctx.Config), Command: []string{ "/cloud_sql_proxy", "-dir=/cloudsql", diff --git a/install/installer/pkg/components/database/incluster/helm.go b/install/installer/pkg/components/database/incluster/helm.go index 8bb44cd1397aab..d0cdfbc0cb6bdd 100644 --- a/install/installer/pkg/components/database/incluster/helm.go +++ b/install/installer/pkg/components/database/incluster/helm.go @@ -34,12 +34,15 @@ var Helm = common.CompositeHelmFunc( helm.KeyValue("mysql.initdbScriptsConfigMap", SQLInitScripts), helm.KeyValue("mysql.serviceAccount.name", Component), helm.ImagePullSecrets("mysql.image.pullSecrets", cfg), - helm.KeyValue("mysql.image.registry", common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL)), + helm.KeyValue("mysql.image.registry", ""), + helm.KeyValue("mysql.image.repository", common.RepoName(common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL), "bitnami/mysql", &cfg.Config)), helm.ImagePullSecrets("mysql.metrics.image.pullSecrets", cfg), - helm.KeyValue("mysql.metrics.image.registry", common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL)), + helm.KeyValue("mysql.metrics.image.registry", ""), + helm.KeyValue("mysql.metrics.image.repository", common.RepoName(common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL), "bitnami/mysqld-exporter", &cfg.Config)), helm.ImagePullSecrets("mysql.volumePermissions.image.pullSecrets", cfg), helm.KeyValue("mysql.volumePermissions.image.pullPolicy", "IfNotPresent"), - helm.KeyValue("mysql.volumePermissions.image.registry", common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL)), + helm.KeyValue("mysql.volumePermissions.image.registry", ""), + helm.KeyValue("mysql.volumePermissions.image.repository", common.RepoName(common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL), "bitnami/bitnami-shell", &cfg.Config)), // improve start time helm.KeyValue("mysql.primary.startupProbe.enabled", "false"), diff --git a/install/installer/pkg/components/database/init/job.go b/install/installer/pkg/components/database/init/job.go index 4feda70b099b1d..54b317c6f8e641 100644 --- a/install/installer/pkg/components/database/init/job.go +++ b/install/installer/pkg/components/database/init/job.go @@ -47,7 +47,7 @@ func job(ctx *common.RenderContext) ([]runtime.Object, error) { InitContainers: []corev1.Container{*common.DatabaseWaiterContainer(ctx)}, Containers: []corev1.Container{{ Name: fmt.Sprintf("%s-session", Component), - Image: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, ""), dbSessionsImage, dbSessionsTag), + Image: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, ""), dbSessionsImage, dbSessionsTag, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, Env: common.MergeEnv( common.DatabaseEnv(&ctx.Config), diff --git a/install/installer/pkg/components/docker-registry/helm.go b/install/installer/pkg/components/docker-registry/helm.go index dca86783252bf4..3bcf68886ba01f 100644 --- a/install/installer/pkg/components/docker-registry/helm.go +++ b/install/installer/pkg/components/docker-registry/helm.go @@ -23,7 +23,7 @@ var Helm = common.CompositeHelmFunc( return nil, err } - repository := fmt.Sprintf("%s/library/registry", common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL)) + repository := common.RepoName(common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL), "library/registry", &cfg.Config) registryValues := []string{ helm.KeyValue(fmt.Sprintf("docker-registry.podAnnotations.%s", strings.Replace(common.AnnotationConfigChecksum, ".", "\\.", -1)), secretHash), diff --git a/install/installer/pkg/components/gitpod/cronjob.go b/install/installer/pkg/components/gitpod/cronjob.go index 0dfb8a3e80b545..88b21d2edab638 100644 --- a/install/installer/pkg/components/gitpod/cronjob.go +++ b/install/installer/pkg/components/gitpod/cronjob.go @@ -53,7 +53,7 @@ func cronjob(ctx *common.RenderContext) ([]runtime.Object, error) { Containers: []v1.Container{ { Name: installationTelemetryComponent, - Image: common.ImageName(ctx.Config.Repository, "installation-telemetry", ctx.VersionManifest.Components.InstallationTelemetry.Version), + Image: common.ImageName(ctx.Config.Repository, "installation-telemetry", ctx.VersionManifest.Components.InstallationTelemetry.Version, &ctx.Config), ImagePullPolicy: v1.PullIfNotPresent, Args: []string{ "send", diff --git a/install/installer/pkg/components/ide-proxy/deployment.go b/install/installer/pkg/components/ide-proxy/deployment.go index bf8fd4e50beb1d..150d087466227b 100644 --- a/install/installer/pkg/components/ide-proxy/deployment.go +++ b/install/installer/pkg/components/ide-proxy/deployment.go @@ -48,7 +48,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { TerminationGracePeriodSeconds: pointer.Int64(30), Containers: []corev1.Container{{ Name: Component, - Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.IDEProxy.Version), + Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.IDEProxy.Version, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{ diff --git a/install/installer/pkg/components/image-builder-mk3/configmap.go b/install/installer/pkg/components/image-builder-mk3/configmap.go index d8af2a55a2eaa8..00f697252bbbac 100644 --- a/install/installer/pkg/components/image-builder-mk3/configmap.go +++ b/install/installer/pkg/components/image-builder-mk3/configmap.go @@ -49,7 +49,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { PullSecret: secretName, PullSecretFile: PullSecretFile, BaseImageRepository: fmt.Sprintf("%s/base-images", registryName), - BuilderImage: common.ImageName(ctx.Config.Repository, BuilderImage, ctx.VersionManifest.Components.ImageBuilderMk3.BuilderImage.Version), + BuilderImage: common.ImageName(ctx.Config.Repository, BuilderImage, ctx.VersionManifest.Components.ImageBuilderMk3.BuilderImage.Version, &ctx.Config), WorkspaceImageRepository: fmt.Sprintf("%s/workspace-images", registryName), } @@ -58,7 +58,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { RefCache: config.RefCacheConfig{ Interval: util.Duration(time.Hour * 6).String(), Refs: []string{ - common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, ""), workspace.DefaultWorkspaceImage, workspace.DefaultWorkspaceImageVersion), + common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, ""), workspace.DefaultWorkspaceImage, workspace.DefaultWorkspaceImageVersion, &ctx.Config), }, }, Service: config.Service{ diff --git a/install/installer/pkg/components/image-builder-mk3/deployment.go b/install/installer/pkg/components/image-builder-mk3/deployment.go index f5132a95ef552c..a43fba147facdb 100644 --- a/install/installer/pkg/components/image-builder-mk3/deployment.go +++ b/install/installer/pkg/components/image-builder-mk3/deployment.go @@ -118,7 +118,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { }, Containers: []corev1.Container{{ Name: Component, - Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.ImageBuilderMk3.Version), + Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.ImageBuilderMk3.Version, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, Args: []string{ "run", diff --git a/install/installer/pkg/components/migrations/job.go b/install/installer/pkg/components/migrations/job.go index c96726928bf370..055fb45463455d 100644 --- a/install/installer/pkg/components/migrations/job.go +++ b/install/installer/pkg/components/migrations/job.go @@ -37,7 +37,7 @@ func job(ctx *common.RenderContext) ([]runtime.Object, error) { InitContainers: []corev1.Container{*common.DatabaseWaiterContainer(ctx)}, Containers: []corev1.Container{{ Name: Component, - Image: common.ImageName(ctx.Config.Repository, "db-migrations", ctx.VersionManifest.Components.DBMigrations.Version), + Image: common.ImageName(ctx.Config.Repository, "db-migrations", ctx.VersionManifest.Components.DBMigrations.Version, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, Env: common.MergeEnv( common.DatabaseEnv(&ctx.Config), diff --git a/install/installer/pkg/components/minio/helm.go b/install/installer/pkg/components/minio/helm.go index 62b56ae36562e7..11299da759b7d3 100644 --- a/install/installer/pkg/components/minio/helm.go +++ b/install/installer/pkg/components/minio/helm.go @@ -18,9 +18,11 @@ var Helm = common.CompositeHelmFunc( func(cfg *common.RenderContext) ([]string, error) { commonHelmValues := []string{ helm.ImagePullSecrets("minio.image.pullSecrets", cfg), - helm.KeyValue("minio.image.registry", common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL)), + helm.KeyValue("minio.image.registry", ""), + helm.KeyValue("minio.image.repository", common.RepoName(common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL), "bitnami/minio", &cfg.Config)), helm.ImagePullSecrets("minio.volumePermissions.image.pullSecrets", cfg), - helm.KeyValue("minio.volumePermissions.image.registry", common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL)), + helm.KeyValue("minio.volumePermissions.image.registry", ""), + helm.KeyValue("minio.volumePermissions.image.repository", common.RepoName(common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL), "bitnami/bitnami-shell", &cfg.Config)), } if pointer.BoolDeref(cfg.Config.ObjectStorage.InCluster, false) { diff --git a/install/installer/pkg/components/openvsx-proxy/statefulset.go b/install/installer/pkg/components/openvsx-proxy/statefulset.go index ecec29b6f8692c..c9566e6eb9b999 100644 --- a/install/installer/pkg/components/openvsx-proxy/statefulset.go +++ b/install/installer/pkg/components/openvsx-proxy/statefulset.go @@ -68,7 +68,7 @@ func statefulset(ctx *common.RenderContext) ([]runtime.Object, error) { }}, Containers: []v1.Container{{ Name: Component, - Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.OpenVSXProxy.Version), + Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.OpenVSXProxy.Version, &ctx.Config), Args: []string{"/config/config.json"}, ReadinessProbe: &v1.Probe{ ProbeHandler: v1.ProbeHandler{ diff --git a/install/installer/pkg/components/proxy/deployment.go b/install/installer/pkg/components/proxy/deployment.go index 8efd35c7c92857..c1cd7524d17687 100644 --- a/install/installer/pkg/components/proxy/deployment.go +++ b/install/installer/pkg/components/proxy/deployment.go @@ -130,7 +130,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { Volumes: volumes, InitContainers: []corev1.Container{{ Name: "sysctl", - Image: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, common.DockerRegistryURL), InitContainerImage, InitContainerTag), + Image: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, common.DockerRegistryURL), InitContainerImage, InitContainerTag, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, SecurityContext: &corev1.SecurityContext{ Privileged: pointer.Bool(true), @@ -143,7 +143,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { }}, Containers: []corev1.Container{{ Name: "kube-rbac-proxy", - Image: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, KubeRBACProxyRepo), KubeRBACProxyImage, KubeRBACProxyTag), + Image: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, KubeRBACProxyRepo), KubeRBACProxyImage, KubeRBACProxyTag, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, Args: []string{ "--v=10", @@ -178,7 +178,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { }, }, { Name: Component, - Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.Proxy.Version), + Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.Proxy.Version, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{ diff --git a/install/installer/pkg/components/rabbitmq/helm.go b/install/installer/pkg/components/rabbitmq/helm.go index 003033ff080792..0268228f79d996 100644 --- a/install/installer/pkg/components/rabbitmq/helm.go +++ b/install/installer/pkg/components/rabbitmq/helm.go @@ -196,9 +196,11 @@ var Helm = common.CompositeHelmFunc( helm.KeyValue(fmt.Sprintf("rabbitmq.extraSecrets.%s.username", InClusterDbSecret), username), helm.KeyValue(fmt.Sprintf("rabbitmq.extraSecrets.%s.password", InClusterDbSecret), password), helm.ImagePullSecrets("rabbitmq.image.pullSecrets", cfg), - helm.KeyValue("rabbitmq.image.registry", common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL)), + helm.KeyValue("rabbitmq.image.registry", ""), + helm.KeyValue("rabbitmq.image.repository", common.RepoName(common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL), "bitnami/rabbitmq", &cfg.Config)), helm.ImagePullSecrets("volumePermissions.image.pullSecrets", cfg), - helm.KeyValue("rabbitmq.volumePermissions.image.registry", common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL)), + helm.KeyValue("rabbitmq.volumePermissions.image.registry", ""), + helm.KeyValue("rabbitmq.volumePermissions.image.repository", common.RepoName(common.ThirdPartyContainerRepo(cfg.Config.Repository, common.DockerRegistryURL), "bitnami/bitnami-shell", &cfg.Config)), helm.KeyValue("rabbitmq.livenessProbe.initialDelaySeconds", "30"), }, diff --git a/install/installer/pkg/components/registry-facade/configmap.go b/install/installer/pkg/components/registry-facade/configmap.go index 2ba9d11924045c..d9041da2ae535f 100644 --- a/install/installer/pkg/components/registry-facade/configmap.go +++ b/install/installer/pkg/components/registry-facade/configmap.go @@ -71,15 +71,15 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { RequireAuth: false, StaticLayer: []regfac.StaticLayerCfg{ { - Ref: common.ImageName(ctx.Config.Repository, SupervisorImage, ctx.VersionManifest.Components.Workspace.Supervisor.Version), + Ref: common.ImageName(ctx.Config.Repository, SupervisorImage, ctx.VersionManifest.Components.Workspace.Supervisor.Version, &ctx.Config), Type: "image", }, { - Ref: common.ImageName(ctx.Config.Repository, WorkspacekitImage, ctx.VersionManifest.Components.Workspace.Workspacekit.Version), + Ref: common.ImageName(ctx.Config.Repository, WorkspacekitImage, ctx.VersionManifest.Components.Workspace.Workspacekit.Version, &ctx.Config), Type: "image", }, { - Ref: common.ImageName(ctx.Config.Repository, DockerUpImage, ctx.VersionManifest.Components.Workspace.DockerUp.Version), + Ref: common.ImageName(ctx.Config.Repository, DockerUpImage, ctx.VersionManifest.Components.Workspace.DockerUp.Version, &ctx.Config), Type: "image", }, }, diff --git a/install/installer/pkg/components/registry-facade/daemonset.go b/install/installer/pkg/components/registry-facade/daemonset.go index d972a69a7dd5ef..673fa8ec311a3c 100644 --- a/install/installer/pkg/components/registry-facade/daemonset.go +++ b/install/installer/pkg/components/registry-facade/daemonset.go @@ -179,7 +179,7 @@ func daemonset(ctx *common.RenderContext) ([]runtime.Object, error) { }, Containers: []corev1.Container{{ Name: Component, - Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.RegistryFacade.Version), + Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.RegistryFacade.Version, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, Args: []string{"run", "/mnt/config/config.json"}, Resources: corev1.ResourceRequirements{ diff --git a/install/installer/pkg/components/server/configmap.go b/install/installer/pkg/components/server/configmap.go index 50770abd3aa75f..326455d1167835 100644 --- a/install/installer/pkg/components/server/configmap.go +++ b/install/installer/pkg/components/server/configmap.go @@ -37,7 +37,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { TimeoutSeconds: 300, }, WorkspaceDefaults: WorkspaceDefaults{ - WorkspaceImage: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, ""), workspace.DefaultWorkspaceImage, workspace.DefaultWorkspaceImageVersion), + WorkspaceImage: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, ""), workspace.DefaultWorkspaceImage, workspace.DefaultWorkspaceImageVersion, &ctx.Config), PreviewFeatureFlags: []NamedWorkspaceFeatureFlag{}, DefaultFeatureFlags: []NamedWorkspaceFeatureFlag{}, TimeoutDefault: ctx.Config.Workspace.TimeoutDefault, diff --git a/install/installer/pkg/components/server/deployment.go b/install/installer/pkg/components/server/deployment.go index 0ecfe9e7c33f90..cea30a3e7101af 100644 --- a/install/installer/pkg/components/server/deployment.go +++ b/install/installer/pkg/components/server/deployment.go @@ -169,7 +169,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { InitContainers: []corev1.Container{*common.DatabaseWaiterContainer(ctx), *common.MessageBusWaiterContainer(ctx)}, Containers: []corev1.Container{{ Name: Component, - Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.Server.Version), + Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.Server.Version, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{ diff --git a/install/installer/pkg/components/server/ide/configmap.go b/install/installer/pkg/components/server/ide/configmap.go index de898da8c9a1c6..d400ed9faf77c8 100644 --- a/install/installer/pkg/components/server/ide/configmap.go +++ b/install/installer/pkg/components/server/ide/configmap.go @@ -43,13 +43,13 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { return nil }) if resolveLatest { - return common.ImageName(ctx.Config.Repository, name, tag) + return common.ImageName(ctx.Config.Repository, name, tag, &ctx.Config) } - return common.ImageName(ctx.Config.Repository, name, bundledLatest.Version) + return common.ImageName(ctx.Config.Repository, name, bundledLatest.Version, &ctx.Config) } idecfg := IDEConfig{ - SupervisorImage: common.ImageName(ctx.Config.Repository, workspace.SupervisorImage, ctx.VersionManifest.Components.Workspace.Supervisor.Version), + SupervisorImage: common.ImageName(ctx.Config.Repository, workspace.SupervisorImage, ctx.VersionManifest.Components.Workspace.Supervisor.Version, &ctx.Config), IDEOptions: IDEOptions{ IDEClients: map[string]IDEClient{ "vscode": { @@ -80,7 +80,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { Title: "VS Code", Type: typeBrowser, Logo: getIdeLogoPath("vscode"), - Image: common.ImageName(ctx.Config.Repository, ide.CodeIDEImage, ide.CodeIDEImageStableVersion), + Image: common.ImageName(ctx.Config.Repository, ide.CodeIDEImage, ide.CodeIDEImageStableVersion, &ctx.Config), }, "code-latest": { OrderKey: pointer.String("01"), @@ -97,7 +97,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { Title: "VS Code", Type: typeDesktop, Logo: getIdeLogoPath("vscode"), - Image: common.ImageName(ctx.Config.Repository, ide.CodeDesktopIDEImage, ctx.VersionManifest.Components.Workspace.DesktopIdeImages.CodeDesktopImage.Version), + Image: common.ImageName(ctx.Config.Repository, ide.CodeDesktopIDEImage, ctx.VersionManifest.Components.Workspace.DesktopIdeImages.CodeDesktopImage.Version, &ctx.Config), }, codeDesktopInsiders: { OrderKey: pointer.String("03"), @@ -106,14 +106,14 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { Logo: getIdeLogoPath("vscodeInsiders"), Tooltip: pointer.String("Visual Studio Code Insiders for early adopters."), Label: pointer.String("Insiders"), - Image: common.ImageName(ctx.Config.Repository, ide.CodeDesktopInsidersIDEImage, ctx.VersionManifest.Components.Workspace.DesktopIdeImages.CodeDesktopImageInsiders.Version), + Image: common.ImageName(ctx.Config.Repository, ide.CodeDesktopInsidersIDEImage, ctx.VersionManifest.Components.Workspace.DesktopIdeImages.CodeDesktopImageInsiders.Version, &ctx.Config), }, intellij: { OrderKey: pointer.String("04"), Title: "IntelliJ IDEA", Type: typeDesktop, Logo: getIdeLogoPath("intellijIdeaLogo"), - Image: common.ImageName(ctx.Config.Repository, ide.IntelliJDesktopIDEImage, ctx.VersionManifest.Components.Workspace.DesktopIdeImages.IntelliJImage.Version), + Image: common.ImageName(ctx.Config.Repository, ide.IntelliJDesktopIDEImage, ctx.VersionManifest.Components.Workspace.DesktopIdeImages.IntelliJImage.Version, &ctx.Config), LatestImage: resolveLatestImage(ide.IntelliJDesktopIDEImage, "latest", ctx.VersionManifest.Components.Workspace.DesktopIdeImages.IntelliJLatestImage), }, goland: { @@ -121,7 +121,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { Title: "GoLand", Type: typeDesktop, Logo: getIdeLogoPath("golandLogo"), - Image: common.ImageName(ctx.Config.Repository, ide.GoLandDesktopIdeImage, ctx.VersionManifest.Components.Workspace.DesktopIdeImages.GoLandImage.Version), + Image: common.ImageName(ctx.Config.Repository, ide.GoLandDesktopIdeImage, ctx.VersionManifest.Components.Workspace.DesktopIdeImages.GoLandImage.Version, &ctx.Config), LatestImage: resolveLatestImage(ide.GoLandDesktopIdeImage, "latest", ctx.VersionManifest.Components.Workspace.DesktopIdeImages.GoLandLatestImage), }, pycharm: { @@ -129,7 +129,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { Title: "PyCharm", Type: typeDesktop, Logo: getIdeLogoPath("pycharmLogo"), - Image: common.ImageName(ctx.Config.Repository, ide.PyCharmDesktopIdeImage, ctx.VersionManifest.Components.Workspace.DesktopIdeImages.PyCharmImage.Version), + Image: common.ImageName(ctx.Config.Repository, ide.PyCharmDesktopIdeImage, ctx.VersionManifest.Components.Workspace.DesktopIdeImages.PyCharmImage.Version, &ctx.Config), LatestImage: resolveLatestImage(ide.PyCharmDesktopIdeImage, "latest", ctx.VersionManifest.Components.Workspace.DesktopIdeImages.PyCharmLatestImage), }, phpstorm: { @@ -137,7 +137,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { Title: "PhpStorm", Type: typeDesktop, Logo: getIdeLogoPath("phpstormLogo"), - Image: common.ImageName(ctx.Config.Repository, ide.PhpStormDesktopIdeImage, ctx.VersionManifest.Components.Workspace.DesktopIdeImages.PhpStormImage.Version), + Image: common.ImageName(ctx.Config.Repository, ide.PhpStormDesktopIdeImage, ctx.VersionManifest.Components.Workspace.DesktopIdeImages.PhpStormImage.Version, &ctx.Config), LatestImage: resolveLatestImage(ide.PhpStormDesktopIdeImage, "latest", ctx.VersionManifest.Components.Workspace.DesktopIdeImages.PhpStormLatestImage), }, }, diff --git a/install/installer/pkg/components/ws-daemon/daemonset.go b/install/installer/pkg/components/ws-daemon/daemonset.go index 715b350f821920..789f6d652d85d3 100644 --- a/install/installer/pkg/components/ws-daemon/daemonset.go +++ b/install/installer/pkg/components/ws-daemon/daemonset.go @@ -32,7 +32,7 @@ func daemonset(ctx *common.RenderContext) ([]runtime.Object, error) { initContainers := []corev1.Container{ { Name: "disable-kube-health-monitor", - Image: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, common.DockerRegistryURL), "library/ubuntu", "20.04"), + Image: common.ImageName(common.ThirdPartyContainerRepo(ctx.Config.Repository, common.DockerRegistryURL), "library/ubuntu", "20.04", &ctx.Config), Command: []string{ "/usr/bin/nsenter", "-t", @@ -61,7 +61,7 @@ fi }, { Name: "seccomp-profile-installer", - Image: common.ImageName(cfg.Repository, "seccomp-profile-installer", ctx.VersionManifest.Components.WSDaemon.UserNamespaces.SeccompProfileInstaller.Version), + Image: common.ImageName(cfg.Repository, "seccomp-profile-installer", ctx.VersionManifest.Components.WSDaemon.UserNamespaces.SeccompProfileInstaller.Version, &ctx.Config), Command: []string{ "/bin/sh", "-c", @@ -75,7 +75,7 @@ fi }, { Name: "sysctl", - Image: common.ImageName(cfg.Repository, "ws-daemon", ctx.VersionManifest.Components.WSDaemon.Version), + Image: common.ImageName(cfg.Repository, "ws-daemon", ctx.VersionManifest.Components.WSDaemon.Version, &ctx.Config), Command: []string{ "sh", "-c", @@ -97,7 +97,7 @@ fi if cfg.Workspace.Runtime.FSShiftMethod == config.FSShiftShiftFS { initContainers = append(initContainers, corev1.Container{ Name: "shiftfs-module-loader", - Image: common.ImageName(cfg.Repository, "shiftfs-module-loader", ctx.VersionManifest.Components.WSDaemon.UserNamespaces.ShiftFSModuleLoader.Version), + Image: common.ImageName(cfg.Repository, "shiftfs-module-loader", ctx.VersionManifest.Components.WSDaemon.UserNamespaces.ShiftFSModuleLoader.Version, &ctx.Config), VolumeMounts: []corev1.VolumeMount{{ Name: "node-linux-src", ReadOnly: true, @@ -190,7 +190,7 @@ fi Containers: []corev1.Container{ { Name: Component, - Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.WSDaemon.Version), + Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.WSDaemon.Version, &ctx.Config), Args: []string{ "run", "--config", diff --git a/install/installer/pkg/components/ws-manager-bridge/deployment.go b/install/installer/pkg/components/ws-manager-bridge/deployment.go index 9a0009e92f9c85..90614bca42a8e1 100644 --- a/install/installer/pkg/components/ws-manager-bridge/deployment.go +++ b/install/installer/pkg/components/ws-manager-bridge/deployment.go @@ -109,7 +109,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { InitContainers: []corev1.Container{*common.DatabaseWaiterContainer(ctx), *common.MessageBusWaiterContainer(ctx)}, Containers: []corev1.Container{{ Name: Component, - Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.WSManagerBridge.Version), + Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.WSManagerBridge.Version, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{ diff --git a/install/installer/pkg/components/ws-manager/deployment.go b/install/installer/pkg/components/ws-manager/deployment.go index 48053a08156ffc..cd55d2680242f7 100644 --- a/install/installer/pkg/components/ws-manager/deployment.go +++ b/install/installer/pkg/components/ws-manager/deployment.go @@ -35,7 +35,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { Containers: []corev1.Container{{ Name: Component, Args: []string{"run", "--config", "/config/config.json"}, - Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.WSManager.Version), + Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.WSManager.Version, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{ diff --git a/install/installer/pkg/components/ws-proxy/configmap.go b/install/installer/pkg/components/ws-proxy/configmap.go index 0ba07f50faf551..2fc0bd3c230795 100644 --- a/install/installer/pkg/components/ws-proxy/configmap.go +++ b/install/installer/pkg/components/ws-proxy/configmap.go @@ -56,7 +56,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { WorkspacePodConfig: &proxy.WorkspacePodConfig{ TheiaPort: workspace.ContainerPort, SupervisorPort: workspace.SupervisorPort, - SupervisorImage: common.ImageName(ctx.Config.Repository, workspace.SupervisorImage, ctx.VersionManifest.Components.Workspace.Supervisor.Version), + SupervisorImage: common.ImageName(ctx.Config.Repository, workspace.SupervisorImage, ctx.VersionManifest.Components.Workspace.Supervisor.Version, &ctx.Config), }, BuiltinPages: proxy.BuiltinPagesConfig{ Location: "/app/public", diff --git a/install/installer/pkg/components/ws-proxy/deployment.go b/install/installer/pkg/components/ws-proxy/deployment.go index 216f2a2bbaf9ed..990e6251713bfc 100644 --- a/install/installer/pkg/components/ws-proxy/deployment.go +++ b/install/installer/pkg/components/ws-proxy/deployment.go @@ -116,7 +116,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { Containers: []corev1.Container{{ Name: Component, Args: []string{"run", "/config/config.json"}, - Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.WSProxy.Version), + Image: common.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.WSProxy.Version, &ctx.Config), ImagePullPolicy: corev1.PullIfNotPresent, Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{