Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GKEhubFeatureMembership's spec.membershipLocation field should be optional and discouraged to use #2553

Open
3 tasks done
ziyue-101 opened this issue Aug 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ziyue-101
Copy link
Collaborator

ziyue-101 commented Aug 21, 2024

Checklist

Bug Description

The spec.memebrshipLocation field defaults to global if not set. The field would be required if the corresponding memebreship is regional. This is because the spec.memebrshipLocation field needs to match exactly the same as the corresponding Membership resource's spec.location field. However, the featuremembership resource already has the membershipRef, it should be able to infer the memebership location value from the referenced resource.

The redundant field confuses users and would cause problems if two location values are set differently in two places.

I would consider this as a design flaw in the current controller backed by DCL.
In the future direct controller, we should get the membershipLocation value from the referenced resource instead of depending on the field.

Additional Diagnostic Information

n/a

Kubernetes Cluster Version

n/a

Config Connector Version

n/a

Config Connector Mode

namespaced mode (default)

Log Output

No response

Steps to reproduce the issue

  • Create a GKEHubMembership resource in us-central1
  • Create a Gkehubfeaturemembership resource with spec.membershipLocation as empty
  • The Gkehubfeaturemembership KCC resource will fail to create the GCP resource

YAML snippets

No response

@ziyue-101 ziyue-101 added the bug Something isn't working label Aug 21, 2024
@ziyue-101 ziyue-101 changed the title GKEhubFeatureMembership's spec.membershipLocation field should be optional discouraged to use GKEhubFeatureMembership's spec.membershipLocation field should be optional and discouraged to use Aug 21, 2024
@ziyue-101 ziyue-101 mentioned this issue Aug 21, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant