-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2754 from zalando/cw2023freeze
Cw2023freeze
- Loading branch information
Showing
43 changed files
with
2,322 additions
and
343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
cmd/webhook/admission/testdata/rg/rg-with-invalid-backend-path.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{ | ||
"request": { | ||
"uid": "req-uid", | ||
"name": "req1", | ||
"operation": "create", | ||
"kind": { | ||
"group": "zalando", | ||
"version": "v1", | ||
"kind": "RouteGroup" | ||
}, | ||
"namespace": "n1", | ||
"object": { | ||
"metadata": { | ||
"name": "rg1", | ||
"namespace": "n1" | ||
}, | ||
"spec": { | ||
"backends": [ | ||
{ | ||
"name": "valid-backend1", | ||
"type": "shunt" | ||
}, | ||
{ | ||
"name": "valid-backend3", | ||
"type": "network", | ||
"address": "http://example.com" | ||
}, | ||
{ | ||
"name": "invalid-backend2", | ||
"type": "network", | ||
"address": "http://example.com/foo" | ||
}, | ||
{ | ||
"name": "invalid-backend3", | ||
"type": "network", | ||
"address": "http://example.com/foo/bar" | ||
}, | ||
{ | ||
"name": "invalid-backend4", | ||
"type": "network", | ||
"address": "http://example.com/foo/" | ||
}, | ||
{ | ||
"name": "invalid-backend5", | ||
"type": "network", | ||
"address": "/foo" | ||
}, | ||
{ | ||
"name": "valid-backend2", | ||
"type": "network", | ||
"address": "http://user:[email protected]" | ||
}, | ||
{ | ||
"name": "invalid-backend6", | ||
"type": "network", | ||
"address": "http://example.com/" | ||
}, | ||
{ | ||
"name": "invalid-backend7", | ||
"type": "network", | ||
"address": "example.com/" | ||
}, | ||
{ | ||
"name" : "invalid-backend8", | ||
"type" : "network", | ||
"address" : "example.com/foo" | ||
}, | ||
{ | ||
"name" : "invalid-backend9", | ||
"type" : "network", | ||
"address" : "http://example.com?foo=bar" | ||
}, | ||
{ | ||
"name": "invalid-backend10", | ||
"type": "network", | ||
"address": "example.com" | ||
} | ||
], | ||
"defaultBackends": [ | ||
{ | ||
"backendName": "valid-backend1" | ||
} | ||
], | ||
"routes": [ | ||
{ | ||
"backends": [ | ||
{ | ||
"backendName": "valid-backend1" | ||
} | ||
], | ||
"filters": [ | ||
"status(201)" | ||
], | ||
"path": "/", | ||
"predicates": [ | ||
"Method(\"GET\")" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
cmd/webhook/admission/testdata/rg/rg-with-multiple-filters.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"request": { | ||
"uid": "req-uid", | ||
"name": "req1", | ||
"operation": "create", | ||
"kind": { | ||
"group": "zalando", | ||
"version": "v1", | ||
"kind": "RouteGroup" | ||
}, | ||
"namespace": "n1", | ||
"object": { | ||
"metadata": { | ||
"name": "rg1", | ||
"namespace": "n1" | ||
}, | ||
"spec": { | ||
"backends": [ | ||
{ | ||
"name": "backend", | ||
"type": "shunt" | ||
} | ||
], | ||
"defaultBackends": [ | ||
{ | ||
"backendName": "backend" | ||
} | ||
], | ||
"routes": [ | ||
{ | ||
"backends": [ | ||
{ | ||
"backendName": "backend" | ||
} | ||
], | ||
"filters": [ | ||
"status(201) -> inlineContent(\"hi\")", | ||
" " | ||
], | ||
"path": "/", | ||
"predicates": [ | ||
"Method(\"GET\")" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
cmd/webhook/admission/testdata/rg/rg-with-multiple-predicates.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"request": { | ||
"uid": "req-uid", | ||
"name": "req1", | ||
"operation": "create", | ||
"kind": { | ||
"group": "zalando", | ||
"version": "v1", | ||
"kind": "RouteGroup" | ||
}, | ||
"namespace": "n1", | ||
"object": { | ||
"metadata": { | ||
"name": "rg1", | ||
"namespace": "n1" | ||
}, | ||
"spec": { | ||
"backends": [ | ||
{ | ||
"name": "backend", | ||
"type": "shunt" | ||
} | ||
], | ||
"defaultBackends": [ | ||
{ | ||
"backendName": "backend" | ||
} | ||
], | ||
"routes": [ | ||
{ | ||
"backends": [ | ||
{ | ||
"backendName": "backend" | ||
} | ||
], | ||
"filters": [ | ||
"status(201)" | ||
], | ||
"path": "/", | ||
"predicates": [ | ||
"Method(\"GET\") && Path(\"/\")", | ||
" " | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.