Make mergePodSpec pick up enableServiceLinks (#1601)

Attribute enableServiceLinks can be now configured in PodSpec so that environment variables are not injected in function pods and DNS is used for discovery
This commit is contained in:
darkworon
2020-05-13 14:42:07 +05:30
committed by GitHub
parent 2331dffe4c
commit 806104626f
+5
View File
@@ -106,6 +106,11 @@ func MergePodSpec(srcPodSpec *apiv1.PodSpec, targetPodSpec *apiv1.PodSpec) (*api
srcPodSpec.TerminationGracePeriodSeconds = targetPodSpec.TerminationGracePeriodSeconds
}
// Possibility to disable kubernetes environment variables for functions/environments (#1599)
if targetPodSpec.EnableServiceLinks != nil {
srcPodSpec.EnableServiceLinks = targetPodSpec.EnableServiceLinks
}
//TODO - Security context should be merged instead of overriding.
if targetPodSpec.SecurityContext != nil {
srcPodSpec.SecurityContext = targetPodSpec.SecurityContext