diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index b30053b..98a65a5 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -42,7 +42,7 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http - containerPort: {{ .Values.service.port }} + containerPort: {{ .Values.containerPort | default 8080 }} # ← Now points to 8080 protocol: TCP {{- with .Values.livenessProbe }} livenessProbe: diff --git a/chart/templates/service.yaml b/chart/templates/service.yaml index a440348..8451ce1 100644 --- a/chart/templates/service.yaml +++ b/chart/templates/service.yaml @@ -1,12 +1,13 @@ apiVersion: v1 kind: Service metadata: - name: blog-service + name: { { include "chart.fullname" . } } labels: { { - include "chart.labels" . | nindent 4 } } spec: type: { { .Values.service.type } } ports: - port: { { .Values.service.port } } - targetPort: { { .Values.service.targetPort } } + targetPort: http protocol: TCP + name: http selector: { { - include "chart.selectorLabels" . | nindent 4 } } diff --git a/chart/values.yaml b/chart/values.yaml index 63e41ab..d738019 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -56,7 +56,9 @@ service: # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types type: ClusterIP # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports - port: 80 + port: 8080 + +containerPort: 8080 # This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/ ingress: @@ -71,11 +73,7 @@ ingress: paths: - path: / pathType: Prefix - backend: - service: - name: blog-service - port: - number: 80 + tls: - secretName: blog-tls hosts: