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

engine: move default image exclusions #2513

Merged
merged 1 commit into from
Jul 15, 2020

Commits on Jul 15, 2020

  1. engine: move default image exclusions

    This commit moves the logic adding default excluded images from the
    cleanup list to the engine package, away from the config package, and in
    doing so fixes two bugs:
    
    1. Prior to this change, any value for ImageCleanupExclusionList
       provided by a config mechanism *other* than environmentConfig would
       be ignored.  This is because environmentConfig has the highest
       precedence, the defaults were added to environmentConfig by
       parseImageCleanupExclusionList, and config.Merge will only merge a
       new value when the left config's field is its zero value.  Since the
       default excluded images were populated, environmentConfig's
       ImageCleanupExclusionList field was never zero.
    2. CachedImageNamePauseContainer hard-coded a name for the pause
       container image that was used to populate the exclusion list, but the
       actual name of the pause container is a value populated at link-time
       into the DefaultPauseContainerImageName and DefaultPauseContainerTag
       variables.  If the value was set to anything other than what was
       defined in CachedImageNamePauseContainer, the pause container image
       would not be correctly excluded from image cleanup.
    
    Signed-off-by: Samuel Karp <[email protected]>
    samuelkarp committed Jul 15, 2020
    Configuration menu
    Copy the full SHA
    08fd483 View commit details
    Browse the repository at this point in the history