Skip to content

Commit 85f8953

Browse files
fmountclaude
andcommitted
Use server-side apply for swift-ring-files ConfigMap
Client-side `oc apply` writes the entire manifest into the last-applied-configuration annotation, which can exceed the limit when Swift ring files are large. Using `oc apply --server-side` avoids this annotation entirely while remaining idempotent, unlike `oc create` which would fail on retries if the resource already exists. Closes: OSPRH-25258 Co-Authored-By: Claude Opus <noreply@anthropic.com> Signed-off-by: Francesco Pantano <fpantano@redhat.com>
1 parent ba2b031 commit 85f8953

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

docs_user/modules/proc_adopting-the-object-storage-service.adoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ EOF
3030
. Create the `swift-ring-files` `ConfigMap` that includes the {object_storage} ring files:
3131
+
3232
----
33-
$ oc apply -f - <<EOF
33+
$ oc apply --server-side -f - <<EOF
3434
apiVersion: v1
3535
kind: ConfigMap
3636
metadata:
@@ -42,6 +42,13 @@ binaryData:
4242
object.ring.gz: $($CONTROLLER1_SSH "base64 -w0 /var/lib/config-data/puppet-generated/swift/etc/swift/object.ring.gz")
4343
EOF
4444
----
45+
+
46+
[NOTE]
47+
====
48+
The `--server-side` flag is required because the {object_storage} ring files
49+
can be large enough to exceed the annotation size limit imposed by
50+
client-side `oc apply`.
51+
====
4552

4653
. Patch the `OpenStackControlPlane` custom resource to deploy the {object_storage}:
4754
+

tests/roles/swift_adoption/tasks/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{{ shell_header }}
1919
{{ oc_header }}
2020
CONTROLLER1_SSH="{{ controller1_ssh }}"
21-
oc apply -f - <<EOF
21+
oc apply --server-side -f - <<EOF
2222
apiVersion: v1
2323
kind: ConfigMap
2424
metadata:

0 commit comments

Comments
 (0)