vmware / versatile-data-kit

One framework to develop, deploy and operate data workflows with Python and SQL.
Apache License 2.0
420 stars 56 forks source link

Usability improvement of Kubernetes service #586

Open ivakoleva opened 2 years ago

ivakoleva commented 2 years ago

What is the feature request? What problem does it solve? VDKCS service for Kubernetes API communication needs usability improvement.

Suggested solution

  1. move KubernetesService to dedicated kubernetes package
  2. to simplify -> extract nested classes (JobStatus, JobStatusCondition, Resources, Probe, JobExecution, ContainerResourceType)
  3. for readability -> cleanup redundant private final field modifiers from @Value-annotated classes
  4. move to dedicated functions the content of afterPropertiesSet(), for example populateApiClient(), validateDataJobTemplate(), etc.
  5. what is health() unused method?
  6. organize the API surface -> group fields,getters/setters,contructor,methods by non-static/static then access modifier by public/package default/protected/private
  7. the sort the public group entries by logical purpose -> for example mark //namespace section then place createNamespace() then deleteNamespace(), mark //cronjob section then place listCronJobs(), readCronJob(), createCronJob()
  8. sort non-public group entries by purpose
  9. sort static public/non-public methods
  10. move static final fields to extending classes/util, based on usages
  11. refactor fromInteger and fromDateTime -> transform to (final) functions, eventually move to (final) utilities to reuse (JobStatus, JobStatusCondition, Resources, Probe)
sabadzhiev commented 1 year ago

There is some progress on this topic: https://github.com/vmware/versatile-data-kit/pull/2213.

Will keep this ticket open and will progress on this further, in the future.