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

feat: use kurtosis service name as the kubernetes service name #713

Merged
merged 2 commits into from Jun 13, 2023

Conversation

adschwartz
Copy link
Contributor

Description:

With this change, the Kubernetes service (and pod) name is now set as the Kurtosis service name and we are moving away from randomly assigned names that followed the template user-service-<uuid>. Instead, Kubernetes services (and pods) will be named after the Kurtosis service, e.g. webserver.

The motivation behind this change is that Kubernetes services (that operate inside the same namespace) will at times need to communicate with each other using their respective hostnames. In Kubernetes, hostnames originate from the Kubernetes service name and are managed by CoreDNS. From a Kurtosis perspective, this is fine as long as you can spin up your Kurtosis service, and thereafter wire in the assigned hostname into other services that need to know what the name was. However, at times this is not practical, particularly if the service need to be spun up with information such as the names of other hosts that in turn depend on each other in a circular fashion (a chicken-egg style problem).

With this change, Kubernetes services can depend on the Kubernetes set hostname matching the Kurtosis service name (just like it works when running on the Docker backend), thus enabling the services to deterministically resolve the names of other services, prior to actual run-time.

In the next PR, I'll add a regex to ensure that the Kurtosis service name will not take a form that is not supported by Kubernetes and docker.

Is this change user facing?

NO

@adschwartz adschwartz enabled auto-merge (squash) June 13, 2023 09:07
@adschwartz adschwartz merged commit b0d6b8e into main Jun 13, 2023
27 checks passed
@adschwartz adschwartz deleted the anders/k8s-name branch June 13, 2023 09:29
adschwartz pushed a commit that referenced this pull request Jun 13, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.78.1](0.78.0...0.78.1)
(2023-06-13)


### Features

* added min/max cpu and memory for kubernetes via starlark
([#689](#689))
([faffc07](faffc07))
* use kurtosis service name as the kubernetes service name
([#713](#713))
([b0d6b8e](b0d6b8e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: kurtosisbot <kurtosisbot@users.noreply.github.com>
adschwartz added a commit that referenced this pull request Jun 21, 2023
## Description:
This is a followup to
#713. The main change is
to apply the RFC-1123 standard to how services are named. This is to
ensure compatibility when launching services on k8s.

I've run this on all our packages in `awesome-kurtosis` and all the
packages referenced in there and fixed a few packages that had
noncompliant naming standard.

Since this is a breaking release we should wait to coordinate with
@leeederek.

## Is this change user facing?
YES
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

2 participants