Skip to content

feat(dockercache): add registry blob storage option #438

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

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions riocli/apply/manifests/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ spec:
proxyInterface: "eth0"
registrySecret: "quay"
registryURL: "https://quay.io"
blobStorage: "/opt/rapyuta/volumes/"
Copy link
Member

Choose a reason for hiding this comment

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

todo: Add it in the jsonschema as well.

11 changes: 10 additions & 1 deletion riocli/project/features/dockercache.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
default=(),
help="Name of the secret for upstream docker registry",
)
@click.option(
"--registry-blob-storage",
type=click.STRING,
default=(),
help="Registry blob storage path (default: /opt/rapyuta/volumes/docker-cache/)",
)
@name_to_guid
@with_spinner(text="Updating DockerCache state...")
def dockercache(
Expand All @@ -62,6 +68,7 @@ def dockercache(
proxy_interface: str,
registry_url: str,
registry_secret: str,
registry_blob_storage: str,
spinner=None,
) -> None:
"""
Expand All @@ -74,7 +81,8 @@ def dockercache(
--proxy-device edge01 \\
--proxy-interface eth0 \\
--registry-url https://quay.io \\
--registry-secret quay
--registry-secret quay \\
--registry-blob-storage "/tmp/rapyuta/volumes"
"""
client = new_v2_client(with_project=False)

Expand All @@ -91,6 +99,7 @@ def dockercache(
"proxyInterface": proxy_interface,
"registryURL": registry_url,
"registrySecret": registry_secret,
"blobStorage": registry_blob_storage,
}

is_enabled = project["spec"]["features"]["dockerCache"].get("enabled", False)
Expand Down
Loading