Skip to content

Commit 04a3a64

Browse files
committed
feat(builder): use TCPRoute expose service
1 parent 30ee733 commit 04a3a64

3 files changed

Lines changed: 29 additions & 5 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: gateway.networking.k8s.io/v1alpha2
2+
kind: TCPRoute
3+
metadata:
4+
name: drycc-builder
5+
labels:
6+
app: "drycc-builder"
7+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
8+
release: "{{ .Release.Name }}"
9+
heritage: "{{ .Release.Service }}"
10+
spec:
11+
parentRefs:
12+
- group: gateway.networking.k8s.io
13+
kind: Gateway
14+
name: drycc-gateway
15+
sectionName: drycc-gateway-listener-builder-tcp
16+
rules:
17+
- backendRefs:
18+
- name: drycc-builder
19+
port: 2222
20+

charts/builder/templates/builder-service.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ spec:
1313
- name: ssh
1414
port: 2222
1515
targetPort: 2223
16-
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
17-
nodePort: {{ .Values.service.nodePort }}
18-
{{- end }}
1916
selector:
2017
app: drycc-builder
2118
type: {{ .Values.service.type }}

charts/builder/values.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ service:
1010
annotations: {}
1111
# Service type default to LoadBalancer
1212
type: ClusterIP
13-
# If service.type is not set to NodePort, the following statement will be ignored.
14-
nodePort: ""
1513
# limitsCpu: "100m"
1614
# limitsMemory: "50Mi"
1715

@@ -38,6 +36,15 @@ podAntiAffinityPreset:
3836
# When the TTL controller cleans up the Job. default: 6h
3937
# see: https://kubernetes.io/docs/concepts/workloads/controllers/job/#ttl-mechanism-for-finished-jobs
4038
ttlSecondsAfterFinished: 21600
39+
# gateway customListeners
40+
gateway:
41+
customListeners:
42+
- name: drycc-gateway-listener-builder-tcp
43+
port: 2222
44+
protocol: TCP
45+
allowedRoutes:
46+
namespaces:
47+
from: All
4148

4249
global:
4350
# Role-Based Access Control for Kubernetes >= 1.5

0 commit comments

Comments
 (0)