Should we just add annotations as long as they are < 63 chars? Would that fix the problem.
An initial pull request can be found here to add a flag to maintain the original annotation length for those longer than 63 characters: https://github.com/containers/podman/pull/19102 I am just starting the work to add an additional flag and the wiring to allow for reserved annotations in the generated YAML.
The final PRs for this feature were merged upstream and will be included in RHEL 9.4: https://github.com/containers/podman/pull/19211 https://github.com/containers/podman/pull/19208
Assigning to @jnovy for any further packaging or BZ needs.
Sanity tests are passed on upstream podman. 7974eb181b09b2fe5d53a8988ff4413788543264 [root@kvm-01-guest18 podman]# git branch * main [root@kvm-01-guest18 podman]# git rev-parse HEAD 7974eb181b09b2fe5d53a8988ff4413788543264 [root@kvm-01-guest18 podman]# ./test/tools/build/ginkgo -focus "podman kube generate --podman-only" test/e2e/ ...ignore... [SynchronizedAfterSuite] /root/podman/test/e2e/common_test.go:196 integration timing results Podman kube generate podman kube generate --podman-only on container with --rm 0.155923 Podman kube generate podman kube generate --podman-only on container with --cidfile 0.156007 Podman kube generate podman kube generate --podman-only on container with --init 0.156307 Podman kube generate podman kube generate --podman-only on container with --privileged 0.165792 Podman kube generate podman kube generate --podman-only on container with --security-opt apparmor=unconfined 0.166067 Podman kube generate podman kube generate --podman-only on container with --security-opt seccomp=unconfined 0.169739 Podman kube generate podman kube generate --podman-only on container with --security-opt label=level:s0 0.268152 Podman kube generate podman kube generate --podman-only on container with --volumes-from 0.447737 Podman kube generate podman kube generate --podman-only on container with --publish-all 2.249498 [SynchronizedAfterSuite] PASSED [1.743 seconds] ------------------------------ [DeferCleanup (Suite)] /root/podman/vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go:153 [DeferCleanup (Suite)] PASSED [0.000 seconds] ------------------------------ [DeferCleanup (Suite)] /root/podman/vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go:153 [DeferCleanup (Suite)] PASSED [0.000 seconds] ------------------------------ Ran 9 of 2056 Specs in 91.936 seconds SUCCESS! -- 9 Passed | 0 Failed | 0 Pending | 2047 Skipped PASS Ginkgo ran 1 suite in 1m54.557250578s Test Suite Passed