Skip to content

Commit 04ecedc

Browse files
committed
port configuration
1 parent 8374665 commit 04ecedc

13 files changed

Lines changed: 1070 additions & 986 deletions

File tree

aggregator-platform/README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ Aggregator Server:
7676
| --- | --- |
7777
| `NAMESPACE` | `.Release.Namespace` |
7878
| `LOG_LEVEL` | `loglevel` |
79+
| `SERVER_PORT` | `internal.serverPort` |
80+
| `SERVER_INTERNAL_PORT` | `internal.serverInternalPort` |
81+
| `INSTANCE_PORT` | `internal.instancePort` |
7982
| `EXTERNAL_HOST` | `external.host` |
8083
| `EXTERNAL_HTTP_PORT` | `external.httpPort` |
8184
| `EXTERNAL_HTTPS_PORT` | `external.httpsPort` |
@@ -117,10 +120,11 @@ Creates the `aggregator-server` Deployment.
117120
- Replicas come from `server.replicaCount`.
118121
- The container image is assembled from `server.image.repository` and
119122
`server.image.tag`.
120-
- The container listens publicly on port `5000` and internally on port `5001`.
123+
- The container's public and private listeners use `internal.serverPort` and
124+
`internal.serverInternalPort` (defaulting to `5000` and `5001`).
121125
- Environment variables are loaded from `server-config` and `spec-config`.
122126
- The pod uses the `aggregator-server-sa` service account.
123-
- Readiness is checked at `GET /healthz` on port `5000`.
127+
- Readiness is checked at `GET /healthz` on `internal.serverPort`.
124128
- Probe timing and thresholds come from `server.readinessProbe`.
125129
- When either `auth.oidc.clientSecret` or
126130
`auth.client_credentials.clientSecret` exists, the
@@ -129,16 +133,17 @@ Creates the `aggregator-server` Deployment.
129133
### `server-service.yaml`
130134

131135
Creates the `aggregator-server-svc` ClusterIP Service. It selects the server
132-
component and maps public port `5000` and internal bundle port `5001` to their
133-
matching container ports. Only port `5000` is targeted by the Ingress.
136+
component and maps `internal.serverPort` and `internal.serverInternalPort` to
137+
their matching container ports. Only the named public port is targeted by the
138+
Ingress.
134139

135140
### `server-ingress.yaml`
136141

137142
Creates the `aggregator-server-ingress` Ingress.
138143

139144
- `ingressClassName` selects the Ingress controller.
140145
- `external.host` becomes the single host rule.
141-
- The `/` prefix routes to `aggregator-server-svc` on port `5000`.
146+
- The `/` prefix routes to the `aggregator-server-svc` named public port.
142147
- When `tls.enabled` is true, the Ingress references `tls.secretName` for
143148
`external.host`.
144149

aggregator-platform/templates/NOTES.txt

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,19 @@ This is displayed after helm install / upgrade
77
# Aggregator Server Installation Complete
88
##########################################################
99

10-
Aggregation platform is available at:
11-
12-
{{- if .Values.tls.enabled }}
13-
https://{{ .Values.external.host }}
14-
{{- else }}
15-
http://{{ .Values.external.host }}
16-
{{- end }}
10+
Aggregation platform is available at:
11+
12+
{{ .Values.external.proto }}://{{ .Values.external.host }}:{{ .Values.external.port }}
1713

1814
----------------------------------------------------------
1915
Browse deployment functions:
20-
21-
{{- if .Values.tls.enabled }}
22-
- https://{{ .Values.external.host }}{{ .Values.spec.deployment_catalog }}
23-
{{- else }}
24-
- http://{{ .Values.external.host }}{{ .Values.spec.deployment_catalog }}
25-
{{- end }}
16+
17+
- {{ .Values.external.proto }}://{{ .Values.external.host }}:{{ .Values.external.port }}{{ .Values.spec.deployment_catalog }}
2618

2719
----------------------------------------------------------
28-
Create aggregators at:
29-
30-
{{- if .Values.tls.enabled }}
31-
- https://{{ .Values.external.host }}{{ .Values.spec.registration }}
32-
{{- else }}
33-
- http://{{ .Values.external.host }}{{ .Values.spec.registration }}
34-
{{- end }}
20+
Create aggregators at:
21+
22+
- {{ .Values.external.proto }}://{{ .Values.external.host }}:{{ .Values.external.port }}{{ .Values.spec.registration }}
3523

3624
##########################################################
3725
# End of NOTES

aggregator-platform/templates/server-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ metadata:
1010
data:
1111
NAMESPACE: {{ .Release.Namespace | quote }}
1212
LOG_LEVEL: {{ .Values.loglevel | quote }}
13+
SERVER_PORT: {{ .Values.internal.serverPort | quote }}
14+
SERVER_INTERNAL_PORT: {{ .Values.internal.serverInternalPort | quote }}
15+
INSTANCE_PORT: {{ .Values.internal.instancePort | quote }}
1316

1417
EXTERNAL_HOST: {{ .Values.external.host | quote }}
1518
EXTERNAL_PROTO: {{ .Values.external.proto | quote }}

aggregator-platform/templates/server-deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ spec:
2929
imagePullPolicy: {{ .Values.server.image.pullPolicy }}
3030
ports:
3131
- name: public
32-
containerPort: 5000
32+
containerPort: {{ .Values.internal.serverPort }}
3333
- name: internal
34-
containerPort: 5001
34+
containerPort: {{ .Values.internal.serverInternalPort }}
3535
envFrom:
3636
- configMapRef:
3737
name: server-config
@@ -45,8 +45,8 @@ spec:
4545
{{- end }}
4646
readinessProbe:
4747
httpGet:
48-
path: /healthz
49-
port: 5000
48+
path: /healthz
49+
port: {{ .Values.internal.serverPort }}
5050
initialDelaySeconds: {{ .Values.server.readinessProbe.initialDelaySeconds }}
5151
periodSeconds: {{ .Values.server.readinessProbe.periodSeconds }}
5252
timeoutSeconds: {{ .Values.server.readinessProbe.timeoutSeconds }}

aggregator-platform/templates/server-service.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ spec:
1414
app.kubernetes.io/component: server
1515
ports:
1616
- name: public
17-
port: 5000
18-
targetPort: 5000
17+
port: {{ .Values.internal.serverPort }}
18+
targetPort: {{ .Values.internal.serverPort }}
1919
- name: internal
20-
port: 5001
21-
targetPort: 5001
20+
port: {{ .Values.internal.serverInternalPort }}
21+
targetPort: {{ .Values.internal.serverInternalPort }}

aggregator-platform/values.schema.json

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,39 @@
1010
"type": "object"
1111
}
1212
},
13-
"deploymentFunctions": {
13+
"deploymentFunctions": {
1414
"type": "object",
1515
"description": "DeploymentFunction specs keyed by Kubernetes resource name.",
1616
"additionalProperties": {
1717
"type": "object"
18-
}
19-
},
20-
"external": {
18+
}
19+
},
20+
"internal": {
21+
"type": "object",
22+
"required": ["serverPort", "serverInternalPort", "instancePort"],
23+
"additionalProperties": false,
24+
"properties": {
25+
"serverPort": {
26+
"type": "integer",
27+
"minimum": 1,
28+
"maximum": 65535,
29+
"description": "Cluster-internal port for the server's public HTTP handlers."
30+
},
31+
"serverInternalPort": {
32+
"type": "integer",
33+
"minimum": 1,
34+
"maximum": 65535,
35+
"description": "Cluster-internal port for private catalog handlers."
36+
},
37+
"instancePort": {
38+
"type": "integer",
39+
"minimum": 1,
40+
"maximum": 65535,
41+
"description": "Cluster-internal HTTP port for dynamically deployed aggregator instances."
42+
}
43+
}
44+
},
45+
"external": {
2146
"type": "object",
2247
"required": ["host", "proto", "port"],
2348
"properties": {

aggregator-platform/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
loglevel: info
22

3+
internal:
4+
serverPort: 5000
5+
serverInternalPort: 5001
6+
instancePort: 5000
7+
38
auth:
49
oidc: {}
510
client_credentials: {}

config/example.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
external:
22
host: aggregator.local
3-
httpPort: 5080
4-
httpsPort: 5443
3+
proto: http
4+
port: 5080
5+
6+
internal:
7+
serverPort: 5000
8+
serverInternalPort: 5001
9+
instancePort: 5000
510

611
auth:
712
oidc:
@@ -16,4 +21,4 @@ ingressClassName: aggregator-traefik
1621
tls:
1722
enabled: false
1823

19-
loglevel: debug
24+
loglevel: debug

0 commit comments

Comments
 (0)