mirror of
https://github.com/containers/podman.git
synced 2025-10-17 03:04:21 +08:00
Remove ReservedAnnotations from kube generate specification
Reserved annotations are used internally by Podman and would effect nothing when run with Kubernetes so we should not be generating these annotations. Fixes: https://github.com/containers/podman/issues/17105 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -120,3 +120,15 @@ const (
|
||||
// ContainerManagerLibpod indicates that libpod created and manages the
|
||||
// container.
|
||||
const ContainerManagerLibpod = "libpod"
|
||||
|
||||
// IsReservedAnnotation returns true if the specified value corresponds to an
|
||||
// already reserved annotation that Podman sets during container creation.
|
||||
func IsReservedAnnotation(value string) bool {
|
||||
switch value {
|
||||
case Annotations, ContainerID, ContainerName, ContainerType, Created, HostName, CgroupParent, IP, NamespaceOptions, SeccompProfilePath, Image, ImageName, ImageRef, KubeName, PortMappings, Labels, LogPath, Metadata, Name, Namespace, PrivilegedRuntime, ResolvPath, HostnamePath, SandboxID, SandboxName, ShmPath, MountPoint, RuntimeHandler, TTY, Stdin, StdinOnce, Volumes, HostNetwork, CNIResult, ContainerManager:
|
||||
return true
|
||||
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user