diff --git a/dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl b/dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl index 027a4241267..54e9b911df9 100644 --- a/dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl +++ b/dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl @@ -43,7 +43,7 @@ RUN true && \ chmod 0775 {{ $beatHome}}/{{ $modulesd }} && \ {{- end }} -{{- if or (eq .Variant "cloud") (eq .Variant "service") }} +{{- if eq .Variant "cloud" }} mkdir -p /opt/agentbeat /opt/filebeat /opt/metricbeat && \ cp -f {{ $beatHome }}/data/cloud_downloads/filebeat.sh /opt/filebeat/filebeat && \ chmod +x /opt/filebeat/filebeat && \ @@ -173,7 +173,7 @@ RUN mkdir /licenses COPY --from=home {{ $beatHome }}/LICENSE.txt /licenses COPY --from=home {{ $beatHome }}/NOTICE.txt /licenses -{{- if or (eq .Variant "cloud") (eq .Variant "service") }} +{{- if eq .Variant "cloud" }} COPY --from=home /opt /opt # Generate folder for a stub command that will be overwritten at runtime RUN mkdir /app && \ @@ -295,7 +295,7 @@ ENV LIBBEAT_MONITORING_CGROUPS_HIERARCHY_OVERRIDE=/ WORKDIR {{ $beatHome }} -{{- if or (eq .Variant "cloud") (eq .Variant "service") }} +{{- if eq .Variant "cloud" }} ENTRYPOINT ["/usr/bin/tini", "--"] CMD ["/app/apm.sh"] # Generate a stub command that will be overwritten at runtime diff --git a/testing/integration/kubernetes_agent_service_test.go b/testing/integration/kubernetes_agent_service_test.go index de015a06d15..f3cdcad87eb 100644 --- a/testing/integration/kubernetes_agent_service_test.go +++ b/testing/integration/kubernetes_agent_service_test.go @@ -88,11 +88,6 @@ func TestKubernetesAgentService(t *testing.T) { container.Env[idx].ValueFrom = nil } } - - // has a unique entrypoint and command because its ran in the cloud - // adjust the spec to run it correctly - container.Command = []string{"elastic-agent"} - container.Args = []string{"-c", "/etc/elastic-agent/agent.yml", "-e"} }, func(pod *corev1.PodSpec) { for volumeIdx, volume := range pod.Volumes {