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 }} type: {{ .Values.service.type }}
ports: ports:
- port: {{ .Values.service.port }} - port: {{ .Values.service.port }}
targetPort: http targetPort: {{ .Values.service.targetPort | default 5000 }}
protocol: TCP protocol: TCP
name: http name: http
{{- if and (eq .Values.service.type "NodePort") .Values.service.nodePort }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
selector: selector:
{{- include "gitops-status-server.selectorLabels" . | nindent 4 }} {{- include "gitops-status-server.selectorLabels" . | nindent 4 }}

View File

@ -25,10 +25,14 @@ fullnameOverride: ""
# Service configuration # Service configuration
service: service:
# Service type - ClusterIP for internal-only access # Service type - NodePort for external access, ClusterIP for internal-only
type: ClusterIP type: ClusterIP
# Port where the service will be exposed # 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 to add to the service
annotations: {} annotations: {}

View File

@ -16,8 +16,13 @@ api:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# Service configuration # Service configuration
service: service:
type: ClusterIP # Use NodePort to expose the API externally
port: 80 # 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: {} annotations: {}
# Resource limits # Resource limits
resources: resources: