Commit b00c51e
authored
Support registration of multiple Porch repositories pointing to the same Git repository, and add webhook validation to detect and handle conflicts during repository creation (kptdev#335)
* Add support for multiple porch repos to connect to the same git repo
- Create validation webhook for repositories.config.porch.kpt.dev
- Update directory naming convention for git repo caching
* Add ns separation for same repos regitered in different namespaces
* Add repolocks for open and close
* Add missing package path and remove duplication of packages when listing
* Add git branch logic for conflicts and use apiserver client in webhooks
* Add cachedir pooling and refactor git.go
* Add Client.Reader for webhooks and modify logs in webhooks.go
* Update Lock, e2e test and reject branch changes
* Create commitopsbuilder and add unit tests
* Use sync.Map to simplify mutex handling and remove client.Reader
* Rebase and refactor e2e tests with new structure1 parent dbae7e1 commit b00c51e
25 files changed
Lines changed: 2097 additions & 767 deletions
File tree
- pkg
- apiserver
- cache
- crcache
- dbcache
- repomap
- externalrepo
- fake
- git
- registry/porch
- test/e2e
- api
- suiteutils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | 156 | | |
158 | 157 | | |
159 | 158 | | |
160 | | - | |
161 | 159 | | |
162 | 160 | | |
163 | 161 | | |
164 | 162 | | |
165 | 163 | | |
166 | 164 | | |
167 | 165 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
| 166 | + | |
176 | 167 | | |
177 | 168 | | |
178 | 169 | | |
| |||
198 | 189 | | |
199 | 190 | | |
200 | 191 | | |
201 | | - | |
| 192 | + | |
202 | 193 | | |
203 | 194 | | |
204 | 195 | | |
| |||
305 | 296 | | |
306 | 297 | | |
307 | 298 | | |
308 | | - | |
| 299 | + | |
309 | 300 | | |
310 | 301 | | |
311 | 302 | | |
| |||
0 commit comments