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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user