Skip to content

Commit fec058d

Browse files
committed
TT-11901: move health check service into a separate value
1 parent abf7faa commit fec058d

File tree

7 files changed

+143
-75
lines changed

7 files changed

+143
-75
lines changed

components/tyk-pump/templates/deployment-pmp.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,17 @@ spec:
6464
livenessProbe:
6565
httpGet:
6666
scheme: "HTTP"
67-
path: /{{ .Values.pump.service.healthEndpointName | default "health" }}
68-
port: {{ .Values.pump.service.healthEndpointPort | default 8083 }}
67+
path: /{{ .Values.pump.healthCheckService.path }}
68+
port: {{ .Values.pump.healthCheckService.port }}
6969
{{- toYaml .Values.pump.livenessProbe | nindent 10 }}
7070
{{- end }}
7171

7272
{{- if .Values.pump.readinessProbe }}
7373
readinessProbe:
7474
httpGet:
7575
scheme: "HTTP"
76-
path: /{{ .Values.pump.service.healthEndpointName | default "health" }}
77-
port: {{ .Values.pump.service.healthEndpointPort | default 8083 }}
76+
path: /{{ .Values.pump.healthCheckService.path }}
77+
port: {{ .Values.pump.healthCheckService.port }}
7878
{{- toYaml .Values.pump.readinessProbe | nindent 10 }}
7979
{{- end }}
8080

@@ -356,14 +356,12 @@ spec:
356356
value: "4000"
357357
- name: TYK_PMP_PURGEDELAY
358358
value: "2"
359-
{{- if .Values.pump.service.healthEnabled }}
359+
{{- if .Values.pump.healthCheckService.enabled }}
360360
- name: TYK_PMP_HEALTHCHECKENDPOINTNAME
361-
value: "{{ .Values.pump.service.healthEndpointName }}"
362-
{{- end }}
363-
{{- if .Values.pump.service.healthEnabled}}
361+
value: "{{ .Values.pump.healthCheckService.path }}"
364362
- name: TYK_PMP_HEALTHCHECKENDPOINTPORT
365-
value: "{{ .Values.pump.service.healthEndpointPort }}"
366-
{{- end }}
363+
value: "{{ .Values.pump.healthCheckService.port }}"
364+
{{- end }}
367365

368366
{{- if .Values.pump.extraEnvs }}
369367
{{- include "tyk-pump.tplvalues.render" ( dict "value" .Values.pump.extraEnvs "context" $ ) | nindent 10 }}

components/tyk-pump/templates/service-pump-health.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{{- if .Values.pump.service.healthEnabled -}}
1+
{{- if .Values.pump.healthCheckService.enabled -}}
22
apiVersion: v1
33
kind: Service
44
metadata:
55
name: pump-svc-health-{{ include "tyk-pump.fullname" . }}
6-
{{- if .Values.pump.service.annotations }}
7-
{{ toYaml .Values.pump.service.annotations }}
6+
{{- if .Values.pump.healthCheckService.annotations }}
7+
{{ toYaml .Values.pump.healthCheckService.annotations }}
88
{{- end }}
99
labels:
1010
app: pump-svc-{{ include "tyk-pump.fullname" . }}
@@ -13,13 +13,13 @@ metadata:
1313
heritage: {{ .Release.Service }}
1414
spec:
1515
ports:
16-
- port: {{ .Values.pump.service.healthEndpointPort | default 8083 }}
17-
targetPort: {{ .Values.pump.service.healthEndpointPort | default 8083 }}
16+
- port: {{ .Values.pump.healthCheckService.port }}
17+
targetPort: {{ .Values.pump.healthCheckService.port }}
1818
protocol: TCP
19-
name: {{ default "http" .Values.pump.service.portName | quote }}
20-
type: {{ .Values.pump.service.type }}
19+
name: {{ default "http" .Values.pump.healthCheckService.portName | quote }}
20+
type: {{ .Values.pump.healthCheckService.type }}
2121
{{- if eq .Values.pump.service.type "LoadBalancer" }}
22-
externalTrafficPolicy: {{ .Values.pump.service.externalTrafficPolicy }}
22+
externalTrafficPolicy: {{ .Values.pump.healthCheckService.externalTrafficPolicy }}
2323
{{- end }}
2424
selector:
2525
app: pump-{{ include "tyk-pump.fullname" . }}

components/tyk-pump/values.yaml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -206,17 +206,6 @@ pump:
206206
# Tyk Pump svc is disabled by default. Set it to true to enable it.
207207
enabled: false
208208

209-
# healthEnabled enables health check service
210-
healthEnabled: false
211-
212-
# healthEndpointName sets the health check path.
213-
# It defaults to hello if health check is enabled and it is not set.
214-
healthEndpointName: ""
215-
216-
# healthEndpointPort sets the health check port.
217-
# It defaults to 8083 if health check is enabled and it is not set.
218-
healthEndpointPort:
219-
220209
# type specifies type of the service.
221210
type: ClusterIP
222211

@@ -231,7 +220,32 @@ pump:
231220
annotations: {}
232221

233222
# The name for the service port
234-
portName: ""
223+
portName: ""
224+
225+
healthCheckService:
226+
# type specifies type of the service.
227+
type: ClusterIP
228+
229+
# Tyk Pump health service is disabled by default.
230+
# Set it to true to enable it.
231+
enabled: false
232+
233+
# path sets the health check path.
234+
path: ""
235+
236+
# port sets the health check port.
237+
# It defaults to 8083 if health check is enabled and it is not set.
238+
port: 8083
239+
240+
# The name for the health check service port
241+
portName: ""
242+
243+
# annotations specifies annotations to be added Tyk Pump service.
244+
annotations: {}
245+
246+
# externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or
247+
# cluster-wide endpoints, while using LoadBalancer type of service.
248+
externalTrafficPolicy: Local
235249

236250
# containerPort represents the port where Tyk Pump serve the metrics, for instance metrics for Prometheus.
237251
# The default port is 9090.

tyk-control-plane/values.yaml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -737,17 +737,6 @@ tyk-pump:
737737
# Tyk Pump svc is disabled by default. Set it to true to enable it.
738738
enabled: false
739739

740-
# healthEnabled enables health check service
741-
healthEnabled: false
742-
743-
# healthEndpointName sets the health check path.
744-
# It defaults to hello if health check is enabled and it is not set.
745-
healthEndpointName: ""
746-
747-
# healthEndpointPort sets the health check port.
748-
# It defaults to 8083 if health check is enabled and it is not set.
749-
healthEndpointPort:
750-
751740
# type specifies type of the service.
752741
type: ClusterIP
753742

@@ -761,6 +750,31 @@ tyk-pump:
761750
# annotations specifies annotations to be added Tyk Pump service.
762751
annotations: {}
763752

753+
healthCheckService:
754+
# type specifies type of the service.
755+
type: ClusterIP
756+
757+
# Tyk Pump health service is disabled by default.
758+
# Set it to true to enable it.
759+
enabled: false
760+
761+
# path sets the health check path.
762+
path: ""
763+
764+
# port sets the health check port.
765+
# It defaults to 8083 if health check is enabled and it is not set.
766+
port: 8083
767+
768+
# The name for the health check service port
769+
portName: ""
770+
771+
# annotations specifies annotations to be added Tyk Pump service.
772+
annotations: {}
773+
774+
# externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or
775+
# cluster-wide endpoints, while using LoadBalancer type of service.
776+
externalTrafficPolicy: Local
777+
764778
# containerPort represents the port where Tyk Pump serve the metrics, for instance metrics for Prometheus.
765779
# The default port is 9090.
766780
containerPort: 9090

tyk-data-plane/values.yaml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -618,17 +618,6 @@ tyk-pump:
618618
# Tyk Pump svc is disabled by default. Set it to true to enable it.
619619
enabled: false
620620

621-
# healthEnabled enables health check service
622-
healthEnabled: false
623-
624-
# healthEndpointName sets the health check path.
625-
# It defaults to hello if health check is enabled and it is not set.
626-
healthEndpointName: ""
627-
628-
# healthEndpointPort sets the health check port.
629-
# It defaults to 8083 if health check is enabled and it is not set.
630-
healthEndpointPort:
631-
632621
# type specifies type of the service.
633622
type: ClusterIP
634623

@@ -642,6 +631,31 @@ tyk-pump:
642631
# annotations specifies annotations to be added Tyk Pump service.
643632
annotations: {}
644633

634+
healthCheckService:
635+
# type specifies type of the service.
636+
type: ClusterIP
637+
638+
# Tyk Pump health service is disabled by default.
639+
# Set it to true to enable it.
640+
enabled: false
641+
642+
# path sets the health check path.
643+
path: ""
644+
645+
# port sets the health check port.
646+
# It defaults to 8083 if health check is enabled and it is not set.
647+
port: 8083
648+
649+
# The name for the health check service port
650+
portName: ""
651+
652+
# annotations specifies annotations to be added Tyk Pump service.
653+
annotations: {}
654+
655+
# externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or
656+
# cluster-wide endpoints, while using LoadBalancer type of service.
657+
externalTrafficPolicy: Local
658+
645659
# containerPort represents the port where Tyk Pump serve the metrics, for instance metrics for Prometheus.
646660
# The default port is 9090.
647661
containerPort: 9090

tyk-oss/values.yaml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -659,17 +659,6 @@ tyk-pump:
659659
# Tyk Pump svc is disabled by default. Set it to true to enable it.
660660
enabled: false
661661

662-
# healthEnabled enables health check service
663-
healthEnabled: false
664-
665-
# healthEndpointName sets the health check path.
666-
# It defaults to hello if health check is enabled and it is not set.
667-
healthEndpointName: ""
668-
669-
# healthEndpointPort sets the health check port.
670-
# It defaults to 8083 if health check is enabled and it is not set.
671-
healthEndpointPort:
672-
673662
# type specifies type of the service.
674663
type: ClusterIP
675664

@@ -683,6 +672,31 @@ tyk-pump:
683672
# annotations specifies annotations to be added Tyk Pump service.
684673
annotations: {}
685674

675+
healthCheckService:
676+
# type specifies type of the service.
677+
type: ClusterIP
678+
679+
# Tyk Pump health service is disabled by default.
680+
# Set it to true to enable it.
681+
enabled: false
682+
683+
# path sets the health check path.
684+
path: ""
685+
686+
# port sets the health check port.
687+
# It defaults to 8083 if health check is enabled and it is not set.
688+
port: 8083
689+
690+
# The name for the health check service port
691+
portName: ""
692+
693+
# annotations specifies annotations to be added Tyk Pump service.
694+
annotations: {}
695+
696+
# externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or
697+
# cluster-wide endpoints, while using LoadBalancer type of service.
698+
externalTrafficPolicy: Local
699+
686700
# containerPort represents the port where Tyk Pump serve the metrics, for instance metrics for Prometheus.
687701
# The default port is 9090.
688702
containerPort: 9090
@@ -826,7 +840,7 @@ tyk-pump:
826840
# periodSeconds: 10
827841
# timeoutSeconds: 3
828842
# failureThreshold: 3
829-
readinessProbe: {}
843+
readinessProbe: {}
830844

831845
tests:
832846
enabled: true

tyk-stack/values.yaml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -755,17 +755,6 @@ tyk-pump:
755755
# Tyk Pump svc is disabled by default. Set it to true to enable it.
756756
enabled: false
757757

758-
# healthEnabled enables health check service
759-
healthEnabled: false
760-
761-
# healthEndpointName sets the health check path.
762-
# It defaults to hello if health check is enabled and it is not set.
763-
healthEndpointName: ""
764-
765-
# healthEndpointPort sets the health check port.
766-
# It defaults to 8083 if health check is enabled and it is not set.
767-
healthEndpointPort:
768-
769758
# type specifies type of the service.
770759
type: ClusterIP
771760

@@ -779,6 +768,31 @@ tyk-pump:
779768
# annotations specifies annotations to be added Tyk Pump service.
780769
annotations: {}
781770

771+
healthCheckService:
772+
# type specifies type of the service.
773+
type: ClusterIP
774+
775+
# Tyk Pump health service is disabled by default.
776+
# Set it to true to enable it.
777+
enabled: true
778+
779+
# path sets the health check path.
780+
path: "hello"
781+
782+
# port sets the health check port.
783+
# It defaults to 8083 if health check is enabled and it is not set.
784+
port: 8083
785+
786+
# The name for the health check service port
787+
portName: ""
788+
789+
# annotations specifies annotations to be added Tyk Pump service.
790+
annotations: {}
791+
792+
# externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or
793+
# cluster-wide endpoints, while using LoadBalancer type of service.
794+
externalTrafficPolicy: Local
795+
782796
# containerPort represents the port where Tyk Pump serve the metrics, for instance metrics for Prometheus.
783797
# The default port is 9090.
784798
containerPort: 9090

0 commit comments

Comments
 (0)