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

[DPE-5089] support external connections with node port #21

Merged
merged 23 commits into from
Aug 30, 2024

Conversation

MiaAltieri
Copy link
Collaborator

@MiaAltieri MiaAltieri commented Aug 15, 2024

Issue

External connections are not supported on K8s router

Solution

Support them using nodeport in the same way other charms do

Future Work

What we have here is a good basis to start. When we support: TLS, Upgrade, clients, we will need to make modifications to continue the support of NodePort

  1. Support node port on TLS
  2. Support node port on Upgrade
  3. Support node port for clients

Kudos

@phvalguima + @marcoppenheimer knowledge and wisdom for pairing and explaining a lot of this to me. Thank you 🙏

src/node_port.py Show resolved Hide resolved
tests/integration/helpers.py Outdated Show resolved Hide resolved
tests/integration/test_charm.py Outdated Show resolved Hide resolved
@MiaAltieri MiaAltieri changed the title Dpe 5089 use node port [DPE-5089] support external connections with node port Aug 15, 2024
src/node_port.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/node_port.py Outdated Show resolved Hide resolved
src/node_port.py Outdated Show resolved Hide resolved
src/node_port.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/node_port.py Outdated Show resolved Hide resolved
src/node_port.py Outdated Show resolved Hide resolved
src/node_port.py Outdated Show resolved Hide resolved
tests/integration/helpers.py Outdated Show resolved Hide resolved
tests/integration/test_charm.py Outdated Show resolved Hide resolved
src/node_port.py Outdated Show resolved Hide resolved
Copy link

@marcoppenheimer marcoppenheimer left a comment

Choose a reason for hiding this comment

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

Approving, as the last comments are trivial, great stuff!

src/node_port.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/node_port.py Outdated Show resolved Hide resolved
src/node_port.py Show resolved Hide resolved
MiaAltieri and others added 2 commits August 16, 2024 17:18
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Show resolved Hide resolved
Co-authored-by: Mehdi Bendriss <[email protected]>
@MiaAltieri MiaAltieri force-pushed the DPE-5089-use-node-port branch from fe4e630 to 30becd8 Compare August 23, 2024 16:21
@MiaAltieri MiaAltieri force-pushed the DPE-5089-use-node-port branch from 1948e35 to 7c3bebb Compare August 23, 2024 16:38
@MiaAltieri MiaAltieri force-pushed the DPE-5089-use-node-port branch from 46d7cd7 to e1c68d1 Compare August 26, 2024 09:48
src/charm.py Outdated Show resolved Hide resolved
if expose_external not in Config.ExternalConnections.VALID_EXTERNAL_CONFIG:
return

self.app_peer_data["expose-external"] = expose_external
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to store value to peer data

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we should, since the user could incorrectly set the config, I would like to store the most recent correct config

src/charm.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Mehdi-Bendriss Mehdi-Bendriss left a comment

Choose a reason for hiding this comment

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

Thanks Mia - I have minor comments.

src/charm.py Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
tests/integration/client_relations/helpers.py Outdated Show resolved Hide resolved
MiaAltieri and others added 3 commits August 28, 2024 09:03
Co-authored-by: Mehdi Bendriss <[email protected]>
Co-authored-by: Mehdi Bendriss <[email protected]>
@MiaAltieri MiaAltieri force-pushed the DPE-5089-use-node-port branch 2 times, most recently from c5400cf to 8d357a7 Compare August 28, 2024 14:22
@MiaAltieri MiaAltieri force-pushed the DPE-5089-use-node-port branch from 8d357a7 to 428a40d Compare August 28, 2024 15:14
@MiaAltieri MiaAltieri force-pushed the DPE-5089-use-node-port branch from bc82624 to cd1fa10 Compare August 29, 2024 09:33
@MiaAltieri MiaAltieri force-pushed the DPE-5089-use-node-port branch from b14b35d to dce5a1c Compare August 30, 2024 07:10
@MiaAltieri MiaAltieri force-pushed the DPE-5089-use-node-port branch from dce5a1c to 79e0707 Compare August 30, 2024 07:40
@MiaAltieri MiaAltieri merged commit 02888a7 into 6/edge Aug 30, 2024
13 of 14 checks passed
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.

5 participants