diff options
author | François Poirotte <clicky@erebot.net> | 2022-09-02 00:29:24 +0200 |
---|---|---|
committer | François Poirotte <clicky@erebot.net> | 2022-09-04 22:51:56 +0200 |
commit | 71978b0a0c7f6a8e1a6a482b7f8dd105b371d3de (patch) | |
tree | 9cfa3b9bcd1c6ba6d040fd85149fa5d491a8afe9 /libpod | |
parent | 9ab6449e36792734853eb59161ccd3bfe5d0d509 (diff) | |
download | podman-71978b0a0c7f6a8e1a6a482b7f8dd105b371d3de.tar.gz podman-71978b0a0c7f6a8e1a6a482b7f8dd105b371d3de.tar.bz2 podman-71978b0a0c7f6a8e1a6a482b7f8dd105b371d3de.zip |
Fix #15243 Set AutomountServiceAccountToken to false
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 <clicky@erebot.net>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/kube.go | 15 |
1 files changed, 9 insertions, 6 deletions
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 |