-
Notifications
You must be signed in to change notification settings - Fork 4k
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
(aws-servicediscovery): DNSNamespace to allow non ip instances to be registered #21490
Closed
1 of 2 tasks
Labels
@aws-cdk/aws-servicediscovery
Related to Amazon ECS Service Discovery
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
Comments
jmortlock
added
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
labels
Aug 7, 2022
github-actions
bot
added
the
@aws-cdk/aws-servicediscovery
Related to Amazon ECS Service Discovery
label
Aug 7, 2022
mergify bot
pushed a commit
that referenced
this issue
Aug 16, 2022
…S namespace (#21494) ---- Closes: #21490 DNS namespaces are currently setup in a way which only allow for discoverability via DNS or API, this means it is not currently possible to register non-ip instances within a DNS based namespace. After this change you can create a DNS based service with an optional ```discoveryType``` If this ```discoveryType``` is set to ```DiscoveryType.API``` then you can register non IP based instances to this service using the ```registerNonIpInstance``` function If no DiscoveryType is passed than the default from the namespace is used, so for an HTTP namespace this is ```API``` and for DNS derived namespaces this is ```DNS_AND_API``` This means DNS type namespaces can have services registered with a combination of discovery types. ---- ### All Submissions: * [✓] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [✗] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [✓] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [✓] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
josephedward
pushed a commit
to josephedward/aws-cdk
that referenced
this issue
Aug 30, 2022
…S namespace (aws#21494) ---- Closes: aws#21490 DNS namespaces are currently setup in a way which only allow for discoverability via DNS or API, this means it is not currently possible to register non-ip instances within a DNS based namespace. After this change you can create a DNS based service with an optional ```discoveryType``` If this ```discoveryType``` is set to ```DiscoveryType.API``` then you can register non IP based instances to this service using the ```registerNonIpInstance``` function If no DiscoveryType is passed than the default from the namespace is used, so for an HTTP namespace this is ```API``` and for DNS derived namespaces this is ```DNS_AND_API``` This means DNS type namespaces can have services registered with a combination of discovery types. ---- ### All Submissions: * [✓] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [✗] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [✓] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [✓] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-servicediscovery
Related to Amazon ECS Service Discovery
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
Describe the feature
Currently when using either public or private DNS namespaces CDK restricts the ability to register a nonIPInstance and fails with the following message
The reason for this is because CDK creates all services within this namespace as discoverable via DNS; however it is actually possible to create services within a DNS namespace which are API only discoverable, this is done by setting the CFN attribute
Type
to the value of HTTP.https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-service.html
Escape hatches do not work in this instance as the check happens within a L2 construct; so to workaround this both service and instances need to be created using L1 constructs.
Use Case
Cloudmap with a combination of services which are discoverable via API Calls and DNS Queries or API Calls Only
Proposed Solution
Add a new attribute to DnsServiceProps to allow controlling discoverability mode.
i.e.
Alternative could just expose the "type" attribute directly
Other Information
No response
Acknowledgements
CDK version used
2.35.0
Environment details (OS name and version, etc.)
Ubuntu 20.0.4
The text was updated successfully, but these errors were encountered: