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

Add support for mesh ingress #14640

Merged
merged 70 commits into from
Feb 2, 2024
Merged

Add support for mesh ingress #14640

merged 70 commits into from
Feb 2, 2024

Conversation

fosterseth
Copy link
Member

@fosterseth fosterseth commented Nov 6, 2023

SUMMARY

API changes to support mesh ingress (in-cluster hop node).

Notable changes:

  • adds ReceptorAddress model and related endpoints to the API
  • adds managed field to instance
  • InstanceLink peering is now from Instance to ReceptorAddress (before it was Instance to Instance)
  • UI changes to support the above peering changes, including a new Endpoints tab on the Instance detail page
ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • API
  • UI
  • Collection

awx/main/models/ha.py Outdated Show resolved Hide resolved
awx/main/models/ha.py Outdated Show resolved Hide resolved
@github-actions github-actions bot added the component:awx_collection issues related to the collection for controlling AWX label Nov 15, 2023
awx/api/serializers.py Outdated Show resolved Hide resolved
awx/api/serializers.py Outdated Show resolved Hide resolved
awx/api/serializers.py Outdated Show resolved Hide resolved
awx/api/serializers.py Outdated Show resolved Hide resolved
awx/api/serializers.py Outdated Show resolved Hide resolved
fosterseth and others added 19 commits February 1, 2024 14:47
This release supports ingress hop node, and
is backwards compatible with previous AWX
version.

Signed-off-by: Seth Foster <[email protected]>
Adds validation and a unit test to ensure:

- peers_from_control_nodes=True should fail if
listener_port is not set
- peers_from_control_nodes=False should be NOOP if
listener_port is not set

Signed-off-by: Seth Foster <[email protected]>
…nodes

If the port is explicitly set to null (causing any ReceptorAddress to
be deleted), then that's a validation error.

If the port is left off but a ReceptorAddress doesn't already exist,
we should not infer a port number and that is also a validation error.
so we don't need complex logic to compare an incoming to existing value.
Since the relationship is ReceptorAddress -> Instance,
prefetch_related isn't necessary.
and all of the cases that they might be in.
Add functional test case for inspecting
established receptor connections.

InstanceLink starts in ADDING state, and should
move to ESTABLISHED state if the connection
is detected in the receptor status output.

Signed-off-by: Seth Foster <[email protected]>
Adds validation to prevent changing
peers_from_control_nodes if instance managed=True

Signed-off-by: Seth Foster <[email protected]>
test_listener_port
test_peers_from_control_nodes
test_peers_from_control_nodes_without_listener_port

are covered in the following tests:

test_no_op
test_creates_canonical_address
test_deletes_canonical_address
test_updates_canonical_address
test_canonical_address_validation_error

Signed-off-by: Seth Foster <[email protected]>
In receptor address post-save method:
- Fixed detecting if address was missing
a link from control nodes
- Use InstanceLink create_or_update to prevent
adding duplicate InstanceLink source and target
peers

In instance serializer create_or_update,
delete receptor addresses first before doing
instance create or update. This ensures that we don't
trigger unnecessary post-save methods that might
attempt to manipulate receptor addresses that
will just be removed later.

Signed-off-by: Seth Foster <[email protected]>
Make protocol be blank on instance if there
is no canonical address for this instance.

It was defaulting to "tcp" before.

Signed-off-by: Seth Foster <[email protected]>
Also, update ui screen tests to expect
injecting "listener_port: null" if
listener_port is empty

Signed-off-by: Seth Foster <[email protected]>
Prevent creating InstanceLinks with duplicate
source and target pairings.

Signed-off-by: Seth Foster <[email protected]>
Listener Addresses is a better name to
emphasize these are routable addresses to
reach a listener service on the node.

Also removed expand toggle on the listener
addresses list items, as the expanded mode
had no additional information.

Signed-off-by: Seth Foster <[email protected]>
@fosterseth fosterseth merged commit 6dcaa09 into devel Feb 2, 2024
22 of 23 checks passed
@fosterseth fosterseth deleted the feature_awx-mesh-ingress branch February 2, 2024 15:37
@fosterseth fosterseth changed the title AWX mesh ingress Add support for ingress mesh Feb 2, 2024
@fosterseth fosterseth changed the title Add support for ingress mesh Add support for mesh ingress Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:api component:awx_collection issues related to the collection for controlling AWX component:ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants