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

Reorganize controllers code structure #1302

Merged

Commits on Jul 14, 2021

  1. Fix crd installation issue

    CustomResourceDefinition.apiextensions.k8s.io "tfjobs.kubeflow.org" is invalid:
    spec.validation.openAPIV3Schema.properties[metadata]: Forbidden: must not specify anything other than name and generateName,
    but metadata is implicitly specified
    
    Signed-off-by: Jiaxin Shan <[email protected]>
    Jeffwan committed Jul 14, 2021
    Configuration menu
    Copy the full SHA
    7f2124d View commit details
    Browse the repository at this point in the history
  2. Clean up controllers

    1. Move all ControllerInterface implementations to [framework]_controller.go
    2. Clean up job.go pod.go service.go status.go
    3. Follow exact same method order here https://github.com/kubeflow/common/blob/9ffa565bc60e08936f7f80cb3f491cf53f256e7f/pkg/apis/common/v1/interface.go
    
    Signed-off-by: Jiaxin Shan <[email protected]>
    Jeffwan committed Jul 14, 2021
    Configuration menu
    Copy the full SHA
    43f308e View commit details
    Browse the repository at this point in the history
  3. Embed common.JobController instead of TFController

    I notice previous change embed TFController which means most of the methods still use tfjob client. We need to make controller consistent and `TFJobReconciler` should override `common.JobController`.
    
    With this change, it would be very easy to make original tf operator and new reconciler work together. We also avoid one more refactor when we will remove original TFController codes
    
    Signed-off-by: Jiaxin Shan <[email protected]>
    Jeffwan committed Jul 14, 2021
    Configuration menu
    Copy the full SHA
    22cc34e View commit details
    Browse the repository at this point in the history