Skip to content

Commit 05192af

Browse files
committed
Specify field manager when patching resources in sessionspaces
1 parent 9072114 commit 05192af

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

sessionspaces/src/resources/config_maps.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ pub async fn create_configmap(
6565
configmaps
6666
.patch(
6767
NAME,
68-
&PatchParams::default(),
68+
&PatchParams {
69+
field_manager: Some("sessionspaces".to_string()),
70+
..Default::default()
71+
},
6972
&Patch::Apply(&ConfigMap {
7073
metadata: ObjectMeta {
7174
name: Some(NAME.to_string()),

sessionspaces/src/resources/namespace.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ pub async fn create_namespace(
3838
let api = Api::<Namespace>::all(k8s_client.clone());
3939
api.patch(
4040
&namespace,
41-
&PatchParams::default(),
41+
&PatchParams {
42+
field_manager: Some("sessionspaces".to_string()),
43+
..Default::default()
44+
},
4245
&Patch::Apply(&Namespace {
4346
metadata: ObjectMeta {
4447
name: Some(namespace.clone()),
@@ -67,7 +70,10 @@ mod tests {
6770
async fn create_new_namespace() {
6871
let mut server = Server::new_async().await;
6972
let mock_patch_test_namespace = server
70-
.mock("PATCH", "/api/v1/namespaces/test?")
73+
.mock(
74+
"PATCH",
75+
"/api/v1/namespaces/test?&fieldManager=sessionspaces",
76+
)
7177
.with_status(201)
7278
.with_header("content-type", "application/json")
7379
.with_body(

0 commit comments

Comments
 (0)