Skip to content

Commit c1f8eef

Browse files
committed
Origin changes after cherry-picks
1 parent 5d4c7f1 commit c1f8eef

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

pkg/build/registry/buildconfig/webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func (h *WebHookHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
9494

9595
// ProcessWebHook does the actual work of processing the webhook request
9696
func (w *WebHookHandler) ProcessWebHook(writer http.ResponseWriter, req *http.Request, ctx apirequest.Context, name, subpath string) error {
97-
parts := strings.Split(subpath, "/")
97+
parts := strings.Split(strings.TrimPrefix(subpath, "/"), "/")
9898
if len(parts) != 2 {
9999
return errors.NewBadRequest(fmt.Sprintf("unexpected hook subpath %s", subpath))
100100
}

test/testdata/bootstrappolicy/bootstrap_namespace_role_bindings.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ items:
121121
kind: Role
122122
name: shared-resource-viewer
123123
subjects:
124-
- kind: Group
124+
- apiGroup: rbac.authorization.k8s.io
125+
kind: Group
125126
name: system:authenticated
126127
kind: List
127128
metadata: {}

test/testdata/bootstrappolicy/bootstrap_service_account_project_role_bindings.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ items:
1111
kind: ClusterRole
1212
name: system:image-puller
1313
subjects:
14-
- kind: Group
14+
- apiGroup: rbac.authorization.k8s.io
15+
kind: Group
1516
name: system:serviceaccounts:myproject
1617
- apiVersion: rbac.authorization.k8s.io/v1beta1
1718
kind: RoleBinding

0 commit comments

Comments
 (0)