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 AWXMeshIngress custom resource (require ansible/awx#14640 to function) #1578

Merged
merged 18 commits into from
Jan 18, 2024

Conversation

TheRealHaoLiu
Copy link
Member

@TheRealHaoLiu TheRealHaoLiu commented Oct 3, 2023

SUMMARY

Add new CRD for controlling deployment of Mesh Ingress node to AWX

NOTE: require ansible/awx#14640 to function

ISSUE TYPE
  • New or Enhanced Feature
ADDITIONAL INFORMATION

@TheRealHaoLiu TheRealHaoLiu changed the title Feature awx mesh ingress [WIP] Feature awx mesh ingress Oct 3, 2023
@TheRealHaoLiu TheRealHaoLiu marked this pull request as draft October 3, 2023 18:33
@TheRealHaoLiu TheRealHaoLiu force-pushed the feature_awx-mesh-ingress branch 2 times, most recently from 991b09e to 39a2910 Compare January 9, 2024 21:01
TODO: register instance after creation

dependent on API/CLI change
sample are used in CI for validation test

in current implementation we only support openshift route this will not work on kind clusters correctly and having the sample is causing CI failure
@TheRealHaoLiu TheRealHaoLiu force-pushed the feature_awx-mesh-ingress branch 5 times, most recently from 75e1f18 to 4b7855a Compare January 18, 2024 19:53
@@ -0,0 +1,19 @@
# TODO: Add tests for AWXMeshIngress
Copy link
Member

@rooftopcellist rooftopcellist Jan 18, 2024

Choose a reason for hiding this comment

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

Leaving this out of CI runs for now. @TheRealHaoLiu will address this in a future PR.

This bit will resolve that.

spec:
containers:
- args:
- /bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion as a future improvement. We should configmap these commands in as a script, then this should just call that script. This can be done in a follow-up PR.

fosterseth and others added 9 commits January 18, 2024 15:24
The mesh role now calls
1. awx-manage provision instance to register the hop
node to the database
2. awx-manage add_receptor_address to register the
internal address
3. awx-manage add_receptor_address to register the
external address (to be used by remote nodes)

CRD expanded to include external_ipaddress and
external_hostname

external_ipaddress is added as ipaddress in the
hop node certificate

external_hostname is added as dnsname in the
hop node certificate

the mesh role now checks for is_openshift and
only creates a Route if true. Otherwise it
will use external_hostname set in the spec
file in place of Route name.

Signed-off-by: Seth Foster <fosterbseth@gmail.com>
When pod loses connection with k8s api server,
a statefulset can take a while (5 minutes) before
it is rescheduled. Deployments quicker turnaround
in this situation, which should help mesh
stability.

Signed-off-by: Seth Foster <fosterbseth@gmail.com>
- add --is_internal and --peers_from_control_nodes
to indicate the address is internal

Signed-off-by: Seth Foster <fosterbseth@gmail.com>
This way when AWX is deleted associated AWXMeshIngress will all be deleted as well
external_ipaddress is optional and we should be able to deal with missing external_ipaddress with no error
* fix: correct port number for internal receptor address
* feat: add support for ingress for awxmeshingress cr
* feat: add support for ingressroutetcp (for traefik) for awxmeshingress cr
also rename route.yml.j2 to ingress.yml.j2 since we cover more than just route now
and fix linting

Signed-off-by: Seth Foster <fosterbseth@gmail.com>

Set correct protocol for external mesh ingress address

and fix linting error
@TheRealHaoLiu TheRealHaoLiu changed the title [WIP] Feature awx mesh ingress Add AWXMeshIngress custom resource (require https://github.com/ansible/awx/pull/14640 to function) Jan 18, 2024
@TheRealHaoLiu TheRealHaoLiu changed the title Add AWXMeshIngress custom resource (require https://github.com/ansible/awx/pull/14640 to function) Add AWXMeshIngress custom resource (require ansible/awx#14640 to function) Jan 18, 2024
@TheRealHaoLiu TheRealHaoLiu marked this pull request as ready for review January 18, 2024 20:28
@TheRealHaoLiu
Copy link
Member Author

We will merge this first and continue to iterate on ansible/awx#14640
This feature will not be fully functional until ansible/awx#14640 is merged and released

@rooftopcellist rooftopcellist enabled auto-merge (rebase) January 18, 2024 20:31
@rooftopcellist rooftopcellist merged commit 9e2eb16 into devel Jan 18, 2024
14 checks passed
@rooftopcellist rooftopcellist deleted the feature_awx-mesh-ingress branch January 18, 2024 20:38
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.

None yet

4 participants