Merge pull request #22905 from dfr/freebsd-kube

libpod: fix 'podman kube generate' on FreeBSD
This commit is contained in:
openshift-merge-bot[bot] 2024-06-05 10:55:50 +00:00 • committed by GitHub
commit a990ca4835
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1308,7 +1308,7 @@ func generateKubeSecurityContext(c *Container) (*v1.SecurityContext, bool, error
scHasData = true
sc.ReadOnlyRootFilesystem = &ro
}
if c.config.Spec.Linux.MaskedPaths == nil {
if c.config.Spec.Linux != nil && c.config.Spec.Linux.MaskedPaths == nil {
scHasData = true
unmask := v1.UnmaskedProcMount
sc.ProcMount = &unmask