mirror of
https://github.com/truenas/charts.git
synced 2026-04-05 11:48:55 +08:00
Add port configuration to k8s pod
This commit is contained in:
@@ -48,3 +48,15 @@ livenessProbe:
|
||||
periodSeconds: {{ .Values.periodSeconds }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Container Ports
|
||||
*/}}
|
||||
{{- define "containerPorts" }}
|
||||
{{- if .Values.portForwardingList }}
|
||||
ports:
|
||||
{{- range $index, $config := .Values.portForwardingList }}
|
||||
- containerPort: {{ $config.containerPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -62,6 +62,7 @@ containers:
|
||||
{{- include "containerArgs" . | indent 2 }}
|
||||
{{- include "containerEnvVariables" . | indent 2 }}
|
||||
{{- include "containerLivenssProbe" . | indent 2 }}
|
||||
{{- include "containerPorts" . | indent 2 }}
|
||||
{{- include "volumeConfiguration" . }}
|
||||
{{- include "dnsConfiguration" . }}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{- include "ix-chart.fullname" . }}
|
||||
name: {{ include "ix-chart.fullname" . }}
|
||||
labels:
|
||||
{{- include "ix-chart.labels" . | nindent 4 }}
|
||||
spec:
|
||||
Reference in New Issue
Block a user