Commit 29851d0
Take last applied configuration into account when patching (#341)
If, as previously, we ignore the last-applied annotation when
comparing desired and actual, we end up with a result where,
when deleting all annotations in a change, no annotations are
deleted(!)
Going from
```
metadata:
name: my-pod
annotations:
x: y
```
to:
```
metadata:
name: my-pod
```
used to result in a patch that updated the last applied configuration
value only.
Now it correctly sets the old annotations to None too.
Break out apply_patch as a separate method to allow it be tested in
isolation.
Ensure that the last-applied annotation is sorted.
Ensure that the last-applied annotation is loaded consistently (i.e.
without unnecessary conversion to u'value's)1 parent 541edbf commit 29851d0
2 files changed
+89
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
54 | 83 | | |
55 | 84 | | |
56 | | - | |
| 85 | + | |
57 | 86 | | |
58 | 87 | | |
59 | 88 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
65 | 93 | | |
66 | 94 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
71 | 100 | | |
72 | | - | |
| 101 | + | |
73 | 102 | | |
74 | | - | |
| 103 | + | |
75 | 104 | | |
76 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
77 | 114 | | |
78 | 115 | | |
79 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
44 | 56 | | |
45 | 57 | | |
46 | 58 | | |
| |||
278 | 290 | | |
279 | 291 | | |
280 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
0 commit comments