Skip to content
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

Support global registry configuration #309

Merged
merged 2 commits into from
Jun 3, 2021
Merged

Conversation

ahmed-mez
Copy link
Contributor

What does this PR do?

Support a global registry config.

Motivation

Configure the container registry without depending on the image name and tag.

Additional Notes

For backward compatibility, the tag and registry values are ignored in case Image.Name corresponds to a full image name.

Describe your test plan

Example CR:

apiVersion: datadoghq.com/v1alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
  registry: public.ecr.aws/datadog
...
  agent:
    image:
      name: "agent"
      tag: "latest"
  clusterAgent:
    replicas: 1
    image:
      name: "cluster-agent"
      tag: "latest"
    config:
      clusterChecksEnabled: true
  clusterChecksRunner:
    replicas: 1
    image:
      name: "agent"
      tag: "latest"

@ahmed-mez ahmed-mez added this to the v0.7 milestone May 18, 2021
@ahmed-mez ahmed-mez requested review from a team as code owners May 18, 2021 14:53
Copy link
Collaborator

@clamoriniere clamoriniere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few ideas to provide more options to the user.

api/v1alpha1/datadogagent_default.go Outdated Show resolved Hide resolved
api/v1alpha1/datadogagent_types.go Outdated Show resolved Hide resolved
api/v1alpha1/datadogagent_types.go Outdated Show resolved Hide resolved
api/v1alpha1/datadogagent_types.go Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Merging #309 (6496b55) into main (023cb3b) will increase coverage by 0.18%.
The diff coverage is 76.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #309      +/-   ##
==========================================
+ Coverage   58.18%   58.36%   +0.18%     
==========================================
  Files          59       59              
  Lines        6294     6288       -6     
==========================================
+ Hits         3662     3670       +8     
+ Misses       2362     2348      -14     
  Partials      270      270              
Flag Coverage Δ
unittests 58.36% <76.47%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
api/v1alpha1/datadogagent_default.go 14.58% <0.00%> (+0.51%) ⬆️
api/v1alpha1/datadogagent_types.go 100.00% <ø> (ø)
controllers/datadogagent/clusteragent.go 69.35% <100.00%> (ø)
controllers/datadogagent/clusterchecksrunner.go 75.79% <100.00%> (+0.06%) ⬆️
controllers/datadogagent/utils.go 82.02% <100.00%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 023cb3b...6496b55. Read the comment docs.

@vboulineau
Copy link
Contributor

vboulineau commented May 19, 2021

It will conflict a bit with #303 (see usage of GetTagFromImageName)

@ahmed-mez
Copy link
Contributor Author

@vboulineau do you want to merge #303 first?

@ahmed-mez ahmed-mez requested a review from jtappa June 3, 2021 13:42
@ahmed-mez ahmed-mez merged commit f95658e into main Jun 3, 2021
@ahmed-mez ahmed-mez deleted the ahmed/image-registry branch June 3, 2021 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants