-
Notifications
You must be signed in to change notification settings - Fork 113
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
implement harbor project day2 configuration #1031
implement harbor project day2 configuration #1031
Conversation
I will review the PR soon - please sign the DCO, so CI can be run. |
66ef260
to
a7d5063
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution, I have some suggestions and questions
@ChristianLoewel can you resolve conflicts please ? |
Signed-off-by: Christian Löwel <[email protected]>
Signed-off-by: Christian Löwel <[email protected]>
Signed-off-by: Christian Löwel <[email protected]>
Fix wrong ProjectID int conversion Signed-off-by: Christian Löwel <[email protected]>
Signed-off-by: Christian Löwel <[email protected]>
minor membership reconciliation code improvements Signed-off-by: Christian Löwel <[email protected]>
Signed-off-by: Christian Löwel <[email protected]>
Signed-off-by: Christian Löwel <[email protected]>
Signed-off-by: Christian Löwel <[email protected]>
aa3e6cb
to
b0b40f2
Compare
Done! Will create a new pull request in a few weeks with tag retention policy, tag immutability, labels. |
@MarcelMue Helm charts tests are broken, is it linked to the move of the CRD out of the chart ? |
Something went wrong when rebasing here. This PR currently adds back the entire CRD into the helm chart. See how it adds 40k lines right now - I believe that is why the test is failing. |
Signed-off-by: Christian Löwel <[email protected]>
My bad, wasn't aware of the crd change. I removed it now. |
I am generally very happy with the contribution. I think we should add some testing for the newly added functionalities here (so we test new features in CI). I am happy if this is done in a follow up / collaboration. Sorry that it took so long to get this PR reviewed / unblocked 🙇♂️ |
@ChristianLoewel can you provide some manifests (e.g. sample yaml config of CRDs) which you used for testing the added features in #1044 ? It will be helpful later on to more easily add tests. |
Hi, sorry for the delay. I have created some test resources, let me know if you miss any cases. https://gist.github.com/ChristianLoewel/24fc73b8ac740be5d89283a64df15c53 Tests would be great, I like the idea of the collaboration. Will definitely need your help with that. |
Thanks for the contribution @ChristianLoewel ! If you want to collaborate more, please feel free to join the |
@ChristianLoewel Hi, could you please paste the example resources to the documents? |
I decided to implement this as I need the harbor project day2 configuration for myself.
This adds the ability to create, update and delete Harbor projects via Kubernetes resources, including their metadata, group/user memberships and storage quotas.
I tried to provide unit tests, however I don't have much experience with go tests yet and due to the lack of already existing day2 tests to base mine off of I decided against it.
For the implementation I strongly oriented myself on the existing pull request for robotaccount day2, extending the REST client wrapper and using the HarborServerConfiguration CustomResource.
Currently, the operator plainly deletes a harbor project if a corresponding HarborProject CustomResource was deleted. It may be necessary to implement a way to optionally skip deleting the project when deleting the CustomResource. This would allow disabling the operator management of a project without deleting it and would limit the damage of accidental deletions.
I look forward to your feedback.
Signed-off-by: Christian Löwel [email protected]