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

Automated updates for components image digest #4

Merged
merged 2 commits into from
May 30, 2024

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented May 30, 2024

Changes:

  • Fetch the images tags and digests from the controlplaneio-fluxcd/distribution Git repo on every reconciliation
  • Trigger an upgrade and pin the images to the tag and digest fetched from the distribution repo
  • Record the last found images and their tags/digests in the .status.components

The automation and digest pinning works only for upstream (ghcr.io/fluxcd) and for the ControlPlane (ghcr.io/controlplaneio-fluxcd) container registries.

@stefanprodan stefanprodan added the enhancement New feature or request label May 30, 2024
return nil, fmt.Errorf("unsupported registry: %s", registry)
}

const ghRepo = "https://raw.githubusercontent.com/controlplaneio-fluxcd/distribution/main/images"
Copy link
Contributor

@souleb souleb May 30, 2024

Choose a reason for hiding this comment

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

maybe this should be a parameter? we could then fetch from a test http server in our tests? otherwise tests will fail everytime change the digests upstream.

Copy link
Member Author

Choose a reason for hiding this comment

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

The tests will not fail, as they point to the upstream CNCF Flux images (fixed version v2.3.0). I'm reluctant on exposing the URL in the API, as this function should fetch the digests from the OCI repo directly, instead of using Git like now.

Copy link
Contributor

@souleb souleb left a comment

Choose a reason for hiding this comment

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

LGTM!

@stefanprodan stefanprodan merged commit c09d874 into main May 30, 2024
1 check passed
@stefanprodan stefanprodan deleted the components-image-update branch May 30, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants