{
    "properties": {
        "networking": {
            "description": "registry networking configuration properties",
            "properties": {
                "external_access": {
                    "description": "Enable access from outside the cluster through Marathon-LB.\nNOTE: this connection is unencrypted.",
                    "properties": {
                        "enable": {
                            "default": false,
                            "description": "Enable or disable creating a VIP for external access through a public node running Marathon-LB.",
                            "type": "boolean"
                        },
                        "external_access_port": {
                            "default": 15000,
                            "description": "For external access, port number to be used for clear communication in the external Marathon-LB load balancer",
                            "type": "number"
                        }
                    },
                    "type": "object"
                },
                "port": {
                    "default": 5000,
                    "description": "Port number to be used for clear communication internally to the cluster.",
                    "type": "number"
                }
            },
            "type": "object"
        },
        "security": {
            "description": "registry security configuration properties",
            "properties": {
                "enable": {
                    "default": false,
                    "description": "Enable TLS secure registry.",
                    "type": "boolean"
                },
                "http_tls_certificate_filename": {
                    "default": "domain.crt",
                    "description": "Name of the file holding the HTTP TLS certificate to download from the host with the IP address configured in http_tls_download_ip.",
                    "type": "string"
                },
                "http_tls_download_ip": {
                    "description": "IP address of the host to download the HTTP TLS certificate and key from. Files need to be in the root subdirectory of the server.",
                    "type": "string"
                },
                "http_tls_download_port": {
                    "default": "80",
                    "description": "TCP port of the host to download the HTTP TLS certificate and key from (i.e. the port where the server is listening on). Files need to be in the root subdirectory of the server.",
                    "type": "string"
                },
                "http_tls_key_filename": {
                    "default": "domain.key",
                    "description": "Name of the file holding the HTTP TLS key to download from the host with the IP address configured in http_tls_download_ip.",
                    "type": "string"
                }
            },
            "type": "object"
        },
        "service": {
            "description": "DC/OS service configuration properties",
            "properties": {
                "cpus": {
                    "default": 0.2,
                    "description": "CPU shares to allocate to each service instance.",
                    "minimum": 0.2,
                    "type": "number"
                },
                "mem": {
                    "default": 256.0,
                    "description": "Memory to allocate to each service instance.",
                    "minimum": 256.0,
                    "type": "number"
                },
                "name": {
                    "default": "registry",
                    "description": "Name of this service instance",
                    "type": "string"
                },
                "proxy": {
                    "description": "Configure this registry as a remote proxy for another registry.",
                    "properties": {
                        "enable": {
                            "default": false,
                            "description": "Enable or disable proxy mode.",
                            "type": "boolean"
                        },
                        "password": {
                            "default": "password",
                            "description": "Password to use in the remote proxy.",
                            "type": "string"
                        },
                        "remote_url": {
                            "default": "https://registry-1.docker.io",
                            "description": "URL of the remote proxy to connect to.",
                            "type": "string"
                        },
                        "username": {
                            "default": "username",
                            "description": "Username to use in the remote proxy.",
                            "type": "string"
                        }
                    },
                    "type": "object"
                }
            },
            "required": [
                "cpus",
                "mem"
            ],
            "type": "object"
        },
        "storage": {
            "description": "registry storage configuration properties",
            "properties": {
                "host_volume_registry": {
                    "default": "/tmp",
                    "description": "If using non-persistent volumes (local volumes), this sets the location of a volume on the host to be used for the registry service to store the contents of the registry. The final location will be derived from this value plus the name set in `name` (e.g. `/mnt/host_volume/service_name`). This can be a mounted NFS drive. Note that this path must be the same on all DC/OS agents. NOTE: if you don't change the default /tmp value, YOUR DATA WILL NOT BE SAVED IN ANY WAY.",
                    "type": "string"
                },
                "persistence": {
                    "description": "Enable persistent storage.",
                    "properties": {
                        "enable": {
                            "default": false,
                            "description": "Enable or disable persistent storage.",
                            "type": "boolean"
                        },
                        "external": {
                            "description": "External persistent storage properties",
                            "properties": {
                                "driver": {
                                    "default": "rexray",
                                    "description": "Volume driver to use for storage. The default value should be correct for most use cases.",
                                    "type": "string"
                                },
                                "enable": {
                                    "default": false,
                                    "description": "Enable or disable external persistent storage. The `persistence` option must also be selected. Please note that for these to work, your DC/OS cluster MUST have been installed with the right options in `config.yaml`. Also, please note this requires a working  configuration file for the driver (e.g. `rexray.yaml`).",
                                    "type": "boolean"
                                },
                                "provider": {
                                    "default": "dvdi",
                                    "description": "Provider of the external persistent volume. The default value should be correct for most use cases.",
                                    "type": "string"
                                },
                                "volume_name_registry": {
                                    "default": "registry",
                                    "description": "Name that your volume driver uses to look up your external volume. When your task is staged on an agent, the volume driver queries the storage service for a volume with this name. If one does not exist, it is created implicitly. Otherwise, the existing volume is reused.",
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        },
                        "volume_size_registry": {
                            "default": 1024,
                            "description": "If a new volume is to be created, this controls its size in MBs.",
                            "type": "number"
                        }
                    },
                    "type": "object"
                },
                "storage_path": {
                    "default": "/var/lib/registry",
                    "description": "Storage path to be used inside the registry container.",
                    "type": "string"
                }
            },
            "type": "object"
        }
    }
}