Skip to content

Commit 6969959

Browse files
committed
refactor(supervisor): remove shared application Service
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
1 parent 13e07e3 commit 6969959

7 files changed

Lines changed: 25 additions & 44 deletions

File tree

‎.agents/skills/helm-dev-environment/SKILL.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,5 +515,6 @@ supervisor listener at port 9443 without discovery or a proxy. Provision the
515515
operator TLS Secret and an ingress-client NetworkPolicy first. Follow
516516
`e2e/kubernetes/app-listener/README.md` for direct in-cluster verification,
517517
shared-member selection, and the HA follow-up checks. Keep the fixture disabled
518-
in default profiles. Shared headless app Services enumerate members and must not
519-
be treated as load-balanced routes for sandboxes with different owners.
518+
in default profiles. Shared supervisors expose app ports on their Pod IPs
519+
without a shared app Service. Select the member owning the sandbox; automatic
520+
owner selection belongs to the later discovery API.

‎crates/openshell-supervisor/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ This path uses application or trusted-edge authentication independently from
216216
gateway authentication. It validates Host against SNI, preserves public
217217
Host/Origin and application cookies, strips gateway/edge identity material, and
218218
retains service-specific bearer passthrough. It has no discovery API or public
219-
URL selection. A shared pool's headless Service enumerates member addresses;
220-
clients must select the member owning their sandbox rather than connect to an
221-
arbitrary member. HA takeover may preserve the workload generation; existing ingress streams
219+
URL selection. Shared supervisors expose the app listener on each member's Pod
220+
IP without a shared app Service. Clients must select the member owning their
221+
sandbox. HA takeover may preserve the workload generation; existing ingress streams
222222
are not migrated. Runtime ownership fencing must reject stale connectors.

‎deploy/helm/openshell/templates/supervisor.yaml‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -174,28 +174,6 @@ spec:
174174
- key: ca.crt
175175
path: ca.crt
176176
{{- end }}
177-
{{- if and (get $app "enabled") (get $appDeployment "create_service") }}
178-
---
179-
# Enumerates supervisor member addresses. Select the current owner before
180-
# connecting; this is not a load-balanced app endpoint for arbitrary members.
181-
apiVersion: v1
182-
kind: Service
183-
metadata:
184-
name: {{ $name }}-app
185-
namespace: {{ .Release.Namespace }}
186-
labels:
187-
{{- include "openshell.labels" . | nindent 4 }}
188-
app.kubernetes.io/component: supervisor-app
189-
spec:
190-
clusterIP: None
191-
selector:
192-
{{- include "openshell.supervisorSelectorLabels" . | nindent 4 }}
193-
ports:
194-
- name: app
195-
port: {{ $appPort }}
196-
targetPort: app
197-
protocol: TCP
198-
{{- end }}
199177
---
200178
apiVersion: v1
201179
kind: Service

‎deploy/helm/openshell/tests/app_listener_test.yaml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ tests:
3232
name: app-tls
3333
any: true
3434
documentIndex: 0
35-
- it: uses the common nondefault app port and a separate headless member Service
35+
- it: enables the common nondefault app port without creating a shared app Service
3636
set:
3737
gatewayConfig:
3838
openshell.drivers.kubernetes:
@@ -46,7 +46,7 @@ tests:
4646
create_service: true
4747
asserts:
4848
- hasDocuments:
49-
count: 5
49+
count: 4
5050
- contains:
5151
path: spec.template.spec.containers[0].env
5252
content:
@@ -60,13 +60,13 @@ tests:
6060
secret:
6161
secretName: app-tls
6262
documentIndex: 0
63-
- equal:
64-
path: spec.clusterIP
65-
value: None
63+
- lengthEqual:
64+
path: spec.ports
65+
count: 1
6666
documentIndex: 1
6767
- equal:
6868
path: spec.ports[0].port
69-
value: 9443
69+
value: 5500
7070
documentIndex: 1
7171
- equal:
7272
path: spec.selector["app.kubernetes.io/name"]

‎docs/how-it-works/gateways/configuration.mdx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,10 +1587,10 @@ On Kubernetes, provide a TLS Secret with `tls.crt` and `tls.key` matching
15871587
clients to reach the app port through NetworkPolicy. The driver mounts the Secret
15881588
only in supervisor containers. Restart supervisors after changing certificates.
15891589
With `create_service = true`, dedicated supervisors get a sandbox-owned headless
1590-
`os-app-<sandbox-id>` Service; shared supervisors get a separate
1591-
`<supervisor-name>-app` headless Service. Shared endpoints enumerate members:
1592-
select the supervisor owning the sandbox, rather than load-balancing requests
1593-
across different owners.
1590+
`os-app-<sandbox-id>` Service. This option applies only to dedicated supervisors.
1591+
Shared supervisors expose the app listener directly on each member's Pod IP;
1592+
no shared app Service is created. Select the supervisor owning the sandbox
1593+
when routing application traffic.
15941594

15951595
The Helm chart grants dedicated endpoint management the Service `patch` and
15961596
`delete` permissions when `create_service` is set. If you supply RBAC separately,

‎e2e/kubernetes/app-listener/README.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ this stage. Use these direct-listener hostnames instead:
2020
- `default--<sandbox>.services.example.com` for the unnamed service.
2121
- `default--<sandbox>--web.services.example.com` for the named service.
2222

23-
Inspect supervisor Pods and the app Service's EndpointSlices. For dedicated
24-
supervisors, use `os-app-<sandbox-id>`. For shared supervisors, enumerate members
25-
through `<supervisor-name>-app` and select the Pod IP actually owning the sandbox.
26-
Do not select an arbitrary address when more than one member is present.
23+
Inspect supervisor Pods. Dedicated supervisors optionally expose
24+
`os-app-<sandbox-id>`; inspect that Service's EndpointSlices. Shared supervisors
25+
have no app Service: select the Pod IP actually owning the sandbox and use its
26+
configured app port. Do not select an arbitrary member when more than one is
27+
present. Check ownership through supervisor admission/release logs in this
28+
stage; automated owner selection belongs to the later discovery API.
2729

2830
From a permitted client Pod, mount only the public app certificate/CA and run:
2931

‎skills/debug-openshell-cluster/SKILL.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,9 +1358,9 @@ mount or app port. TLS material is mounted only in supervisors and reloads on
13581358
supervisor restart.
13591359

13601360
Inspect supervisor Pods, app Services, and EndpointSlices with `kubectl`. A
1361-
dedicated endpoint is `os-app-<sandbox-id>`; a shared endpoint is
1362-
`<supervisor-name>-app`. Headless shared endpoints enumerate members: select the
1363-
current sandbox owner, not an arbitrary member IP. Preserve service SNI and Host
1361+
dedicated endpoint is `os-app-<sandbox-id>`. Shared supervisors have no app
1362+
Service: connect to the current sandbox owner's Pod IP and configured app port.
1363+
Preserve service SNI and Host
13641364
when using curl's `--connect-to`, and verify the application certificate. A
13651365
port-forward bypasses Service and NetworkPolicy forwarding; also test from a
13661366
permitted in-cluster client. Operators provide ingress network rules.

0 commit comments

Comments
 (0)