From a04031eef63b5862a2c3d54cfbc077810ddae5b2 Mon Sep 17 00:00:00 2001 From: dvirlabs <114520947+dvirlabs@users.noreply.github.com> Date: Thu, 23 Apr 2026 12:16:14 +0300 Subject: [PATCH] feat: expose gitops-status-api via NodePort for external access --- charts/gitops-status-server/templates/service.yaml | 5 ++++- charts/gitops-status-server/values.yaml | 8 ++++++-- manifests/gitops-status-server/values.yaml | 9 +++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/charts/gitops-status-server/templates/service.yaml b/charts/gitops-status-server/templates/service.yaml index 29db208..e3a556d 100644 --- a/charts/gitops-status-server/templates/service.yaml +++ b/charts/gitops-status-server/templates/service.yaml @@ -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 }} diff --git a/charts/gitops-status-server/values.yaml b/charts/gitops-status-server/values.yaml index 4ed5a18..720b990 100644 --- a/charts/gitops-status-server/values.yaml +++ b/charts/gitops-status-server/values.yaml @@ -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: {} diff --git a/manifests/gitops-status-server/values.yaml b/manifests/gitops-status-server/values.yaml index d210213..5ad42c4 100644 --- a/manifests/gitops-status-server/values.yaml +++ b/manifests/gitops-status-server/values.yaml @@ -16,8 +16,13 @@ api: pullPolicy: IfNotPresent # Service configuration service: - type: ClusterIP - port: 80 + # Use NodePort to expose the API externally + # Access via: http://: + 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: