Skip to content

Commit

Permalink
Set enableServiceLinks to True by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
blockjesper committed Apr 4, 2024
1 parent 9a07ff6 commit 87651b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion k8s/models/pod.py
Expand Up @@ -216,7 +216,7 @@ class PodSpec(Model):
automountServiceAccountToken = Field(bool)
imagePullSecrets = ListField(LocalObjectReference)
initContainers = ListField(Container)
enableServiceLinks = Field(bool)
enableServiceLinks = Field(bool, True)


class PodTemplateSpec(Model):
Expand Down
2 changes: 2 additions & 0 deletions tests/k8s/test_pod.py
Expand Up @@ -122,6 +122,8 @@ def test_get_or_create_pod_not_new(self, put, get):
call_params = pod.as_dict()
put.return_value.json.return_value = call_params

assert pod.spec.enableServiceLinks is True

pod.save()
pytest.helpers.assert_any_call(put, POD_URI + NAME, call_params)

Expand Down

0 comments on commit 87651b4

Please sign in to comment.