-
Notifications
You must be signed in to change notification settings - Fork 7
feat: add registry addon #1116
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
Merged
Merged
feat: add registry addon #1116
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dkoshkin
commented
May 2, 2025
a233a6c
to
3de12c3
Compare
dkoshkin
commented
May 2, 2025
4f21611
to
91c70c3
Compare
supershal
reviewed
May 7, 2025
...ster-api-runtime-extensions-nutanix/addons/registry-mirror/distribution/values-template.yaml
Outdated
Show resolved
Hide resolved
supershal
reviewed
May 7, 2025
charts/cluster-api-runtime-extensions-nutanix/templates/helm-config.yaml
Outdated
Show resolved
Hide resolved
supershal
reviewed
May 7, 2025
supershal
reviewed
May 7, 2025
pkg/handlers/generic/lifecycle/registrymirror/distribution/handler.go
Outdated
Show resolved
Hide resolved
supershal
reviewed
May 7, 2025
Let CAAPH create the namespace. We can revert in a follow up if we need to guarnatee the namespace for other resources.
683a3e3
to
6e6c70b
Compare
supershal
reviewed
May 7, 2025
supershal
approved these changes
May 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. The code changes looks good. Lets discuss if we can simplify providing all three registries
, registryMirror
and globalImageRegistry
jimmidyson
reviewed
May 8, 2025
jimmidyson
reviewed
May 8, 2025
jimmidyson
reviewed
May 8, 2025
b1dda3b
to
dd251db
Compare
Along with that rename all files and any other related variables
dd251db
to
816ffaa
Compare
manoj-nutanix
approved these changes
May 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
...luster-api-runtime-extensions-nutanix/addons/registry/cncf-distribution/values-template.yaml
Show resolved
Hide resolved
pkg/handlers/generic/lifecycle/registry/cncfdistribution/handler.go
Outdated
Show resolved
Hide resolved
supershal
approved these changes
May 13, 2025
dkoshkin
added a commit
that referenced
this pull request
May 16, 2025
**What problem does this PR solve?**: Depends on #1116 Automatically sets the registryMirror as a Containerd mirror. We're not updating the Cluster object because this should not be a user controller configuration and the IP used as the mirror is determined based on the addon handler and the Service CIDRs. Tested in a Docker cluster: ``` $ kubectl port-forward \ --address=0.0.0.0 \ --namespace registry-mirror-system \ pod/registry-mirror-docker-registry-0 5000:5000 # Push an image tag that doesn't exist in dockerhub $ crane copy nginx:latest 0.0.0.0:5000/library/nginx:dkoshkin --insecure $ kubectl run nginx-working --image=docker.io/library/nginx:dkoshkin $ kubectl run nginx-should-be-broken --image=docker.io/library/nginx:dne $ kubectl get pods NAME READY STATUS RESTARTS AGE cluster-autoscaler-0196931c-cb53-7abf-aa89-49c82c42ced5-86w5j8c 0/1 ContainerCreating 0 19m nginx-should-be-broken 0/1 ErrImagePull 0 11m nginx-working 1/1 Running 0 11m ``` **Which issue(s) this PR fixes**: Fixes # **How Has This Been Tested?**: <!-- Please describe the tests that you ran to verify your changes. Provide output from the tests and any manual steps needed to replicate the tests. --> **Special notes for your reviewer**: <!-- Use this to provide any additional information to the reviewers. This may include: - Best way to review the PR. - Where the author wants the most review attention on. - etc. -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?:
This PR adds a new addon
registryMirror
that deploys https://github.com/distribution/distribution as a StatefulSetand a sidecar container to sync images across instances.
This addon is designed to only be a mirror and not used a regular registry, hence the name and the lack of external access to the Service.
In a follow up PR, the in-cluster Service will be used a Containerd mirror.
In a follow up PR, it will also be deployed with randomly generated credentials to further prevent direct use.
Which issue(s) this PR fixes:
Fixes #
How Has This Been Tested?:
Special notes for your reviewer: