This repository was archived by the owner on Dec 4, 2025. It is now read-only.
Commit bd6cd7c
committed
feat: use server side apply for dry runs where possible
Previously dry runs would always use client side apply. This is because server side apply is not compatible with the namespace auto creation feature - since the server side validation fails in this case (as expected).
This change uses server side apply for dry runs where ServerSideApply=true option is set, but not in the case where the CreateNamespace=true option is set.
An alternative would be to return an error if both auto-create namespace and server side apply options were set for dry runs. However this would be more of a breaking change
Signed-off-by: abuck <abuck@spotify.com>1 parent 90b69e9 commit bd6cd7c
File tree
3 files changed
+110
-21
lines changed- pkg
- sync
- utils/kube/kubetest
3 files changed
+110
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1042 | 1042 | | |
1043 | 1043 | | |
1044 | 1044 | | |
1045 | | - | |
1046 | | - | |
1047 | | - | |
1048 | | - | |
1049 | | - | |
1050 | | - | |
1051 | | - | |
1052 | | - | |
1053 | | - | |
| 1045 | + | |
1054 | 1046 | | |
1055 | 1047 | | |
1056 | 1048 | | |
| |||
1059 | 1051 | | |
1060 | 1052 | | |
1061 | 1053 | | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
1062 | 1069 | | |
| 1070 | + | |
| 1071 | + | |
1063 | 1072 | | |
1064 | 1073 | | |
1065 | | - | |
1066 | | - | |
1067 | | - | |
1068 | | - | |
1069 | | - | |
1070 | | - | |
| 1074 | + | |
1071 | 1075 | | |
1072 | 1076 | | |
| 1077 | + | |
| 1078 | + | |
1073 | 1079 | | |
1074 | 1080 | | |
1075 | 1081 | | |
1076 | 1082 | | |
1077 | | - | |
| 1083 | + | |
1078 | 1084 | | |
1079 | 1085 | | |
1080 | 1086 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
860 | 861 | | |
861 | 862 | | |
862 | 863 | | |
863 | | - | |
864 | | - | |
865 | | - | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
866 | 867 | | |
867 | 868 | | |
868 | 869 | | |
| |||
873 | 874 | | |
874 | 875 | | |
875 | 876 | | |
876 | | - | |
| 877 | + | |
877 | 878 | | |
878 | 879 | | |
879 | 880 | | |
| |||
2180 | 2181 | | |
2181 | 2182 | | |
2182 | 2183 | | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
110 | 124 | | |
111 | 125 | | |
112 | 126 | | |
113 | 127 | | |
114 | 128 | | |
| 129 | + | |
115 | 130 | | |
116 | 131 | | |
117 | 132 | | |
| |||
0 commit comments