feat: expose gitops-status-api via NodePort for external access

This commit is contained in:
dvirlabs 2026-04-23 12:16:14 +03:00
parent 9c664e0462
commit a04031eef6
3 changed files with 17 additions and 5 deletions

View File

@ -17,8 +17,11 @@ spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
targetPort: {{ .Values.service.targetPort | default 5000 }}
protocol: TCP
name: http
{{- if and (eq .Values.service.type "NodePort") .Values.service.nodePort }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
selector:
{{- include "gitops-status-server.selectorLabels" . | nindent 4 }}

View File

@ -25,10 +25,14 @@ fullnameOverride: ""
# Service configuration
service:
# Service type - ClusterIP for internal-only access
# Service type - NodePort for external access, ClusterIP for internal-only
type: ClusterIP
# Port where the service will be exposed
port: 80
port: 5000
# Target port on the container (API port)
targetPort: 5000
# NodePort (30000-32767) for external access when type is NodePort
nodePort: null
# Annotations to add to the service
annotations: {}

View File

@ -16,8 +16,13 @@ api:
pullPolicy: IfNotPresent
# Service configuration
service:
type: ClusterIP
port: 80
# Use NodePort to expose the API externally
# Access via: http://<node-ip>:<nodePort>
type: NodePort
# Port exposed by the service
port: 5000
# NodePort (30000-32767) for external access. Leave empty for automatic assignment
nodePort: 30005
annotations: {}
# Resource limits
resources: