Skip to content

Prefix provider resource names with hashed consumer cluster name to prevent conflicts#165

Merged
iakmc merged 1 commit intoplatform-mesh:mainfrom
iakmc:consumer-name-prefix
Feb 25, 2026
Merged

Prefix provider resource names with hashed consumer cluster name to prevent conflicts#165
iakmc merged 1 commit intoplatform-mesh:mainfrom
iakmc:consumer-name-prefix

Conversation

@iakmc
Copy link
Contributor

@iakmc iakmc commented Feb 16, 2026

  • Prefix provider-side resource names with a 12-char hash of the consumer cluster name to prevent conflicts when multiple consumers create resources with the same name/namespace
  • Store original name in annotation for provider-to-consumer reverse lookup
  • Strip prefix from related resources when syncing back to consumer
  • Added unit tests for the generic functions
  • Modified the e2e examples test

@CLAassistant
Copy link

CLAassistant commented Feb 16, 2026

CLA assistant check
All committers have signed the CLA.

@iakmc iakmc force-pushed the consumer-name-prefix branch 4 times, most recently from 8326c5f to 748fc02 Compare February 18, 2026 00:41
@iakmc iakmc changed the title WIP Prefix provider resource names with hashed consumer cluster name to prevent conflicts Prefix provider resource names with hashed consumer cluster name to prevent conflicts Feb 18, 2026
@iakmc iakmc marked this pull request as ready for review February 18, 2026 00:41
@iakmc
Copy link
Contributor Author

iakmc commented Feb 18, 2026

/test all

Comment on lines 85 to 93
kubectl --kubeconfig "$kind_internalca" delete --all --ignore-not-found -n default \
certificates.example.platform-mesh.io \
certificates.cert-manager.io \
secret

kubectl --kubeconfig "$kind_externalca" delete --all --ignore-not-found -n default \
certificates.example.platform-mesh.io \
certificates.cert-manager.io \
secret
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouh this is dangerous, we shouldn't just delete all secrets.
If someone runs this against a cluster that isn't just for this test that could cause problems :D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be good, though that one would be fine because it just targets the custom resource and it only displays

@iakmc iakmc force-pushed the consumer-name-prefix branch from 748fc02 to 4abf335 Compare February 18, 2026 12:43
@iakmc
Copy link
Contributor Author

iakmc commented Feb 18, 2026

/test all

1 similar comment
@iakmc
Copy link
Contributor Author

iakmc commented Feb 19, 2026

/test all

@iakmc iakmc force-pushed the consumer-name-prefix branch 2 times, most recently from 4af1ece to e703e80 Compare February 19, 2026 17:08
…revent conflicts

On-behalf-of: SAP <iskren.pertov@sap.com>
Signed-off-by: Iskren Petrov <iskren@kubermatic.com>

Prefix provider resource names with hashed consumer cluster name to prevent conflicts

fix the tests

On-behalf-of: SAP <iskren.pertov@sap.com>
Signed-off-by: Iskren Petrov <iskren@kubermatic.com>

fix

fix

edited comment

resolved comment

fix kcp certs readme and run script

On-behalf-of: SAP <iskren.pertov@sap.com>
Signed-off-by: Iskren Petrov <iskren@kubermatic.com>

fix issues from rebasing

On-behalf-of: SAP <iskren.pertov@sap.com>
Signed-off-by: Iskren Petrov <iskren@kubermatic.com>

fix builds

rerun the tests

On-behalf-of: SAP <iskren.pertov@sap.com>
Signed-off-by: Iskren Petrov <iskren@kubermatic.com>

Fix kcp-certs examples test
@iakmc iakmc force-pushed the consumer-name-prefix branch from fd79f64 to 5df82ee Compare February 22, 2026 23:16
@ntnn ntnn closed this Feb 24, 2026
@ntnn ntnn reopened this Feb 24, 2026
@iakmc iakmc closed this Feb 25, 2026
@iakmc iakmc reopened this Feb 25, 2026
@iakmc iakmc merged commit 2a4a0e0 into platform-mesh:main Feb 25, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants