Repository navigation
Commit d86746d
authored
Reject snapshotConfig.storageLocation without its preview gate (#3357)
Follow-up to #2544, from review comment
#2544 (comment).
`snapshotConfig.storageLocation` was accepted and ignored while the
`PerTemplateSnapshotLocation` gate was off. A user could name a bucket,
get a success response, and have snapshots written under the cluster
`--snapshot-location`.
### What changed?
Tested on kind with the cluster
`--snapshot-location=gs://ate-snapshots/`. `<loc>` is the template's
`storageLocation`.
| Gate | Case | Before (`7e6476cbd`) | This PR |
|---|---|---|---|
| ON | with `storageLocation`, `--preview` | created, snapshot under
`<loc>` | created, snapshot under `<loc>` |
| ON | with `storageLocation`, no `--preview` | rejected: `Forbidden:
requires a client that opts in to preview features ...` | rejected:
`Forbidden` |
| ON | without `storageLocation` | created, snapshot under
`gs://ate-snapshots/` | same |
| OFF | with `storageLocation`, `--preview` | created, but snapshot
under `gs://ate-snapshots/`, not `<loc>` | rejected: `Forbidden` |
| OFF | with `storageLocation`, no `--preview` | created, field ignored
| rejected: `Forbidden` |
| OFF | without `storageLocation` | created, snapshot under
`gs://ate-snapshots/` | same |
### API validation
- With preview off, a template that sets `storageLocation` is rejected
with `InvalidArgument`. Before, it was accepted and silently ignored.
- The old custom check is replaced by the standard ifDisabled forbidden
rule that other preview fields use.
### Demos and benchmarks
- No demo or benchmark template sets `storageLocation` any more. They
all store snapshots under the cluster `--snapshot-location`.
- `${BUCKET_NAME}` templating is gone from the demo rendering and the
benchmark deploy scripts. The traffic-driver script loses
`--bucket-name`.
### Install (ate-setup)
- The comments and operator docs now say that the demos, benchmarks and
e2e need `SNAPSHOT_LOCATION` even with the gate on.
### E2E fixtures and suites
- With the gate on, the fixtures, combinedvolumes, and the demo, golden
and template-update tests each set their own per-template location
through `e2e.SnapshotLocation`. With it off, they leave the field out.
- Templates copied from a demo also get their own location with the gate
on. This brings per-template coverage back to the networkpolicy and
egress suites.
### Unit tests
- Validation tests now expect `Forbidden` when preview is off. Length
and URI checks run with preview on.
- The control API tests no longer rely on a default `storageLocation`.
They set the cluster default the way nearby tests do.
- The demo manifest tests and the kubectl-ate template tests fail if a
shipped manifest sets `storageLocation` again.
### Docs
- The API guide, operator install docs, demo READMEs, benchmarking
README and the preview gate doc no longer mention bucket templating.
They describe the field as preview-only.
---------
Signed-off-by: Sneha Aradhey <[email protected]>1 parent ea4018f commit d86746d
98 files changed
Lines changed: 283 additions & 359 deletions
File tree
- api/ateapi/v1
- benchmarking
- nighthawk-egress
- workloads
- manifests
- sweperf
- generated
- cmd
- ate-setup
- internal
- config
- demos
- claudemultiplex
- demotest
- steps
- ateapi/internal
- apivalidation
- controlapi
- functionaltest
- kubectl-ate/internal/cmd
- demos
- claude-code-multiplex
- counter
- egress
- jupyter
- multi-template
- parking
- sandbox
- docs
- internal
- e2e
- fixtures
- capabilities
- probe
- security
- testserver
- suites
- authz
- capabilities
- combinedvolumes
- demo
- egresscredinject
- egressmitm
- identity
- multiactor
- networking
- parking
- security
- sizing
- snapshotcredentials
- preview
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1279 | 1279 | | |
1280 | 1280 | | |
1281 | 1281 | | |
1282 | | - | |
| 1282 | + | |
1283 | 1283 | | |
1284 | 1284 | | |
| 1285 | + | |
1285 | 1286 | | |
1286 | 1287 | | |
1287 | 1288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | | - | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
| |||
60 | 58 | | |
61 | 59 | | |
62 | 60 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 61 | | |
71 | 62 | | |
72 | 63 | | |
| |||
150 | 141 | | |
151 | 142 | | |
152 | 143 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | 144 | | |
158 | 145 | | |
159 | 146 | | |
| |||
181 | 168 | | |
182 | 169 | | |
183 | 170 | | |
184 | | - | |
185 | | - | |
| 171 | + | |
186 | 172 | | |
187 | 173 | | |
188 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 26 | | |
33 | 27 | | |
34 | 28 | | |
| |||
192 | 186 | | |
193 | 187 | | |
194 | 188 | | |
195 | | - | |
196 | | - | |
| 189 | + | |
197 | 190 | | |
198 | 191 | | |
199 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
0 commit comments