mirror of
				https://github.com/TeamPiped/Piped-Kubernetes.git
				synced 2024-08-14 23:57:15 +00:00 
			
		
		
		
	Progress
This commit is contained in:
		
							parent
							
								
									73ac9b4437
								
							
						
					
					
						commit
						52ed0d9374
					
				
					 41 changed files with 2439 additions and 269 deletions
				
			
		
							
								
								
									
										33
									
								
								charts/apps/piped/templates/ytproxy/lib/_probes.tpl
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								charts/apps/piped/templates/ytproxy/lib/_probes.tpl
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,33 @@ | |||
| {{/* | ||||
| Probes selection logic. | ||||
| */}} | ||||
| {{- define "ytproxy.controller.probes" -}} | ||||
| {{- $primaryService := get .Values.backend.service (include "ytproxy.service.primary" .) -}} | ||||
| {{- $primaryPort := "" -}} | ||||
| {{- if $primaryService -}} | ||||
|   {{- $primaryPort = get $primaryService.ports (include "ytproxy.classes.service.ports.primary" (dict "serviceName" (include "ytproxy.service.primary" .) "values" $primaryService)) -}} | ||||
| {{- end -}} | ||||
| 
 | ||||
| {{- range $probeName, $probe := .Values.probes }} | ||||
|   {{- if $probe.enabled -}} | ||||
|     {{- "" | nindent 0 }} | ||||
|     {{- $probeName }}Probe: | ||||
|     {{- if $probe.custom -}} | ||||
|       {{- $probe.spec | toYaml | nindent 2 }} | ||||
|     {{- else }} | ||||
|       {{- if and $primaryService $primaryPort -}} | ||||
|         {{- "tcpSocket:" | nindent 2 }} | ||||
|           {{- if $primaryPort.targetPort }} | ||||
|             {{- printf "port: %v" $primaryPort.targetPort | nindent 4 }} | ||||
|           {{- else}} | ||||
|             {{- printf "port: %v" $primaryPort.port | nindent 4 }} | ||||
|           {{- end }} | ||||
|         {{- printf "initialDelaySeconds: %v" $probe.spec.initialDelaySeconds  | nindent 2 }} | ||||
|         {{- printf "failureThreshold: %v" $probe.spec.failureThreshold  | nindent 2 }} | ||||
|         {{- printf "timeoutSeconds: %v" $probe.spec.timeoutSeconds  | nindent 2 }} | ||||
|         {{- printf "periodSeconds: %v" $probe.spec.periodSeconds | nindent 2 }} | ||||
|       {{- end }} | ||||
|     {{- end }} | ||||
|   {{- end }} | ||||
| {{- end }} | ||||
| {{- end }} | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue