Skip to content

Commit b732182

Browse files
committed
make only the external ports to be configurable
1 parent 2693248 commit b732182

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

charts/pdp/templates/deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ spec:
4444
type: RuntimeDefault
4545
{{- end }}
4646
ports:
47-
{{- range .Values.pdp.ports }}
48-
- name: {{ .name }}
49-
containerPort: {{ .targetPort | default .port }}
50-
{{- end }}
47+
- name: pdp
48+
containerPort: 7000
49+
- name: opa
50+
containerPort: 8181
5151
env:
5252
- name: PDP_API_KEY
5353
valueFrom:

charts/pdp/templates/service.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ spec:
1414
selector:
1515
{{- include "pdp.selectorLabels" . | nindent 4 }}
1616
ports:
17-
{{- range .Values.pdp.ports }}
18-
- name: {{ .name }}
19-
port: {{ .port }}
20-
targetPort: {{ .targetPort | default .port }}
17+
- name: pdp
18+
port: {{ .Values.pdp.pdpPort }}
19+
targetPort: 7000
20+
protocol: TCP
21+
- name: opa
22+
port: {{ .Values.pdp.opaPort }}
23+
targetPort: 8181
2124
protocol: TCP
22-
{{- end }}

charts/pdp/values.yaml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,9 @@ pdp:
1313
# existingApiKeySecret:
1414
# name: "my-existing-secret"
1515
# key: "api-key"
16-
# Ports to expose on the service and container
17-
# Available container ports: 7000 (PDP API), 8181 (OPA)
18-
ports:
19-
- name: pdp
20-
port: 7766
21-
targetPort: 7000
22-
- name: opa
23-
port: 8181
24-
targetPort: 8181
16+
# Service ports (external ports exposed by the Kubernetes Service)
17+
pdpPort: 7766 # maps to container port 7000 (PDP API)
18+
opaPort: 8181 # maps to container port 8181 (OPA)
2519
replicas: 1
2620
image:
2721
repository: permitio/pdp-v2

0 commit comments

Comments
 (0)