Skip to content

Added support for namespaces and adminPartitions#42

Open
Ganeshrockz wants to merge 5 commits intomasterfrom
ganeshrockz/ns-ap-support
Open

Added support for namespaces and adminPartitions#42
Ganeshrockz wants to merge 5 commits intomasterfrom
ganeshrockz/ns-ap-support

Conversation

@Ganeshrockz
Copy link
Copy Markdown

@Ganeshrockz Ganeshrockz commented Jun 6, 2023

This PR

  • Adds -consul-namespace and -consul-admin-partition flags to the existing consul-aws command. This will enable Consul enterprise users to sync their AWS to custom namespaces and admin partitions and vice versa. The default value for both these fields is an empty string and so there should be no changes in experience for non enterprise use cases.
  • Adds an integration test for the enterprise usecase.
  • Fixes a bug which prevented properly syncing AWS services into Consul when -aws-prefix flag is non empty. Because of this bug, the existing integration test was a bit flaky
  • Upgraded Go version of this repo to 1.20

@Ganeshrockz Ganeshrockz changed the title WIP: Spike to add basic E2E support for namespaces and adminPartitions Added support for namespaces and adminPartitions Jun 12, 2023
@Ganeshrockz Ganeshrockz marked this pull request as ready for review June 12, 2023 05:54
Copy link
Copy Markdown
Member

@hanshasselberg hanshasselberg left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your work. My comments are no blockers, but I think it would be nice if Namespace and Partition are consistently (in CatalogDeregistration and CatalogRegistration or in AgentService) set only once across this PR.

@Ganeshrockz
Copy link
Copy Markdown
Author

@hanshasselberg Thanks for the review. I removed the additional Partition field that is added to the CatalogRegistration request. Consul server throws the following error when creating a service

sync_test.go:60: error creating service in Consul: Unexpected response code: 500 (Cannot register services and checks for multiple partitions in one registration request)

I guess we should have adminPartition set in both the places. Thoughts?

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.

2 participants