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
				
			
		
							
								
								
									
										105
									
								
								charts/apps/piped/templates/ytproxy/lib/_pod.tpl
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										105
									
								
								charts/apps/piped/templates/ytproxy/lib/_pod.tpl
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,105 @@ | |||
| {{- /* | ||||
| The pod definition included in the controller. | ||||
| */ -}} | ||||
| {{- define "ytproxy.controller.pod" -}} | ||||
|   {{- with .Values.imagePullSecrets }} | ||||
| imagePullSecrets: | ||||
|     {{- toYaml . | nindent 2 }} | ||||
|   {{- end }} | ||||
| serviceAccountName: {{ include "ytproxy.names.serviceAccountName" . }} | ||||
| automountServiceAccountToken: {{ .Values.automountServiceAccountToken }} | ||||
|   {{- with .Values.podSecurityContext }} | ||||
| securityContext: | ||||
|     {{- toYaml . | nindent 2 }} | ||||
|   {{- end }} | ||||
|   {{- with .Values.priorityClassName }} | ||||
| priorityClassName: {{ . }} | ||||
|   {{- end }} | ||||
|   {{- with .Values.runtimeClassName }} | ||||
| runtimeClassName: {{ . }} | ||||
|   {{- end }} | ||||
|   {{- with .Values.schedulerName }} | ||||
| schedulerName: {{ . }} | ||||
|   {{- end }} | ||||
|   {{- with .Values.hostNetwork }} | ||||
| hostNetwork: {{ . }} | ||||
|   {{- end }} | ||||
|   {{- with .Values.hostname }} | ||||
| hostname: {{ . }} | ||||
|   {{- end }} | ||||
|   {{- if .Values.dnsPolicy }} | ||||
| dnsPolicy: {{ .Values.dnsPolicy }} | ||||
|   {{- else if .Values.hostNetwork }} | ||||
| dnsPolicy: ClusterFirstWithHostNet | ||||
|   {{- else }} | ||||
| dnsPolicy: ClusterFirst | ||||
|   {{- end }} | ||||
|   {{- with .Values.dnsConfig }} | ||||
| dnsConfig: | ||||
|     {{- toYaml . | nindent 2 }} | ||||
|   {{- end }} | ||||
| enableServiceLinks: {{ .Values.enableServiceLinks }} | ||||
|   {{- with .Values.termination.gracePeriodSeconds }} | ||||
| terminationGracePeriodSeconds: {{ . }} | ||||
|   {{- end }} | ||||
|   {{- if .Values.initContainers }} | ||||
| initContainers: | ||||
|     {{- $initContainers := list }} | ||||
|     {{- range $index, $key := (keys .Values.initContainers | uniq | sortAlpha) }} | ||||
|       {{- $container := get $.Values.initContainers $key }} | ||||
|       {{- if not $container.name -}} | ||||
|         {{- $_ := set $container "name" $key }} | ||||
|       {{- end }} | ||||
|       {{- if $container.env -}} | ||||
|         {{- $_ := set $ "ObjectValues" (dict "env" $container.env) -}} | ||||
|         {{- $newEnv := fromYaml (include "common.controller.env_vars" $) -}} | ||||
|         {{- $_ := unset $.ObjectValues "env" -}} | ||||
|         {{- $_ := set $container "env" $newEnv.env }} | ||||
|       {{- end }} | ||||
|       {{- $initContainers = append $initContainers $container }} | ||||
|     {{- end }} | ||||
|     {{- tpl (toYaml $initContainers) $ | nindent 2 }} | ||||
|   {{- end }} | ||||
| containers: | ||||
|   {{- include "ytproxy.controller.mainContainer" . | nindent 2 }} | ||||
|   {{- with .Values.additionalContainers }} | ||||
|     {{- $additionalContainers := list }} | ||||
|     {{- range $name, $container := . }} | ||||
|       {{- if not $container.name -}} | ||||
|         {{- $_ := set $container "name" $name }} | ||||
|       {{- end }} | ||||
|       {{- if $container.env -}} | ||||
|         {{- $_ := set $ "ObjectValues" (dict "env" $container.env) -}} | ||||
|         {{- $newEnv := fromYaml (include "ytproxy.controller.env_vars" $) -}} | ||||
|         {{- $_ := set $container "env" $newEnv.env }} | ||||
|         {{- $_ := unset $.ObjectValues "env" -}} | ||||
|       {{- end }} | ||||
|       {{- $additionalContainers = append $additionalContainers $container }} | ||||
|     {{- end }} | ||||
|     {{- tpl (toYaml $additionalContainers) $ | nindent 2 }} | ||||
|   {{- end }} | ||||
|   {{- with (include "ytproxy.controller.volumes" . | trim) }} | ||||
| volumes: | ||||
|     {{- nindent 2 . }} | ||||
|   {{- end }} | ||||
|   {{- with .Values.hostAliases }} | ||||
| hostAliases: | ||||
|     {{- toYaml . | nindent 2 }} | ||||
|   {{- end }} | ||||
|   {{- with .Values.nodeSelector }} | ||||
| nodeSelector: | ||||
|     {{- toYaml . | nindent 2 }} | ||||
|   {{- end }} | ||||
|   {{- with .Values.affinity }} | ||||
| affinity: | ||||
|     {{- toYaml . | nindent 2 }} | ||||
|   {{- end }} | ||||
|   {{- with .Values.topologySpreadConstraints }} | ||||
| topologySpreadConstraints: | ||||
|     {{- toYaml . | nindent 2 }} | ||||
|   {{- end }} | ||||
|   {{- with .Values.tolerations }} | ||||
| tolerations: | ||||
|     {{- toYaml . | nindent 2 }} | ||||
|     {{- end -}} | ||||
| {{- end -}} | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue