vmware-archive / operator-builder

A Kubebuilder plugin to accelerate the development of Kubernetes operators
MIT License
41 stars 6 forks source link

feat: source file name intelligence #291

Open scottd018 opened 2 years ago

scottd018 commented 2 years ago

Currently, the unique name for a source file is derived from the resources field such that a path of ../../.source/path/to/deployment.yaml would end up producing a source file name of source_path_to_deployment.go. We should implement the following logic:

  1. attempt to use the filename only
  2. in the event the filename has already been taken, use the full path

In the above scenario, the file name would be deployment.go and only if another file named deployment.yaml existed anywhere in the resources declaration would the full path be used.