Skip to content

[TASK] External-Name(KymaModule): Ensure ADR compliance #551

@enrico-kaack-comp

Description

@enrico-kaack-comp

Part of Epic: #427

Context

This issue tracks the implementation work needed to ensure the resource fully complies with the External Name Handling ADR. The goal is to verify and implement proper external name handling across all CRUD operations according to the established guidelines.

Technical Tasks Checklist

Find the following checklist to verify that all expects of the ADR are covered.

1. Implement Proper External Name Handling

Acceptance Criteria:

  • Observe() Method Implementation

  • Create() Method Implementation

  • Update() Method Implementation

  • Delete() Method Implementation

  • Migration Logic:

    • if necessary, the old name needs to be migrated to the new name

2. Unit Test Coverage for External Name Handling

Acceptance Criteria:

  • Observe() Tests:

    • Test empty external-name scenarios (witch backwards compatibility)
    • Test invalid GUID format in external-name
    • Test valid GUID that doesn't exist (404 response) → should return resourceExists: false
    • Test valid GUID that exists → normal observation flow
    • Test drift detection and diff reporting
  • Create() Tests:

    • Test successful creation sets external-name to returned GUID
    • Test "resource already exists" error handling (external-name should not be set)
    • Test other creation errors (external-name should not be set)
  • Update() Tests:

    • Test update with valid existing external-name
    • Test validation of immutable fields (if any)
  • Delete() Tests:

    • Test deletion with valid external-name
    • Test 404 response handling (should not be treated as error)
    • Test async deletion scenarios with deletion states
    • Test deletion of externally removed resource

3. E2E Import Test Coverage

Acceptance Criteria:

  • Import Flow Test:
    • Test importing existing CF env resources using the external-name annotation
    • Verify imported resources transition to healthy state with correct external-name
    • Test that imported resources can be observed and updated properly
    • refer to ImportTester feature provided by the subaccount test

4. Upgrade Test Coverage for External Name Behavior

Upgrade test framework is available in BTP provider, so it should be added for this as well.

5. Documentation

Document the required identifier and how to obtain it in the comment block directly above the main resource struct in the <resource>_types.go file. This is used for auto-generating our docs.

Please see the generation guide for more information on the process and the required comment structure: https://github.com/SAP/crossplane-provider-btp/blob/main/docs/development/external-name-handling.md#documentation-generation

Metadata

Metadata

Labels

BTPBTP Provider

Type

Projects

Status

Validation

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions