Skip to content

Conversation

@detjensrobert
Copy link
Contributor

The meat and potatoes, finally.

Depends on #38.

This deploys all the needed Kubernetes resources for challenges. Each challenge is created in its own namespace, with its Deployments for all the pods defined in the challenge config, and any exposed services via Service LoadBalancers or Ingress configs.

Currently, non-HTTP challenges are exposed via their own separate LoadBalancer service at a DNS domain based on the challenge name. This approach does have a slightly higher cost, since this creates more cloud provider loadbalancers (on AWS each LB is about $20/month). We are also not currently exposing what domain to expose TCP challenges at, so this the name is generated from the challenge name.

This is slightly different than how the configuration was initially designed, where all TCP challenges would be exposed on the same domain at different ports. Doable, but using separate load balancers does not require messing with the ingress controller values to proxy TCP services.

Switching from either of these to the Gateway API would let us keep a single loadbalancer (the Gateway controller) and direct TCP traffic via native ingress-like resources, at whatever domains we want, though each TCP service would still need to be on a different port.

@detjensrobert detjensrobert self-assigned this Mar 1, 2025
@detjensrobert detjensrobert mentioned this pull request Mar 1, 2025
3 tasks
Copy link
Contributor

@KekoaM KekoaM left a comment

Choose a reason for hiding this comment

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

All changes look good

Signed-off-by: Robert Detjens <github@detjens.dev>
Signed-off-by: Robert Detjens <github@detjens.dev>
Signed-off-by: Robert Detjens <github@detjens.dev>
Signed-off-by: Robert Detjens <github@detjens.dev>
Signed-off-by: Robert Detjens <github@detjens.dev>
Signed-off-by: Robert Detjens <github@detjens.dev>
This should be a subdomain, not the full domain.

Signed-off-by: Robert Detjens <github@detjens.dev>
Localhost in the k3d containers is not the host localhost, so it cant pull
images from the test registry. Instead, add the registry container to the
k3d network and alias the registry name to pull directly.

Signed-off-by: Robert Detjens <github@detjens.dev>
Signed-off-by: Robert Detjens <github@detjens.dev>
HTTP challenges should work now, but TCP challenges still need some work to
update the ingress config in order to get exposed.

Signed-off-by: Robert Detjens <github@detjens.dev>
Signed-off-by: Robert Detjens <github@detjens.dev>
Signed-off-by: Robert Detjens <github@detjens.dev>
This waits for:
- pods to become running
- deployments to complete rollouts
- ingresses to become published by controller
- LoadBalancer services to get external IP

Other types of resources or services are ignored and immediately return Ok.

Signed-off-by: Robert Detjens <github@detjens.dev>
We don't need to actually create records (nor is there a way to), but this will
still log the records it would have created.

Signed-off-by: Robert Detjens <github@detjens.dev>
These were added to test overriding the minijinja `default` None handling.
Gating in the template was easier, and so this is not needed now.

Signed-off-by: Robert Detjens <github@detjens.dev>
These were contributed to the upstream kube library, so bump it and use
those contributed conditions instead of the custom inline ones.

Signed-off-by: Robert Detjens <github@detjens.dev>
@detjensrobert detjensrobert merged commit 2ca0f4a into main Mar 30, 2025
3 checks passed
@detjensrobert detjensrobert deleted the dr/deploy-kubernetes branch March 30, 2025 04:02
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.

2 participants