-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use declarative style for complete variant of the elastic-agent #28526
Changes from all commits
08c6c20
467f58f
c8f542f
5a5e107
4b2ad3a
84f3271
8bb2079
7a0d9bc
c74f6ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -37,9 +37,6 @@ RUN readlink -f {{ $beatBinary }} | xargs setcap {{ .linux_capabilities }} | |||
|
||||
FROM {{ .from }} | ||||
|
||||
# Contains the elastic agent image variant, an empty string for the standard variant | ||||
# or "complete" for the bigger one. | ||||
ENV ELASTIC_AGENT_IMAGE_VARIANT={{.Variant}} | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we still need this environment variable for the
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #27052 (comment) I wonder if adding a metadata could be an option, though the docker tag contains that value anywawy. I was not able to find any references for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
maybe?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that labels or metadata would be better to consider There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW, my comment was just a comment, so therefore it's not blocking and I don't see any reasons why cc @andrewvc , can you please help to understand if removing is harmless? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's currently unused, so can be deleted. |
||||
ENV BEAT_SETUID_AS={{ .user }} | ||||
|
||||
{{- if contains .from "ubi-minimal" }} | ||||
|
@@ -58,7 +55,7 @@ RUN case $(arch) in aarch64) YUM_FLAGS="-x bind-license";; esac; \ | |||
(exit $exit_code) | ||||
{{- end }} | ||||
|
||||
{{- if (and (eq .Variant "complete") (not (contains .from "ubi-minimal"))) }} | ||||
{{- if (and (contains .image_name "-complete") (not (contains .from "ubi-minimal"))) }} | ||||
RUN for iter in {1..10}; do \ | ||||
yum -y install atk cups gtk gdk xrandr pango libXcomposite libXcursor libXdamage \ | ||||
libXext libXi libXtst cups-libs libXScrnSaver libXrandr GConf2 \ | ||||
|
@@ -156,7 +153,7 @@ RUN mkdir /app | |||
{{- else }} | ||||
RUN groupadd --gid 1000 {{ .BeatName }} | ||||
RUN useradd -M --uid 1000 --gid 1000 --groups 0 --home {{ $beatHome }} {{ .user }} | ||||
{{- if (and (eq .Variant "complete") (not (contains .from "ubi-minimal"))) }} | ||||
{{- if (and (contains .image_name "-complete") (not (contains .from "ubi-minimal"))) }} | ||||
RUN chown {{ .user }} $NODE_PATH | ||||
{{- end }} | ||||
{{- if contains .image_name "-cloud" }} | ||||
|
@@ -167,7 +164,7 @@ RUN chown {{ .user }} /app | |||
{{- end }} | ||||
USER {{ .user }} | ||||
|
||||
{{- if (and (eq .Variant "complete") (not (contains .from "ubi-minimal"))) }} | ||||
{{- if (and (contains .image_name "-complete") (not (contains .from "ubi-minimal"))) }} | ||||
# Setup synthetics env vars | ||||
ENV ELASTIC_SYNTHETICS_CAPABLE=true | ||||
ENV SUITES_DIR={{ $beatHome }}/suites | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be represented in the
packages.yml
definition? If this is needed, maybeoutput_file
(used here) can be set inagent_docker_complete_spec
.(I see
output_file
is not defined anywhere, maybe you find surprises if you try to use it 😬)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about it, this line is part of the revert of the initial commits. Maybe @andrewvc can help us out here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsoriano if you agree, I'd like to merge this one, to avoid more "variants" to appear/be merged (see #28597)