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

Custom Image Pull Policy #1798

Merged

Conversation

edenkoveshi
Copy link
Contributor

Which problem is this PR solving?

Short description of the changes

This is quite simple really.

I've added corev1.PullPolicy to the JaegerCommonSpec and then handled it within the util.Merge function
And then I have added the policy from JaegerCommonSpec to the relevant containers being set up.

If any of them is not set, Kubernetes default is taken.

Following any other JaegerCommonSpec properties, those defined under Jaeger.Spec.JaegerCommonSpec are overwritten by the internal ones (Jaeger.Spec.Agent.JaegerCommonSpec,Jaeger.Spec.AllInOne.JaegerCommonSpec, etc.)

Test cases have been added and relevant tests updated. Also tested manually on a minikube environment.

CRD Changes:

  • All deployment modes now have imagePullPolicy field, including the Jaeger object itself

@edenkoveshi edenkoveshi force-pushed the custom-image-pull-policy branch from 883fb8b to 8278d9f Compare February 26, 2022 21:14
frzifus
frzifus previously approved these changes Feb 28, 2022
Copy link
Member

@frzifus frzifus left a comment

Choose a reason for hiding this comment

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

Hi @edenkoveshi, again thanks for your contribution. Your change looks good to me!

could you have a look @rubenvp8510?

We might want to include the changes in the e2e tests too. #1744

@frzifus
Copy link
Member

frzifus commented Feb 28, 2022

oh @edenkoveshi seems you need to regenerate crd files. (make manifests should solve it)

https://github.com/jaegertracing/jaeger-operator/runs/5360852359?check_suite_focus=true#step:6:167

@edenkoveshi
Copy link
Contributor Author

Done.

…ommonSpec Merge function and then simply added to the containers created by the Jaeger Custom Resource

Signed-off-by: edenkoveshi <[email protected]>
Signed-off-by: edenkoveshi <[email protected]>
@edenkoveshi edenkoveshi force-pushed the custom-image-pull-policy branch from 3413b45 to 787313c Compare February 28, 2022 20:55
@edenkoveshi edenkoveshi force-pushed the custom-image-pull-policy branch from d90a695 to 0873745 Compare February 28, 2022 21:36
frzifus
frzifus previously approved these changes Feb 28, 2022
Copy link
Member

@frzifus frzifus left a comment

Choose a reason for hiding this comment

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

perfect :)

rubenvp8510
rubenvp8510 previously approved these changes Feb 28, 2022
@rubenvp8510 rubenvp8510 enabled auto-merge (squash) February 28, 2022 22:23
@frzifus
Copy link
Member

frzifus commented Mar 1, 2022

@edenkoveshi
Copy link
Contributor Author

Looking on the command that it runs

cd config/manager && /home/runner/work/jaeger-operator/jaeger-operator/bin/kustomize edit set image controller=quay.io/jaegertracing/jaeger-operator:"1.31.0"

Comparing this with the one in the Makefile bundle entry:

cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
	$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --manifests --version $(VERSION) $(BUNDLE_METADATA_OPTS)

This sets automatically my user as the image prefix, which is obviously different than the one running in the CI, and a version which is 1.31.0-{commit_id} which is obviously different than 1.31.0

What am I missing?

auto-merge was automatically disabled March 1, 2022 20:49

Head branch was pushed to by a user without write access

@edenkoveshi edenkoveshi dismissed stale reviews from rubenvp8510 and frzifus via 8a86c96 March 1, 2022 20:49
@edenkoveshi edenkoveshi force-pushed the custom-image-pull-policy branch from 8a86c96 to 44d3590 Compare March 1, 2022 20:51
@frzifus
Copy link
Member

frzifus commented Mar 4, 2022

What am I missing?

I assume it was:

IMG=quay.io/jaegertracing/jaeger-operator:1.31.0 VERSION=v1.31.0 make ...

Copy link
Member

@frzifus frzifus left a comment

Choose a reason for hiding this comment

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

LGTM :)

@codecov
Copy link

codecov bot commented Mar 4, 2022

Codecov Report

Merging #1798 (c87b4a5) into main (7762494) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1798      +/-   ##
==========================================
+ Coverage   87.68%   87.70%   +0.01%     
==========================================
  Files         100      100              
  Lines        6009     6018       +9     
==========================================
+ Hits         5269     5278       +9     
  Misses        563      563              
  Partials      177      177              
Impacted Files Coverage Δ
apis/v1/jaeger_types.go 87.50% <ø> (ø)
pkg/deployment/agent.go 100.00% <100.00%> (ø)
pkg/deployment/all_in_one.go 100.00% <100.00%> (ø)
pkg/deployment/collector.go 100.00% <100.00%> (ø)
pkg/deployment/ingester.go 100.00% <100.00%> (ø)
pkg/deployment/query.go 100.00% <100.00%> (ø)
pkg/util/util.go 94.21% <100.00%> (+0.13%) ⬆️

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 7762494...c87b4a5. Read the comment docs.

@rubenvp8510 rubenvp8510 enabled auto-merge (squash) March 8, 2022 03:43
@rubenvp8510 rubenvp8510 merged commit 63ff370 into jaegertracing:main Mar 8, 2022
@frzifus frzifus mentioned this pull request Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants