File tree Expand file tree Collapse file tree 4 files changed +28
-10
lines changed
helm-charts/restapi-testapp Expand file tree Collapse file tree 4 files changed +28
-10
lines changed Original file line number Diff line number Diff line change
1
+ kind : ConfigMap
2
+ apiVersion : v1
3
+ metadata :
4
+ name : {{ include "restapi-testapp.fullname" . }}
5
+ namespace : {{ .Values.namespace.name }}
6
+ data :
7
+ API_PORT : {{ .Values.ports.http | quote }}
8
+ TLS_API_PORT : {{ .Values.ports.tls | quote }}
9
+ TLS : {{ .Values.ports.tlsEnabled | quote }}
10
+ API_PREFIX : {{ .Values.ingress.routePrefix |quote }}
Original file line number Diff line number Diff line change 26
26
limits : {cpu: "250m", memory: "50Mi"}
27
27
env :
28
28
- name : RESTAPI_API_PORT
29
- value : {{ .Values.apiPort | quote }}
29
+ value : {{ .Values.ports.http | quote }}
30
30
dnsPolicy : ClusterFirstWithHostNet
31
31
restartPolicy : Always
Original file line number Diff line number Diff line change 1
1
{{ $namespace := .Values.namespace.name }}
2
2
{{ $fullname := include "restapi-testapp.fullname" .}}
3
+ {{ $routePrefix := .Values.ingress.routePrefix }}
3
4
{{ if and (eq .Values.ingress.ingressClass "istio") (.Values.ingress.enabled) }}
4
5
apiVersion : networking.istio.io/v1beta1
5
6
kind : VirtualService
17
18
- name : {{ .name }}
18
19
match :
19
20
- uri :
20
- prefix : {{ .route }}
21
+ prefix : {{if not (hasPrefix "/" $routePrefix) }}/{{end}}{{ $routePrefix }}/{{ .route }}
21
22
route :
22
23
- destination :
23
24
host : {{$fullname}}.{{$namespace}}.svc.cluster.local
Original file line number Diff line number Diff line change 1
- apiPort : 10000
2
1
replicaCount : 1
3
2
service :
4
- port : 80
3
+ http : 80
4
+ tls : 443
5
5
namespace :
6
- name : demo
7
6
create : true
7
+ name : demo
8
8
serviceAccount :
9
9
create : true
10
10
autoscaling :
@@ -13,13 +13,20 @@ autoscaling:
13
13
maxReplicas : 5
14
14
targetCPUUtilizationPercentage : 30
15
15
targetMemoryUtilizationPercentage : 75
16
+ tlsEnabled : true
16
17
ingress :
17
18
enabled : true
18
- ingressClass : istio
19
- gateway : proxy
20
- tls : true
19
+ ingressClass : ' istio'
20
+ gateway : ' proxy'
21
+ routePrefix : ' /api '
21
22
hosts :
22
23
- host : ' test.local-cluster.internal'
23
24
paths :
24
- - name : " hello"
25
- route : " /hello"
25
+ - name : " hello-world"
26
+ route : " hello"
27
+ - name : " auth"
28
+ route : " auth"
29
+ - name : " login-route"
30
+ route : " login"
31
+ - name : " validate-route"
32
+ route : " validate"
You can’t perform that action at this time.
0 commit comments