diff --git a/README.md b/README.md index c7b4e2b06..9f66f175a 100644 --- a/README.md +++ b/README.md @@ -57,8 +57,8 @@ To simplify the installation process, a pre-built installation package of Harbor For information on how to use Harbor, please see [User Guide](docs/user_guide.md) . -### Deploy harbor on Kubernetes -Detailed instruction about deploying harbor on Kubernetes is described [here](https://github.com/vmware/harbor/blob/master/kubernetes_deployment.md). +### Deploy Harbor on Kubernetes +Detailed instruction about deploying Harbor on Kubernetes is described [here](docs/kubernetes_deployment.md). ### Contribution We welcome contributions from the community. If you wish to contribute code and you have not signed our contributor license agreement (CLA), our bot will update the issue when you open a pull request. For any questions about the CLA process, please refer to our [FAQ](https://cla.vmware.com/faq). diff --git a/dao/base.go b/dao/base.go index 721708fc7..fe1c5a0ed 100644 --- a/dao/base.go +++ b/dao/base.go @@ -77,7 +77,7 @@ func InitDB() { var err error var c net.Conn for { - c, err = net.Dial("tcp", addr+":"+port) + c, err = net.DialTimeout("tcp", addr+":"+port, 20*time.Second) if err == nil { c.Close() ch <- 1 diff --git a/kubernetes_deployment.md b/docs/kubernetes_deployment.md similarity index 100% rename from kubernetes_deployment.md rename to docs/kubernetes_deployment.md diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 170f0bd25..404a0b431 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -473,6 +473,36 @@ paths: description: Project ID does not exist. 500: description: Unexpected internal errors. + delete: + summary: Delete a repository or a tag in a repository. + description: | + This endpoint let user delete repositories and tags with repo name and tag. + parameters: + - name: repo_name + in: query + type: string + format: string + required: true + description: The name of repository which will be deleted. + - name: tag + in: query + type: string + format: string + required: false + description: Tag of a repository. + tags: + - Products + responses: + 200: + description: Delete repository or tag successfully. + 400: + description: Invalid repo_name. + 401: + description: Unauthorized. + 404: + description: Repository or tag not found. + 403: + description: Forbidden. /repositories/tags: get: summary: Get tags of a relevant repository.