diff --git a/CHANGELOG.md b/CHANGELOG.md index c4b2b0896d..38cf0f10e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,5 @@ ## UNRELEASED -ENHANCEMENTS: -* Connect: the init container for connect injected pods has been split into two containers. - ## 0.24.0 (February 16, 2021) BREAKING CHANGES diff --git a/connect-inject/container_init.go b/connect-inject/container_init.go index 1b82ce486a..ca75805eee 100644 --- a/connect-inject/container_init.go +++ b/connect-inject/container_init.go @@ -12,7 +12,7 @@ import ( ) const ( - InjectInitCopyContainerName = "consul-connect-inject-init-copy-container" + InjectInitCopyContainerName = "copy-consul-bin" InjectInitContainerName = "consul-connect-inject-init" MetaKeyPodName = "pod-name" MetaKeyKubeNS = "k8s-namespace" @@ -67,7 +67,7 @@ type initContainerCommandUpstreamData struct { // containerInitCopyContainer returns the init container spec for the copy container which places // the consul binary into the shared volume. func (h *Handler) containerInitCopyContainer() (corev1.Container, error) { - // # Copy the Consul binary from the image to the shared volume + // Copy the Consul binary from the image to the shared volume. cmd := "cp /bin/consul /consul/connect-inject/consul" return corev1.Container{ Name: InjectInitCopyContainerName, @@ -81,7 +81,6 @@ func (h *Handler) containerInitCopyContainer() (corev1.Container, error) { }, Command: []string{"/bin/sh", "-ec", cmd}, }, nil - } // containerInit returns the init container spec for registering the Consul diff --git a/connect-inject/container_init_test.go b/connect-inject/container_init_test.go index fd7c3ff77c..3bc4065cac 100644 --- a/connect-inject/container_init_test.go +++ b/connect-inject/container_init_test.go @@ -1432,7 +1432,7 @@ func TestHandlerContainerInit_MeshGatewayModeErrors(t *testing.T) { } -// Test that the init copy container has the correct command +// Test that the init copy container has the correct command. func TestHandlerContainerInitCopyContainer(t *testing.T) { require := require.New(t) h := Handler{} diff --git a/connect-inject/handler.go b/connect-inject/handler.go index dc665b6016..60be017e63 100644 --- a/connect-inject/handler.go +++ b/connect-inject/handler.go @@ -348,7 +348,7 @@ func (h *Handler) Mutate(req *v1beta1.AdmissionRequest) *v1beta1.AdmissionRespon fmt.Sprintf("/spec/containers/%d/env", i))...) } - // Add the init container which copies the consul binary + // Add the init container which copies the consul binary. initCopyContainer, err := h.containerInitCopyContainer() if err != nil { h.Log.Error("Error configuring injection init copy container", "err", err, "Request Name", req.Name)