Skip to content

Commit

Permalink
Set EnableServiceLinks=false for all pods
Browse files Browse the repository at this point in the history
This is legacy feature which contaminates environment variables
with docker-compatible references to all services in namespace.

Link: https://kubernetes.io/docs/tutorials/services/connect-applications-service/#accessing-the-service
Link: kubernetes/kubernetes#121787
  • Loading branch information
koct9i committed Apr 11, 2024
1 parent 7e433ca commit 9a0b10b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/components/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@ func (s *serverImpl) rebuildStatefulSet() *appsv1.StatefulSet {
command = append(command, s.instanceSpec.EntrypointWrapper...)
command = append(command, s.binaryPath, "--config", path.Join(consts.ConfigMountPoint, fileNames[0]))

setHostnameAsFQDN := true
statefulSet.Spec.Template.Spec = corev1.PodSpec{
RuntimeClassName: s.instanceSpec.RuntimeClassName,
ImagePullSecrets: s.commonSpec.ImagePullSecrets,
SetHostnameAsFQDN: &setHostnameAsFQDN,
RuntimeClassName: s.instanceSpec.RuntimeClassName,
ImagePullSecrets: s.commonSpec.ImagePullSecrets,
SetHostnameAsFQDN: ptr.Bool(true),
EnableServiceLinks: ptr.Bool(false),
Containers: []corev1.Container{
{
Image: s.image,
Expand Down

0 comments on commit 9a0b10b

Please sign in to comment.