github.com/gocrane/crane@v0.11.0/docs/mirror.md (about) 1 # Mirror Resources 2 3 ## About mirror resources 4 5 Because of various network issues, it is difficult to access GitHub resources such as GitHub Repo, GitHub Release, GitHub Raw Content `raw.githubusercontent.com` in some regions. 6 7 For a better experience, GoCrane offers several additional mirror repositories for you, but with some latency. 8 9 ## Image Registry 10 11 GoCrane provides a friendly way to use images to deploy and test. 12 13 GoCrane builds images based on the CI(GitHub Action). 14 15 ### Platforms 16 17 GoCrane now supports linux/amd64 and linux/arm64. 18 19 GoCrane still cares about arm users, like apple m1/m2. 20 21 ### Repo 22 Because of the network problems, GoCrane pushes the images to three different repo at the same time. 23 24 !!! tips 25 Click these links to see details. 26 - [DockerHub](https://hub.docker.com/u/gocrane) 27 - [Coding](https://finops.coding.net/public-artifacts/gocrane/crane/packages) 28 - [GitHub Container Registry](https://github.com/orgs/gocrane/packages?repo_name=crane) 29 30 If you locate in China, we recommend using the Coding repo. It's fast than other registry repo. 31 32 If you locate outside of China, we recommend using DockerHub and GitHub Container Registry. However, if you use Coding, the Registry may be slow. 33 34 ### Build logic 35 36 - Each branch 37 38 You can try the new features based on the branch images. In addition, we still reserve the early images. 39 40 - Each pull request 41 42 When you make a pull request to the crane repo, that will trigger CI to build images. In addition, a comment will include image info to the pull request when CI completes. 43 44 ### How to use the images? 45 46 Here use the main branch as an example. 47 The git commit hash is abc123. 48 49 #### Base on the branch name 50 51 !!! tips 52 The branch name still points to the last commit. Don't forget to re-pull the images when you want to try the new features. 53 54 === "DockerHub" 55 ```bash 56 docker pull gocrane/craned:main 57 ``` 58 59 === "Coding" 60 ```bash 61 docker pull finops-docker.pkg.coding.net/gocrane/crane/craned:main 62 ``` 63 64 === "GitHub Container Registry" 65 ```bash 66 docker pull ghcr.io/gocrane/crane/craned:main 67 ``` 68 69 #### Base on the branch name and the specific commit hash 70 71 === "DockerHub" 72 ```bash 73 docker pull gocrane/craned:main-abc123 74 ``` 75 76 === "Coding" 77 ```bash 78 docker pull finops-docker.pkg.coding.net/gocrane/crane/craned:main-abc123 79 ``` 80 81 === "GitHub Container Registry" 82 ```bash 83 docker pull ghcr.io/gocrane/crane/craned:main-abc123 84 ``` 85 86 87 ## Helm Resources 88 89 !!! tips 90 Sync the latest version of upstream every six hours 91 92 | Origin | Mirror | Type | Public | 93 | --------------------------------------------- | --------------------------------------------------------- | ------ | ----- | 94 | https://gocrane.github.io/helm-charts | https://finops-helm.pkg.coding.net/gocrane/gocrane | Helm | [Public](https://finops.coding.net/public-artifacts/gocrane/gocrane/packages) | 95 | https://prometheus-community.github.io/helm-charts | https://finops-helm.pkg.coding.net/gocrane/prometheus-community | Helm | [Public](https://finops.coding.net/public-artifacts/gocrane/prometheus-community/packages) | 96 | https://grafana.github.io/helm-charts | https://finops-helm.pkg.coding.net/gocrane/grafana | Helm | [Public](https://finops.coding.net/public-artifacts/gocrane/grafana/packages) | 97 98 ## Git Resources 99 100 !!! tips 101 Sync upstream repository every day 102 103 ### Coding 104 105 !!! warning 106 Now Coding is not support to fetch raw contents directly. You must be get token first. 107 108 | Origin | Mirror | Type | Public | 109 | --------------------------------------------- | --------------------------------------------------------- | ------ | ---- | 110 | https://github.com/gocrane/crane.git | https://e.coding.net/finops/gocrane/crane.git | Git | [Public](https://finops.coding.net/public/gocrane/crane/git/files) | 111 | https://github.com/gocrane/helm-charts.git | https://e.coding.net/finops/gocrane/helm-charts.git | Git | [Public](https://finops.coding.net/public/gocrane/helm-charts/git/files) | 112 | https://github.com/gocrane/api.git | https://e.coding.net/finops/gocrane/api.git | Git | [Public](https://finops.coding.net/public/gocrane/api/git/files) | 113 | https://github.com/gocrane/crane-scheduler.git | https://e.coding.net/finops/gocrane/crane-scheduler.git | Git | [Public](https://finops.coding.net/public/gocrane/crane-scheduler/git/files) | 114 | https://github.com/gocrane/fadvisor.git | https://e.coding.net/finops/gocrane/fadvisor.git | Git | [Public](https://finops.coding.net/public/gocrane/fadvisor/git/files) | 115 116 ### Gitee 117 118 | Origin | Mirror | Type | Public | 119 | --------------------------------------------- | --------------------------------------------------------- | ------ | ---- | 120 | https://github.com/gocrane/crane.git | https://gitee.com/finops/crane | Git | [Public](https://gitee.com/finops/crane) | 121 | https://github.com/gocrane/helm-charts.git | https://gitee.com/finops/helm-charts | Git | [Public](https://gitee.com/finops/helm-charts) | 122 | https://github.com/gocrane/crane-scheduler.git | https://gitee.com/finops/crane-scheduler | Git | [Public](https://gitee.com/finops/crane-scheduler) | 123 124 ## Get the raw file contents of the Coding repo 125 126 !!! warning 127 Now Coding is not support to fetch raw contents directly. You must be get token first. 128 129 Here you'll find out how to get the contents of a source file directly from the Coding Git repository via an HTTP request. 130 131 ### Coding Git Repo - Key Params 132 133 Similar to regular API requests, the Coding Git repository provides a corresponding API interface. 134 135 The following is an overview of the related parameters. 136 137 !!! tips Example "Example" 138 Using https://**finops**.coding.net/public/**gocrane**/**helm-charts**/git/files**/main/integration/grafana/override_values.yaml** as an example. [Click Here](https://finops.coding.net/public/gocrane/helm-charts/git/files/main/integration/grafana/override_values.yaml) 139 140 | Params | Description | example | 141 | ---- | ---- | ---- | 142 | `team` | Name of the team | `finops` | 143 | `project` | Name of the project | `gocrane` | 144 | `repo` | Name of the Git Repo | `helm-charts` | 145 | `branch` | Name of the branch | `main` | 146 | `file path` | The path to the file in the repo | `/integration/grafana/override_values.yaml` | 147 148 ### Constructing HTTP requests 149 150 By filling in the following URL construction rules according to the properties mentioned above, you can obtain a URL that can directly access the content of the source file. 151 152 ```bash 153 https://<team>.coding.net/p/<project>/d/<repo>/git/raw/<branch>/<file path>?download=false 154 155 https://finops.coding.net/p/gocrane/d/helm-charts/git/raw/main/integration/grafana/override_values.yaml?download=false 156 ``` 157 158 !!! tips 159 Try this command. 160 161 ```bash 162 curl https://finops.coding.net/p/gocrane/d/helm-charts/git/raw/main/integration/grafana/override_values.yaml?download=false 163 ```