Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable istio-sidecar injection #1778

Merged
merged 2 commits into from
Mar 16, 2023

Conversation

nagar-ajay
Copy link
Contributor

What this PR does / why we need it:

  • Currently none of the e2e tests run successfully in istio-enabled namespaces. All training jobs (created by tests) get stuck in Running state and eventually these tests fail after timeout. I think it's because istio sidecar keeps running even after the main containers runs successfully.

  • This is required as we want to run these tests as part of the training operator conformance test. As per the design doc of training operator conformance test, all these tests will run in the namespace created by the Kubeflow profile resource which is istio-enabled by default.

  • Disable Istio sidecar injection for training job containers.

  • Testing: Tested updated tests in default namespace and a istio enabled namespace.

Which issue(s) this PR fixes (optional, in Fixes #<issue number>, #<issue number>, ... format, will close the issue(s) when PR gets merged):
Fixes #

Checklist:

  • Docs included if any changes are user facing

@coveralls
Copy link

coveralls commented Mar 15, 2023

Pull Request Test Coverage Report for Build 4434355170

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.09%) to 39.296%

Files with Coverage Reduction New Missed Lines %
pkg/controller.v1/mpi/mpijob_controller.go 2 77.44%
Totals Coverage Status
Change from base Build 4425056442: -0.09%
Covered Lines: 2722
Relevant Lines: 6927

💛 - Coveralls

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for creating this PR!
I left a few comments.

scheduler_name=get_pod_spec_scheduler_name(GANG_SCHEDULER_NAME),
)),
template=V1PodTemplateSpec(
metadata=V1ObjectMeta(annotations={'sidecar.istio.io/inject': "false"}),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we move sidecar.istio.io/inject to constants.py?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can move but with this approach, we might end up having a lot of constants. Also, since sidecar.istio.io/inject is a standard annotation, this looks more readable to me.

And it's consistent with what we already have in training utils.
https://github.com/kubeflow/training-operator/blob/master/sdk/python/kubeflow/training/utils/utils.py#L325

Any specific reason to move it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, since sidecar.istio.io/inject is a standard annotation, this looks more readable to me.

We should avoid redeclaring the same words in many places since that causes bugs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it's consistent with what we already have in training utils.
https://github.com/kubeflow/training-operator/blob/master/sdk/python/kubeflow/training/utils/utils.py#L325

It would be better to move sidecar.istio.io/inject to sdk/python/kubeflow/training/constants/constants.py.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, let me move it.

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
/lgtm

/assign @johnugeorge

@johnugeorge
Copy link
Member

/approve

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johnugeorge, nagar-ajay

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 8871962 into kubeflow:master Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants