diff --git a/CHANGELOG.md b/CHANGELOG.md index a972dc6a175b..668b094b7b08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## 1.0.3 (Unreleased) +IMPROVEMENTS: + * consul/connect: Made handling of sidecar task container image URLs consistent with the `docker` task driver. [[GH-9580](https://github.com/hashicorp/nomad/issues/9580)] + BUG FIXES: * consul/connect: Fixed a bug where gateway proxy connection default timeout not set [[GH-9851](https://github.com/hashicorp/nomad/pull/9851)] @@ -16,7 +19,7 @@ IMPROVEMENTS: * consul/connect: Interpolate the connect, service meta, and service canary meta blocks with the task environment [[GH-9586](https://github.com/hashicorp/nomad/pull/9586)] * consul/connect: enable configuring custom gateway task [[GH-9639](https://github.com/hashicorp/nomad/pull/9639)] * cli: Added JSON/go template formatting to agent-info command. [[GH-9788](https://github.com/hashicorp/nomad/pull/9788)] - + BUG FIXES: * client: Fixed a bug where non-`docker` tasks with network isolation were restarted on client restart. [[GH-9757](https://github.com/hashicorp/nomad/issues/9757)] diff --git a/drivers/docker/config.go b/drivers/docker/config.go index c514bd08cb53..a62607d3b31d 100644 --- a/drivers/docker/config.go +++ b/drivers/docker/config.go @@ -662,6 +662,8 @@ func (d *Driver) SetConfig(c *base.Config) error { } d.config = &config + d.config.InfraImage = strings.TrimPrefix(d.config.InfraImage, "https://") + if len(d.config.GC.ImageDelay) > 0 { dur, err := time.ParseDuration(d.config.GC.ImageDelay) if err != nil { diff --git a/drivers/docker/driver.go b/drivers/docker/driver.go index 149938cd453a..36a917407a7f 100644 --- a/drivers/docker/driver.go +++ b/drivers/docker/driver.go @@ -251,10 +251,7 @@ func (d *Driver) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *drive return nil, nil, fmt.Errorf("image name required for docker driver") } - // Remove any http - if strings.HasPrefix(driverConfig.Image, "https://") { - driverConfig.Image = strings.Replace(driverConfig.Image, "https://", "", 1) - } + driverConfig.Image = strings.TrimPrefix(driverConfig.Image, "https://") handle := drivers.NewTaskHandle(taskHandleVersion) handle.Config = cfg