diff --git a/riocli/apply/manifests/project.yaml b/riocli/apply/manifests/project.yaml index e3cacac6..520b0251 100644 --- a/riocli/apply/manifests/project.yaml +++ b/riocli/apply/manifests/project.yaml @@ -26,3 +26,4 @@ spec: proxyInterface: "eth0" registrySecret: "quay" registryURL: "https://quay.io" + dataDirectory: "/opt/rapyuta/volumes/" diff --git a/riocli/jsonschema/schemas/project-schema.yaml b/riocli/jsonschema/schemas/project-schema.yaml index a1e180ef..be80a9f7 100644 --- a/riocli/jsonschema/schemas/project-schema.yaml +++ b/riocli/jsonschema/schemas/project-schema.yaml @@ -98,6 +98,9 @@ definitions: type: string registryURL: type: string + dataDirectory: + type: string + default: "/opt/rapyuta/volumes/docker-cache/" required: - proxyDevice - proxyInterface diff --git a/riocli/project/features/dockercache.py b/riocli/project/features/dockercache.py index ed36f406..682685bf 100644 --- a/riocli/project/features/dockercache.py +++ b/riocli/project/features/dockercache.py @@ -52,6 +52,12 @@ default=(), help="Name of the secret for upstream docker registry", ) +@click.option( + "--data-directory", + type=click.STRING, + default="/opt/rapyuta/volumes/docker-cache/", + help="Registry data directory path", +) @name_to_guid @with_spinner(text="Updating DockerCache state...") def dockercache( @@ -62,6 +68,7 @@ def dockercache( proxy_interface: str, registry_url: str, registry_secret: str, + data_directory: str, spinner=None, ) -> None: """ @@ -74,7 +81,8 @@ def dockercache( --proxy-device edge01 \\ --proxy-interface eth0 \\ --registry-url https://quay.io \\ - --registry-secret quay + --registry-secret quay \\ + --data-directory "/tmp/rapyuta/volumes" """ client = new_v2_client(with_project=False) @@ -91,6 +99,7 @@ def dockercache( "proxyInterface": proxy_interface, "registryURL": registry_url, "registrySecret": registry_secret, + "dataDirectory": data_directory, } is_enabled = project["spec"]["features"]["dockerCache"].get("enabled", False)