-
Notifications
You must be signed in to change notification settings - Fork 98
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
Standardize image defaulting #355
Conversation
67d503c
to
e2cbeba
Compare
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.
no docs team review needed on this one
@@ -620,7 +621,7 @@ func TestDefaultDatadogAgentSpecAgent(t *testing.T) { | |||
UseExtendedDaemonset: NewBoolPointer(false), | |||
Image: &ImageConfig{ | |||
Name: "gcr.io/datadog/agent:6.26.0", | |||
Tag: defaultAgentImageTag, | |||
Tag: defaulting.AgentLatestVersion, |
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.
The name in the line above doesn't correspond to "latest".
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.
I keep Latest
in the name, because it correspond to the "latest released" version.
Do you think we should find another name?
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.
What I meant in this case is that the Name
field in the line above already includes the version (6.26.0
) and it does not correspond to defaulting.AgentLatestVersion
. I think that :6.26.0
shouldn't be there.
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.
Yes, I now understand this is a weird behaviour of the defaulting, that doesn't check if the Name
contains the tag. I will try to fix 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.
I have updated the defaulting logic to only set the "default tag" if the tag is not already present in the image name.
you can review the change in this commit
Codecov Report
@@ Coverage Diff @@
## main #355 +/- ##
===========================================
+ Coverage 38.76% 64.72% +25.96%
===========================================
Files 64 63 -1
Lines 11426 6898 -4528
===========================================
+ Hits 4429 4465 +36
+ Misses 6678 2114 -4564
Partials 319 319
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
What does this PR do?
Update defaulting images logic and have a dedicated package for defaulting.
The idea here is to update the Agent and Cluster-Agent image version with
the lastest stable version each time we release the Operator.
Motivation
Keep up-to-date the agent and cluster-agent when deploying a new Operator version.
Additional Notes
N/A
Describe your test plan
Deploy the example
examples/datadogagent/datadog-agent-with-credential-secret.yaml
7.30.0
1.14.0