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

Registry cache #220

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Registry cache #220

wants to merge 1 commit into from

Conversation

brunoleon
Copy link
Collaborator

Add support for local registry proxy cache

This PR adds support for using a local registry cache in order
to speedup deployments.

Deployment of that registry is left out of rookckeck tool though.

</ip>
</network>
""" % {
<network xmlns:dnsmasq='http://libvirt.org/schemas/network/dnsmasq/1.0'>
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Can you keep the current indent please

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually I changed the current indent because it would not allow longer line.
I find it more readable to have most of the line on a single one.

Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of playing with dedenting and indentation, could you please move the template to a separate file and load if required. Use __file__ to determine relative path to it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Up until now it was preferred to have template within the code so I'm not sure about it, even though I tend to prefer it as you describe.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure, I never prefer mulitline xml code having in python module.

Copy link
Contributor

Choose a reason for hiding this comment

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

If I saw the initial commit on review, I asked to move it out.

</dhcp>
</ip>
<dnsmasq:options>
<dnsmasq:option value="address=/.local/%(registry_mirror)s"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this good for? I don't get it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is needed to have the DNS setup by libvirt to resolve your cache registries (docker.io.local, registry.suse.de.local etc...) to the IP of registry_mirror_address

I actually passes options to dnsmasq

@kshtsk
Copy link
Contributor

kshtsk commented Nov 9, 2020

Could you please add some guidelines how to setup local container registry in the docs.

Copy link
Contributor

@kshtsk kshtsk left a comment

Choose a reason for hiding this comment

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

See the comments above.

@brunoleon brunoleon force-pushed the registry_cache branch 2 times, most recently from 38a9583 to 1268167 Compare November 9, 2020 17:43
This PR adds support for using a local registry cache in order
to speedup deployments.

Deployment of that registry is left out of rookckeck tool though.
@@ -55,3 +55,9 @@ _remove_workspace = true
# that ansible-playbook accepts for the --extra-vars parameter
# See https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#defining-variables-at-runtime # noqa
ansible_extra_vars = ""

# container registry cache IP - This can be any IP as long as it is reachable by you cluster nodes.
Copy link
Contributor

Choose a reason for hiding this comment

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

=> Container
=> your

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.

4 participants