Open clementblaise opened 1 month ago
I think it is better to implement ProjectToken
as a seperate resource instead of including it in Project
.
Hey @MisterMX, is there any reason you think it's a better implementation to have a ProjectToken
resource?
I had thought about it but didn't like:
Project
Project
resources, as the status holds JWTTokensByRole
, which will be transferred to ProjectToken
I would consider a token its own entity with its own lifecycle. It should be possible to create tokens independently from the project. I would therefor see it as a separate resource.
Can you explain why a breaking change in the project status is necessary?
Description of your changes
Fixes #187
The PR adds
ProjectToken
to configure tokens and how they should be renewed. It extends the ArgoCD Project client so that the controller can issue tokens. The controller has been updated to add the necessary logic to create and update tokens while saving them as Secret.I am unsure how to deal with the existing
JWTTokens
onProjectRole
.I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
Tested on a local cluster with a deployment of ArgoCD. Added unit tests