refer values in other values in values.yml code example
Example: how to pass multiple ports in values.yaml of helm
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.project }}-svc
spec:
type: ClusterIP
ports:
- name: {{ .Values.project }}-web
port: {{ .Values.serviceweb.port }}
protocol: TCP
targetPort: {{ .Values.serviceweb.targetPort }}
- name: {{ .Values.project }}-tcp
port: {{ .Values.servicetcp.port }}
protocol: TCP
targetPort: {{ .Values.servicetcp.targetPort }}
selector:
app: {{ .Values.project }}-{{ .Values.environment }}