From 57fa377507ebd08f3319a6453836f38a8966e5e9 Mon Sep 17 00:00:00 2001 From: vampire-yuta Date: Thu, 31 Oct 2024 02:36:34 +0900 Subject: [PATCH] fix: add nodePort to service --- charts/cadvisor/templates/service.yaml | 5 ++++- charts/cadvisor/values.yaml | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/cadvisor/templates/service.yaml b/charts/cadvisor/templates/service.yaml index a68ce2f..b5e074c 100644 --- a/charts/cadvisor/templates/service.yaml +++ b/charts/cadvisor/templates/service.yaml @@ -14,6 +14,9 @@ spec: port: {{ .Values.container.port }} targetPort: {{ .Values.container.port }} protocol: TCP + {{- with .Values.service.nodePort }} + nodePort: {{ . }} + {{- end }} selector: app: {{ template "cadvisor.name" . }} - type: ClusterIP + type: {{ .Values.service.type }} diff --git a/charts/cadvisor/values.yaml b/charts/cadvisor/values.yaml index 57fe601..424cbd3 100644 --- a/charts/cadvisor/values.yaml +++ b/charts/cadvisor/values.yaml @@ -35,6 +35,10 @@ container: path: "/dev/disk" readOnly: true +service: + type: ClusterIP + nodePort: # If type is NodePort, specify the nodePort value. (30000-32767) + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little