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

Use shorter DNS name for pod-to-pod networking #764

Merged
merged 3 commits into from
Nov 28, 2024
Merged

Conversation

EronWright
Copy link
Contributor

@EronWright EronWright commented Nov 27, 2024

Proposed changes

Eliminates the use of the hardcoded DNS suffix "svc.cluster.local", e.g. to support "VPC scope DNS".

Workspace RPC

For workspace RPC connectivity, the operator now uses the "namespace-scoped" short name of the workspace pod, e.g. guestbook-workspace.default rather than guestbook-workspace.default.svc.cluster.local..

❯ kubectl get workspace
NAME                      IMAGE                           READY   ADDRESS
kubernetes-py-guestbook   pulumi/pulumi:3.134.1-nonroot   True    kubernetes-py-guestbook-workspace.default:50051

This approach is an improvement but isn't ideal for cross-cluster communication. A possible future enhancement would be to fully resolve the address to be persisted in the status block (e.g. to guestbook-workspace.default.svc.cluster1.).

See DNS for Services and Pods for more information, which says:

In summary, a Pod in the test namespace can successfully resolve either data.prod or data.prod.svc.cluster.local.

Program Artifact

The program artifact is fetched by workspace pods from the controller itself, based on the configured advertised address. This PR shortens the advertised address used by the default installation manifest, and updates the Helm chart to support a configurable override.

❯ kubectl get program
NAME          AGE   URL
random-yaml   28m   http://pulumi-kubernetes-operator.pulumi-kubernetes-operator:80/programs/default/random-yaml

Related issues (optional)

Closes #759

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.19%. Comparing base (92416e3) to head (3adb333).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #764   +/-   ##
=======================================
  Coverage   50.19%   50.19%           
=======================================
  Files          30       30           
  Lines        4210     4210           
=======================================
  Hits         2113     2113           
  Misses       1910     1910           
  Partials      187      187           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@rquitales rquitales left a comment

Choose a reason for hiding this comment

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

TIL that namespace-scoped fqdns are valid. LGTM

@EronWright EronWright merged commit 253a6e5 into master Nov 28, 2024
5 checks passed
@EronWright EronWright deleted the issue-759 branch November 28, 2024 00:54
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.

Operator assumes default cluster domain (cluster.local) is used
3 participants