kuberay icon indicating copy to clipboard operation
kuberay copied to clipboard

[Feature] Replace kustomize with kubectl in E2E tests.

Open kevin85421 opened this issue 3 years ago • 5 comments
trafficstars

Search before asking

  • [X] I had searched in the issues and found no similar feature requirement.

Description

We use kustomize in tests/kuberay_utils/utils.py. However, kustomize has already been integrated with kubectl (Link). Hence, we can replace kustomize commands with kubectl commands to avoid redundant dependencies.

Use case

No response

Related issues

No response

Are you willing to submit a PR?

  • [ ] Yes I am willing to submit a PR!

kevin85421 avatar Oct 12 '22 01:10 kevin85421

cc @jasoonn

kevin85421 avatar Oct 12 '22 01:10 kevin85421

kustomize provides sdk and if you prefer to use programming way, you can adopt it as well. For command line execution, kubectl kustomize definitely makes more sense

Jeffwan avatar Oct 12 '22 05:10 Jeffwan

kustomize provides sdk and if you prefer to use programming way, you can adopt it as well. For command line execution, kubectl kustomize definitely makes more sense

Thank @Jeffwan for this information! I try to search for Python SDK for Kustomize. I found python-kustomize, but the project is not under maintenance. Is there any other Python Kustomize SDK? Thanks!

kevin85421 avatar Oct 12 '22 06:10 kevin85421

I found that kubectl only supports applying kustomization.yaml instead of creating and editing kustomization.yaml, which is utilized in tests/kuberay_utils/utils.py. If we want to get rid of kustomize, we might need to create a template kustomization.yaml and use JSON Patch to update it.

jasoonn avatar Oct 13 '22 22:10 jasoonn

I found that kubectl only supports applying kustomization.yaml instead of creating and editing kustomization.yaml, which is utilized in tests/kuberay_utils/utils.py. If we want to get rid of kustomize, we might need to create a template kustomization.yaml and use JSON Patch to update it.

Good point. I think the possible solutions are: (1) Use kustomize Python SDK (2) Use JSON Patch

Gentle ping @Jeffwan
Is there any other Python Kustomize SDK? Thank you!

kevin85421 avatar Oct 13 '22 23:10 kevin85421

Close this issue because Kustomize has been removed from existing tests in https://github.com/ray-project/kuberay/pull/759.

kevin85421 avatar Dec 03 '22 02:12 kevin85421