From 563173c1a7425ad1cf066decd939e4f9c9e74589 Mon Sep 17 00:00:00 2001 From: "olof.pettersson" Date: Thu, 11 Dec 2025 16:33:46 +0100 Subject: [PATCH] Fix service port mapping --- .gitea/workflows/publish-chart.yaml | 2 +- templates/service.yaml | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/publish-chart.yaml b/.gitea/workflows/publish-chart.yaml index fef90f6..dafcedb 100644 --- a/.gitea/workflows/publish-chart.yaml +++ b/.gitea/workflows/publish-chart.yaml @@ -6,7 +6,7 @@ on: branches: - main paths: - - '*.yaml' # Only trigger if yaml files on main are updated + - '**/*.yaml' # Only trigger if yaml files on main are updated jobs: publish: diff --git a/templates/service.yaml b/templates/service.yaml index 6c2ea36..7b2aa84 100644 --- a/templates/service.yaml +++ b/templates/service.yaml @@ -5,12 +5,13 @@ metadata: labels: {{- include "solidtime.labels" . | nindent 4 }} spec: - type: ClusterIP + type: {{ .Values.service.type }} ports: - - port: 80 - targetPort: 80 + - port: {{ .Values.service.port }} + # ✅ CRITICAL: It must use the .Values.service.targetPort variable + # If this line is missing, K8s assumes targetPort == port + targetPort: {{ .Values.service.targetPort | default 8000 }} protocol: TCP name: http selector: - # Matches the labels in deployment-app.yaml - app: solidtime-app \ No newline at end of file + {{- include "solidtime.selectorLabels" . | nindent 4 }} \ No newline at end of file