You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -2097,9 +2118,9 @@ Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordina
2097
2118
},
2098
2119
},
2099
2120
expectedMessage: `attempting to change immutable fields:
2100
-
- volumeClaimTemplates:
2101
-
from: [data(1Gi)]
2102
-
to: [data(2Gi)]
2121
+
- volumeClaimTemplates.data:
2122
+
from: "1Gi"
2123
+
to: "2Gi"
2103
2124
2104
2125
Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden`,
2105
2126
},
@@ -2181,22 +2202,84 @@ Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordina
2181
2202
Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden`,
expectedMessage: `attempting to change immutable fields:
2233
+
- volumeClaimTemplates.argocd-dex-server-tls:
2234
+
from: "1Gi"
2235
+
to: "4Gi"
2236
+
- volumeClaimTemplates.dexconfig:
2237
+
from: "1Gi"
2238
+
to: "3Gi"
2239
+
- volumeClaimTemplates.static-files:
2240
+
from: "1Gi"
2241
+
to: "2Gi"
2242
+
2243
+
Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden`,
expectedMessage: `attempting to change immutable fields:
2194
-
- podManagementPolicy:
2195
-
from: "OrderedReady"
2196
-
to: "Parallel"
2274
+
- selector:
2275
+
from: {app:postgresql}
2276
+
to: {app:postgresql-new}
2197
2277
- serviceName:
2198
-
from: "old-svc"
2199
-
to: "new-svc"
2278
+
from: "postgresql-svc"
2279
+
to: "postgresql-svc-new"
2280
+
- volumeClaimTemplates.static-files:
2281
+
from: "1Gi"
2282
+
to: "2Gi"
2200
2283
2201
2284
Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden`,
2202
2285
},
@@ -2206,23 +2289,23 @@ Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordina
2206
2289
t.Run(tt.name, func(t*testing.T) {
2207
2290
current:=&unstructured.Unstructured{
2208
2291
Object: map[string]interface{}{
2209
-
"apiVersion": "apps/v1",
2292
+
"apiVersion": testAPIVersion,
2210
2293
"kind": "StatefulSet",
2211
2294
"metadata": map[string]interface{}{
2212
-
"name": "test-statefulset",
2213
-
"namespace": "default",
2295
+
"name": testStatefulSet,
2296
+
"namespace": testNamespace,
2214
2297
},
2215
2298
"spec": tt.currentSpec,
2216
2299
},
2217
2300
}
2218
2301
2219
2302
desired:=&unstructured.Unstructured{
2220
2303
Object: map[string]interface{}{
2221
-
"apiVersion": "apps/v1",
2304
+
"apiVersion": testAPIVersion,
2222
2305
"kind": "StatefulSet",
2223
2306
"metadata": map[string]interface{}{
2224
-
"name": "test-statefulset",
2225
-
"namespace": "default",
2307
+
"name": testStatefulSet,
2308
+
"namespace": testNamespace,
2226
2309
},
2227
2310
"spec": tt.desiredSpec,
2228
2311
},
@@ -2238,7 +2321,7 @@ Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordina
2238
2321
// Mock the resource operations to return immutable field error
2239
2322
mockResourceOps:=&kubetest.MockResourceOps{
2240
2323
Commands: map[string]kubetest.KubectlOutput{
2241
-
"test-statefulset": {
2324
+
testStatefulSet: {
2242
2325
Err: errors.New("Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden"),
0 commit comments