diff --git a/templates/NOTES.txt b/templates/NOTES.txt index 0f1572f..cb49135 100644 --- a/templates/NOTES.txt +++ b/templates/NOTES.txt @@ -13,7 +13,7 @@ NOTE: It may take a few minutes for the LoadBalancer IP to be available. You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "hedgedoc.fullname" . }}' export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "hedgedoc.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} + echo http://$SERVICE_IP:{{ .Values.config.port }} {{- else if contains "ClusterIP" .Values.service.type }} export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "hedgedoc.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") diff --git a/templates/deployment.yaml b/templates/deployment.yaml index e6c394b..7857c40 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -47,7 +47,7 @@ spec: {{- end }} ports: - name: http - containerPort: {{ .Values.service.port }} + containerPort: {{ .Values.config.port }} protocol: TCP livenessProbe: httpGet: diff --git a/templates/ingress.yaml b/templates/ingress.yaml index b6027c2..e0d69bf 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -1,6 +1,6 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "hedgedoc.fullname" . -}} -{{- $svcPort := .Values.service.port -}} +{{- $svcPort := .Values.config.port -}} {{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} diff --git a/templates/tests/test-connection.yaml b/templates/tests/test-connection.yaml index 8031123..6cf4903 100644 --- a/templates/tests/test-connection.yaml +++ b/templates/tests/test-connection.yaml @@ -11,5 +11,5 @@ spec: - name: wget image: busybox command: [ 'wget' ] - args: [ '{{ include "hedgedoc.fullname" . }}:{{ .Values.service.port }}' ] + args: [ '{{ include "hedgedoc.fullname" . }}:{{ .Values.config.port }}' ] restartPolicy: Never