generated from crossplane/upjet-provider-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Problem
Harbor User resources fail when using crossplane.io/external-name
annotations:
user_id in path must be of type int64: "testuser"
Root Cause
- Crossplane sets resource ID to username from external-name
- Harbor API requires numeric user IDs:
/users/123
not/users/testuser
- Provider lacks username→ID translation
Reproduction
apiVersion: user.harbor.crossplane.io/v1alpha1
kind: User
metadata:
annotations:
crossplane.io/external-name: "testuser"
spec:
forProvider:
username: testuser
# ... other fields
Expected
User created successfully with username "testuser"
Actual
422 validation error - Harbor API rejects username in ID field
Solution
Add Upjet external-name configuration to handle username→numeric ID conversion while preserving username-based external names.
Metadata
Metadata
Assignees
Labels
No labels