feat: Add custom project name option - #334
Closed
yamaceay wants to merge 1 commit into
Closed
Conversation
yamaceay
marked this pull request as draft
September 12, 2025 14:45
Contributor
|
@MisterMX Wdyt? |
Collaborator
|
Usually in Crossplane external name annotation is used to store IDs / names of external resources. I'm wondering why are we using |
Signed-off-by: Yamac Ay <yamac.ay@sap.com>
yamaceay
force-pushed
the
custom-proj-name
branch
from
September 23, 2025 18:05
b2db9b3 to
3aed6b2
Compare
Contributor
Author
|
Hi @MisterMX , before this PR, I actually had tested using external annotation name as the primary name field (and metadata.name as the fallback option, done same as in this PR). After being told that other providers usually have a name field that we can pass, I sticked to using a custom name field. What would be your preferred option? |
Contributor
Author
|
Just for reference, here is the link for the alternative approach: #341 |
Collaborator
|
Replaced by #341 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
Fixes #325 by introducing a new project
namefield in project API, which is set optional and modifies the naming logic so that the metadata name is used as a fallback if project name not set.I have:
make reviewable testto ensure this PR is ready for review.How has this code been tested
After running the provider successfully, we can run in another terminal
kubectl apply -f examples/projects/project.yamlto create a new project. The reconciliation of project works as before, successfully updating and deleting. To see the results, we can authenticate as described in hack/local-argocd-setup.sh. The following command lists the projects successfully: