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

Only apply imagePullPolicy to plugins if instructed #1705

Merged
merged 1 commit into from
May 12, 2022
Merged

Only apply imagePullPolicy to plugins if instructed #1705

merged 1 commit into from
May 12, 2022

Conversation

johnSchnake
Copy link
Contributor

@johnSchnake johnSchnake commented May 12, 2022

Adds a new option which allows the user to specify whether or
not to apply the imagePullPolicy to all plugins and override
their stated values.

This is important since even the default value was overwriting
explicit values in the plugins leading to confusing behavior.

Techinically a breaking change for someone who was running
sonobuoy CLI with the --image-pull-policy flag to overwrite explicit
values. They will now need to add the --force-image-pull-policy flag
to obtain the same behavior. This makes all modifications to plugins
explicit via some option rather than this one being implicit.

Fixes #1652

Signed-off-by: John Schnake [email protected]

Release note:

Users will now need to add the --force-image-pull-policy flag if they want the plugins to use the same imagePullPolicy as the Sonobuoy aggregator/worker containers.  Sonobuoy will respect the imagePullPolicy stated in the plugin definitions otherwise.

@johnSchnake
Copy link
Contributor Author

Not a big change but just lots of golden files being tweaked.

Added a field to the config object and plumbed it through to a flag. Gated logic on that value.

@@ -460,7 +463,7 @@ func TestGenerateManifestGolden(t *testing.T) {
},
},
},
goldenFile: filepath.Join("testdata", "imagePullPolicy-all-plugins.golden"),
goldenFile: filepath.Join("testdata", "imagePullPolicy-not-all-plugins.golden"),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was actually a previously duplicated test oddly. Now one is for forcing the values, and the other isnt.

- name: SONOBUOY_RESULTS_DIR
value: /tmp/sonobuoy/results
image: hello:v9
imagePullPolicy: Always
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not forced and has its value, not the default (IfNotPresent)

Adds a new option which allows the user to specify whether or
not to apply the imagePullPolicy to all plugins and override
their stated values.

This is important since even the default value was overwriting
explicit values in the plugins leading to confusing behavior.

Techinically a breaking change for someone who was running
sonobuoy CLI with the --image-pull-policy flag to overwrite explicit
values. They will now need to add the --force-image-pull-policy flag
to obtain the same behavior. This makes all modifications to plugins
explicit via some option rather than this one being implicit.

Fixes #1652

Signed-off-by: John Schnake <[email protected]>
@johnSchnake johnSchnake merged commit 692522d into vmware-tanzu:main May 12, 2022
@johnSchnake johnSchnake deleted the pluginPullPolicy branch May 12, 2022 21:46
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.

Customizing Plug-in PodSpecs not applying imagePullPolicy
1 participant