update
diff --git a/charts/virtual-machine/templates/service.yaml b/charts/virtual-machine/templates/service.yaml
index b79b385..9af7476 100644
--- a/charts/virtual-machine/templates/service.yaml
+++ b/charts/virtual-machine/templates/service.yaml
@@ -7,4 +7,9 @@
selector:
app: {{ .Values.name }}
ports:
- {{- toYaml .Values.servicePorts | nindent 4 }}
+ {{- range .Values.ports }}
+ - name: {{ .name }}
+ port: {{ .value }}
+ targetPort: {{ .name }}
+ protocol: {{ .protocol }}
+ {{- end }}
diff --git a/charts/virtual-machine/templates/vm.yaml b/charts/virtual-machine/templates/vm.yaml
index 40c4a34..eb01a0a 100644
--- a/charts/virtual-machine/templates/vm.yaml
+++ b/charts/virtual-machine/templates/vm.yaml
@@ -25,9 +25,11 @@
# masquerade: {}
bridge: {}
ports:
- {{- range .Values.ports }}
- - port: {{ . }}
- {{- end }}
+ {{- range .Values.ports }}
+ - name: {{ .name }}
+ containerPort: {{ .value }}
+ protocol: {{ .protocol }}
+ {{- end }}
disks:
- name: disk0
disk: