kubewarden-controller icon indicating copy to clipboard operation
kubewarden-controller copied to clipboard

Refactor the `internal/pkg/admissionregistration` package

Open jvanz opened this issue 11 months ago • 2 comments

The /internal/pkg/admissionregistration package is used by the controller to generate the CA and certificates. But it has a misleading name and the tests for it is minimal. I think we should refactor this package renaming it and maybe bring the changes from the feat-ca-changes branch into main.

As the code in the branch already have tests, this will help us in our goal to reach 70% code coverage. Plus, its name make more sense. Furthermore, we advance a little bit in the path of removing cert-manager. However, this is not the main reason for this change here.

jvanz avatar Mar 01 '24 12:03 jvanz

@jvanz could you elaborate a bit more on which changes you are proposing to bring from the ca changes feature branch?

fabriziosestito avatar Mar 04 '24 15:03 fabriziosestito

@jvanz could you elaborate a bit more on which changes you are proposing to bring from the ca changes feature branch?

I was thinking of coping the certificates package from the branch, which is basically a copy of the admissionregistration package with better names and tests, into main branch. Updating the references to the admissionregistration package in the admission and using the new certificates package. We may use the admission package from the feature branch to as example of how to do it. But we just need to leave the code used to get and generate the root CA created by the controller out .

jvanz avatar Mar 05 '24 15:03 jvanz

This is has been done at #777

jvanz avatar Jul 10 '24 17:07 jvanz