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

feat: Allow using a pull thru docker cache with the imagepolicy schedule #477

Conversation

ekampf
Copy link
Contributor

@ekampf ekampf commented Dec 5, 2024

Related Tickets & Documents

Changes

Changes how DockerhubVersionPolicyProvider (used to fetch latest tag from dockerhub) behaves - when looking for new tags we always check the official twingate repo (twingate/connector) and we use the repository value from the CRD when referncing it in the pod.

So for example given this connector yaml:

apiVersion: twingate.com/v1beta
kind: TwingateConnector
metadata:
  name: my-connector-auto-updating-image
spec:
  imagePolicy:
    provider: "dockerhub"
    schedule: "0 0 * * *"
    repository: my-private-repo/twingate-connector
    version: "^1.0.0"
  podExtra:
    imagePullSecrets:
      - name: my-secret

The code will query twingate/connector on dockerhub to get the latest tags and then when creating the pod set the image to be my-private-repo/twingate-connector:<latest tag from dockerhub>

Copy link

linear bot commented Dec 5, 2024

@coveralls
Copy link
Collaborator

coveralls commented Dec 5, 2024

Pull Request Test Coverage Report for Build 12262932885

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 98.394%

Totals Coverage Status
Change from base Build 12205215703: 0.0%
Covered Lines: 1015
Relevant Lines: 1022

💛 - Coveralls

@ekampf ekampf marked this pull request as ready for review December 5, 2024 23:52
Copy link
Contributor

@liorr liorr left a comment

Choose a reason for hiding this comment

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

GTM

@ekampf ekampf merged commit 81fdb30 into main Dec 16, 2024
16 checks passed
@ekampf ekampf deleted the feature/oss-48-using-a-pull-thru-docker-cache-with-the-imagepolicy-schedule branch December 16, 2024 17:57
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