From 4a29e93d929812576eddcc6f0cdf6e3c4b8afd2f Mon Sep 17 00:00:00 2001 From: AhmedGrati Date: Thu, 26 Jan 2023 15:37:33 +0100 Subject: [PATCH] helm: make master port configurable Signed-off-by: AhmedGrati --- .../helm/node-feature-discovery/templates/master.yaml | 7 ++++--- .../helm/node-feature-discovery/templates/service.yaml | 2 +- deployment/helm/node-feature-discovery/values.yaml | 2 ++ docs/deployment/helm.md | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/deployment/helm/node-feature-discovery/templates/master.yaml b/deployment/helm/node-feature-discovery/templates/master.yaml index 26a326cb80..035b1f8d96 100644 --- a/deployment/helm/node-feature-discovery/templates/master.yaml +++ b/deployment/helm/node-feature-discovery/templates/master.yaml @@ -39,7 +39,7 @@ spec: exec: command: - "/usr/bin/grpc_health_probe" - - "-addr=:8080" + - "-addr=:{{ .Values.master.port | default "8080" }}" {{- if .Values.tls.enable }} - "-tls" - "-tls-ca-cert=/etc/kubernetes/node-feature-discovery/certs/ca.crt" @@ -52,7 +52,7 @@ spec: exec: command: - "/usr/bin/grpc_health_probe" - - "-addr=:8080" + - "-addr=:{{ .Values.master.port | default "8080" }}" {{- if .Values.tls.enable }} - "-tls" - "-tls-ca-cert=/etc/kubernetes/node-feature-discovery/certs/ca.crt" @@ -63,7 +63,7 @@ spec: periodSeconds: 10 failureThreshold: 10 ports: - - containerPort: 8080 + - containerPort: {{ .Values.master.port | default "8080" }} name: grpc env: - name: NODE_NAME @@ -78,6 +78,7 @@ spec: {{- if .Values.master.instance | empty | not }} - "--instance={{ .Values.master.instance }}" {{- end }} + - "-port={{ .Values.master.port | default "8080" }}" {{- if .Values.enableNodeFeatureApi }} - "-enable-nodefeature-api" {{- end }} diff --git a/deployment/helm/node-feature-discovery/templates/service.yaml b/deployment/helm/node-feature-discovery/templates/service.yaml index 6731ca43ae..0d4789818f 100644 --- a/deployment/helm/node-feature-discovery/templates/service.yaml +++ b/deployment/helm/node-feature-discovery/templates/service.yaml @@ -9,7 +9,7 @@ metadata: spec: type: {{ .Values.master.service.type }} ports: - - port: {{ .Values.master.service.port }} + - port: {{ .Values.master.service.port | default "8080" }} targetPort: grpc protocol: TCP name: grpc diff --git a/deployment/helm/node-feature-discovery/values.yaml b/deployment/helm/node-feature-discovery/values.yaml index c08254422b..b360001b2a 100644 --- a/deployment/helm/node-feature-discovery/values.yaml +++ b/deployment/helm/node-feature-discovery/values.yaml @@ -13,6 +13,8 @@ namespaceOverride: "" enableNodeFeatureApi: false master: + # The TCP port that nfd-master listens for incoming requests. Default: 8080 + port: 8080 instance: featureApi: extraLabelNs: [] diff --git a/docs/deployment/helm.md b/docs/deployment/helm.md index f618d76151..8720505a47 100644 --- a/docs/deployment/helm.md +++ b/docs/deployment/helm.md @@ -108,6 +108,7 @@ We have introduced the following Chart parameters. | Name | Type | Default | description | |-----------------------------|---------|-----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------| | `master.*` | dict | | NFD master deployment configuration | +| `master.port` | integer | | Specifies the TCP port that nfd-master listens for incoming requests. | | `master.instance` | string | | Instance name. Used to separate annotation namespaces for multiple parallel deployments | | `master.extraLabelNs` | array | [] | List of allowed extra label namespaces | | `master.resourceLabels` | array | [] | List of labels to be registered as extended resources |