Optional cluster gateway config and provisioner-specific ServiceLB external IP - #7
Merged
Conversation
CommonConfig.Gateway lets operators tune the bundled Envoy Gateway
install without touching code. Two knobs, all-or-nothing
semantics:
gateway:
skip: false # default: install everything
className: y-cluster # GatewayClass name; default y-cluster
- skip: true -> no CRDs, no controller, no GatewayClass.
k3s --disable=traefik still passes; if you want
a different ingress, install it yourself.
- className -> the GatewayClass name consumer Gateway resources
reference via gatewayClassName. Default flips
from "eg" (the previous hardcoded value) to
"y-cluster". Set to "eg" explicitly for compat
with consumers that pinned that name.
Independent "install controller without default GatewayClass" is
deliberately NOT exposed in cluster config -- if the consumer
ships their own GatewayClass, they should ship their own
controller install. The lower-level envoygateway.Options keeps
the GatewayClassName="" path for tests and library users.
override-ip is also intentionally NOT a field. It's derived from
PortForwards (loopback when guest:80 is bound to a host port)
and surfaced to ystack consumers via a kube-system ConfigMap, per
ISSUE_PROVISIONER_SHOULD_SET_GATEWAY_OVERRIDE_IP.md (separate
PR).
Implementation:
- pkg/provision/config: GatewayConfig struct + applyGatewayDefaults
+ EffectiveGatewayClassName helper.
- pkg/provision/envoygateway: Options.SkipGatewayClass replaced
by Options.GatewayClassName (empty = skip apply); the embedded
assets/gatewayclass.yaml is gone, replaced by an inline Go
template that renders with the configured name.
- qemu / docker provisioners pass cfg.Gateway through and skip
the envoygateway.Install call wholesale when skip is set.
Tests:
- pkg/provision/config/gateway_test.go: defaulting, explicit
override, skip-leaves-classname-alone, EffectiveGatewayClassName.
- e2e/envoygateway_test.go: TestEnvoyGateway_InstallAgainstKwok
asserts the new "y-cluster" default name; the renamed
TestEnvoyGateway_InstallEmptyClassNameSkipsApply covers the
empty-name skip path.
- Schemas regenerated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…n GatewayClass Replaces the reverted --node-external-ip approach (which broke pod-to-apiserver routing). The provisioner derives the host-side dial address from PortForwards via CommonConfig.HostRoutableIP -- "127.0.0.1" when guest:80 is forwarded, empty otherwise -- and stamps it as the yolean.se/dns-hint-ip annotation on the y-cluster GatewayClass at install time. The value is not user-configurable: it's a physical fact about the host/guest port-forward layer, not a preference. There is no config field for it; consumers needing a different value adjust PortForwards. Consumer tooling (ystack's y-k8s-ingress-hosts) reads the annotation via Gateway -> gatewayClassName -> GatewayClass instead of the prior OVERRIDE_IP env-var chain. Migration spelled out in specs/ystack/CHANGE_REQUEST_HINT_IP.md (separate repo). When gateway.skip is set no GatewayClass is installed, so no hint is published -- consumers using skip-mode handle their own ingress and DNS. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
solsson
force-pushed
the
node-external-ip
branch
from
April 30, 2026 09:38
cf6f6cf to
157b46b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The branch name node-external-ip is misleading now. We first tried to use the k3s flag --node-external-ip to set provider-specific gateway IP as hint to
y-k8s-ingress-hostsbut that messed with internals.The new annotation
yolean.se/dns-hint-ipis meant to clarify that it's owned by the provisioner. We had different CLI use cases that misunderstood the old "override IP" as something they should set using env.