lifecycle-toolkit icon indicating copy to clipboard operation
lifecycle-toolkit copied to clipboard

Create command for updating auto-generated docs and helm resources for CRD structs

Open bacherfl opened this issue 1 year ago • 12 comments

Details

Currently, whenever a change to a CRD struct in lifecycle-operator/apis or metrics-operator/api is done (e.g. when the name of a field is changed), there is a number of steps to be performed manually to properly adapt that change.

  1. Run make generate in the operator directory to update the zz_autogenerated.deepcopy.go files
  2. Run make manifests to update the CRD manifests in the operator's config directory
  3. Copy the generated manifest for the CRD to helm/chart/templates/ ⚠️ editing needed in the common labels import (see https://github.com/keptn/lifecycle-toolkit/blob/main/helm/chart/templates/analysis-crd.yaml#L7 and https://github.com/keptn/lifecycle-toolkit/blob/main/helm/chart/templates/analysis-crd.yaml#L12)
  4. Update the auto-generated CRD docs by running ./.github/scripts/generate-crd-docs/generate-crd-docs.sh

This process should be made easier by adding a new target in the Makefile that takes care of these steps

DoD

  • [ ] Document in our docs the make command to run
  • [ ] The command shall be called make resources

bacherfl avatar Aug 11 '23 06:08 bacherfl

Hey @bacherfl would like to work on this issue

YashPimple avatar Aug 18 '23 18:08 YashPimple

Heyy @mowies I had an doubt in the above issue if we see third point in the above issue description copy the generated manifest for the CRD to helm/chart/templates/ so for the generated CRD need to store them in helm/chart/templates/ However it appears that the directory is not present in our current keptn repository so at which other place we can store the generate CRD or should we store them in chart/templates would like to get your views on it ?

YashPimple avatar Oct 09 '23 12:10 YashPimple

That folder got updated in a recent PR! Please use chart/templates instead :)

mowies avatar Oct 09 '23 14:10 mowies

@YashPimple any updates? :)

mowies avatar Nov 15 '23 10:11 mowies

I was checking out the Project Roadmap and saw this issue in the backlog, @YashPimple are you working on this issue? If not then I would like to take a look at it.

ShivangShandilya avatar Dec 19 '23 21:12 ShivangShandilya

@ShivangShandilya I think you're good to take over

mowies avatar Jan 15 '24 07:01 mowies

Hi @ShivangShandilya are you actively working on this issue? Should I assign it to you? Thank you!

odubajDT avatar Jan 22 '24 05:01 odubajDT

@odubajDT, if he is already occupied, I wd like to complete it

prakrit55 avatar Jan 23 '24 12:01 prakrit55

@prakrit55 you can go ahead with it :+1:

ShivangShandilya avatar Jan 25 '24 00:01 ShivangShandilya

Hey @mowies can we pull a script file in each sub directories to copy the crds to the helm templates and also replace the annotations there. The purpose behind it is, the files are differently named in config/crd and helm/templates and configuring it in the makefile wd be wholely messy.

The idea is truely great, to make this thing automated. If you find any other way pls share.

prakrit55 avatar Jan 25 '24 05:01 prakrit55

I guess a script would be fine, but I think you could also just have one script to handle this in the .github/scripts folder for example

mowies avatar Jan 25 '24 11:01 mowies

This issue will be unassigned in 1 week if no further activity is seen. If you are active please provide an update on the status of the issue and if you would like to continue working on it.

github-actions[bot] avatar Feb 16 '24 03:02 github-actions[bot]

The team agreed that we won't go with this enhancement in the maintanance mode

odubajDT avatar Aug 05 '24 09:08 odubajDT