From 71978b0a0c7f6a8e1a6a482b7f8dd105b371d3de Mon Sep 17 00:00:00 2001 From: François Poirotte Date: Fri, 2 Sep 2022 00:29:24 +0200 Subject: Fix #15243 Set AutomountServiceAccountToken to false MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit podman does not use any service account token, so we set the automount flag to false in podman generate kube. Signed-off-by: François Poirotte --- libpod/kube.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'libpod') diff --git a/libpod/kube.go b/libpod/kube.go index a70782d69..a3bc7efff 100644 --- a/libpod/kube.go +++ b/libpod/kube.go @@ -470,13 +470,16 @@ func newPodObject(podName string, annotations map[string]string, initCtrs, conta } // Set enableServiceLinks to false as podman doesn't use the service port environment variables enableServiceLinks := false + // Set automountServiceAccountToken to false as podman doesn't use service account tokens + automountServiceAccountToken := false ps := v1.PodSpec{ - Containers: containers, - Hostname: hostname, - HostNetwork: hostNetwork, - InitContainers: initCtrs, - Volumes: volumes, - EnableServiceLinks: &enableServiceLinks, + Containers: containers, + Hostname: hostname, + HostNetwork: hostNetwork, + InitContainers: initCtrs, + Volumes: volumes, + EnableServiceLinks: &enableServiceLinks, + AutomountServiceAccountToken: &automountServiceAccountToken, } if dnsOptions != nil && (len(dnsOptions.Nameservers)+len(dnsOptions.Searches)+len(dnsOptions.Options) > 0) { ps.DNSConfig = dnsOptions -- cgit v1.2.3-54-g00ecf