Skip to content

Commit 0a1c5ce

Browse files
committed
typo contexPath to contextPath
1 parent 4eb4792 commit 0a1c5ce

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
1. Get the application URL by running these commands:
22
{{- if .Values.ingress.enabled }}
3-
{{- $contexPath := include "cosmotech-api.contexPath" . -}}
3+
{{- $contextPath := include "cosmotech-api.contextPath" . -}}
44
{{- range $host := .Values.ingress.hosts }}
5-
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ $contexPath }}
5+
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ $contextPath }}
66
{{- range .paths }}
77
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
88
{{- end }}
99
{{- end }}
1010
{{- else if contains "NodePort" .Values.service.type }}
1111
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "cosmotech-api.fullname" . }})
1212
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
13-
echo http://$NODE_IP:$NODE_PORT{{ include "cosmotech-api.contexPath" . }}
13+
echo http://$NODE_IP:$NODE_PORT{{ include "cosmotech-api.contextPath" . }}
1414
{{- else if contains "LoadBalancer" .Values.service.type }}
1515
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
1616
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "cosmotech-api.fullname" . }}'
1717
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "cosmotech-api.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
18-
echo http://$SERVICE_IP:{{ .Values.service.port }}{{ include "cosmotech-api.contexPath" . }}
18+
echo http://$SERVICE_IP:{{ .Values.service.port }}{{ include "cosmotech-api.contextPath" . }}
1919
{{- else if contains "ClusterIP" .Values.service.type }}
2020
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "cosmotech-api.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
2121
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
22-
echo "Visit http://127.0.0.1:8080{{ include "cosmotech-api.contexPath" . }} to use your application"
22+
echo "Visit http://127.0.0.1:8080{{ include "cosmotech-api.contextPath" . }} to use your application"
2323
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
2424
{{- end }}

api/kubernetes/helm-chart/templates/_helpers.tpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ E.g:
8383
- /cosmotech-api/myTenant/v1
8484
- /cosmotech-api/myTenant/ if apiVersion is set to "latest"
8585
*/}}
86-
{{- define "cosmotech-api.contexPath" -}}
86+
{{- define "cosmotech-api.contextPath" -}}
8787
{{- if eq .Values.api.version "latest" }}
8888
{{- printf "%s/%s" (printf "%s" .Values.api.servletContextPath | trimSuffix "/" ) .Release.Namespace }}
8989
{{- else }}
@@ -102,11 +102,11 @@ spring:
102102
api:
103103
version: "{{ .Values.api.version }}"
104104
multiTenant: {{ default true .Values.api.multiTenant }}
105-
servletContextPath: {{ include "cosmotech-api.contexPath" . }}
105+
servletContextPath: {{ include "cosmotech-api.contextPath" . }}
106106

107107
server:
108108
servlet:
109-
context-path: {{ include "cosmotech-api.contexPath" . }}
109+
context-path: {{ include "cosmotech-api.contextPath" . }}
110110
jetty:
111111
accesslog:
112112
ignore-paths:
@@ -135,7 +135,7 @@ management:
135135
csm:
136136
platform:
137137
api:
138-
base-url: "http://{{ include "cosmotech-api.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }}{{ include "cosmotech-api.contexPath" . | trimSuffix "/" }}"
138+
base-url: "http://{{ include "cosmotech-api.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }}{{ include "cosmotech-api.contextPath" . | trimSuffix "/" }}"
139139
# API Base Path for OpenAPI-generated controllers.
140140
# Might conflict with the SpringBoot context path, hence leaving it at the root
141141
base-path: /

api/kubernetes/helm-chart/templates/ingress.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{- $kubeVersion := .Capabilities.KubeVersion.GitVersion -}}
33
{{- $fullName := include "cosmotech-api.fullname" . -}}
44
{{- $svcPort := .Values.service.port -}}
5-
{{- $contexPath := include "cosmotech-api.contexPath" . -}}
5+
{{- $contextPath := include "cosmotech-api.contextPath" . -}}
66
{{- if semverCompare ">=1.19-0" $kubeVersion -}}
77
apiVersion: networking.k8s.io/v1
88
{{- else if semverCompare ">=1.14-0" $kubeVersion -}}
@@ -37,7 +37,7 @@ spec:
3737
- host: {{ .host | quote }}
3838
http:
3939
paths:
40-
- path: {{ $contexPath }}
40+
- path: {{ $contextPath }}
4141
pathType: Prefix
4242
backend:
4343
{{- if semverCompare ">=1.19-0" $kubeVersion }}

api/kubernetes/helm-chart/templates/tests/test-access-openapi.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- $contexPath := include "cosmotech-api.contexPath" . -}}
1+
{{- $contextPath := include "cosmotech-api.contextPath" . -}}
22
apiVersion: v1
33
kind: Pod
44
metadata:
@@ -38,9 +38,9 @@ spec:
3838
- '-S'
3939
- '-O'
4040
- '-'
41-
- 'http://{{ include "cosmotech-api.fullname" . }}:{{ .Values.service.port }}{{ $contexPath | trimSuffix "/" }}/openapi'
42-
- 'http://{{ include "cosmotech-api.fullname" . }}:{{ .Values.service.port }}{{ $contexPath | trimSuffix "/" }}/openapi.json'
43-
- 'http://{{ include "cosmotech-api.fullname" . }}:{{ .Values.service.port }}{{ $contexPath | trimSuffix "/" }}/openapi.yaml'
41+
- 'http://{{ include "cosmotech-api.fullname" . }}:{{ .Values.service.port }}{{ $contextPath | trimSuffix "/" }}/openapi'
42+
- 'http://{{ include "cosmotech-api.fullname" . }}:{{ .Values.service.port }}{{ $contextPath | trimSuffix "/" }}/openapi.json'
43+
- 'http://{{ include "cosmotech-api.fullname" . }}:{{ .Values.service.port }}{{ $contextPath | trimSuffix "/" }}/openapi.yaml'
4444
securityContext:
4545
readOnlyRootFilesystem: true
4646
resources:

api/kubernetes/helm-chart/templates/tests/test-access-swaggerui.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- $contexPath := include "cosmotech-api.contexPath" . -}}
1+
{{- $contextPath := include "cosmotech-api.contextPath" . -}}
22
apiVersion: v1
33
kind: Pod
44
metadata:
@@ -38,7 +38,7 @@ spec:
3838
- '-S'
3939
- '-O'
4040
- '-'
41-
- 'http://{{ include "cosmotech-api.fullname" . }}:{{ .Values.service.port }}{{ $contexPath | trimSuffix "/" }}/swagger-ui/index.html'
41+
- 'http://{{ include "cosmotech-api.fullname" . }}:{{ .Values.service.port }}{{ $contextPath | trimSuffix "/" }}/swagger-ui/index.html'
4242
securityContext:
4343
readOnlyRootFilesystem: true
4444
resources:

0 commit comments

Comments
 (0)