1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-31 04:04:51 +00:00

Merge pull request #1415 from AhmedGrati/feat-add-parameters-to-diable-master-and-worker

feat: add parameters in helm to disable/enable nfd-master and nfd-worker
This commit is contained in:
Kubernetes Prow Robot 2023-10-11 22:31:56 +02:00 committed by GitHub
commit 6424f19692
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 23 additions and 8 deletions

View file

@ -1,4 +1,5 @@
{{- if .Values.tls.certManager }} {{- if .Values.tls.certManager }}
{{- if .Values.master.enable }}
--- ---
apiVersion: cert-manager.io/v1 apiVersion: cert-manager.io/v1
kind: Certificate kind: Certificate
@ -21,8 +22,9 @@ spec:
name: nfd-ca-issuer name: nfd-ca-issuer
kind: Issuer kind: Issuer
group: cert-manager.io group: cert-manager.io
{{- end }}
--- ---
{{- if .Values.worker.enable }}
apiVersion: cert-manager.io/v1 apiVersion: cert-manager.io/v1
kind: Certificate kind: Certificate
metadata: metadata:
@ -40,6 +42,7 @@ spec:
name: nfd-ca-issuer name: nfd-ca-issuer
kind: Issuer kind: Issuer
group: cert-manager.io group: cert-manager.io
{{- end }}
{{- if .Values.topologyUpdater.enable }} {{- if .Values.topologyUpdater.enable }}
--- ---

View file

@ -1,4 +1,4 @@
{{- if .Values.master.rbac.create }} {{- if and .Values.master.enable .Values.master.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole kind: ClusterRole
metadata: metadata:

View file

@ -1,4 +1,4 @@
{{- if .Values.master.rbac.create }} {{- if and .Values.master.enable .Values.master.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding kind: ClusterRoleBinding
metadata: metadata:

View file

@ -1,3 +1,4 @@
{{- if .Values.master.enable }}
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@ -141,3 +142,4 @@ spec:
tolerations: tolerations:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- end }}

View file

@ -1,3 +1,4 @@
{{- if .Values.master.enable }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@ -8,3 +9,4 @@ metadata:
data: data:
nfd-master.conf: |- nfd-master.conf: |-
{{- .Values.master.config | toYaml | nindent 4 }} {{- .Values.master.config | toYaml | nindent 4 }}
{{- end }}

View file

@ -1,3 +1,4 @@
{{- if .Values.worker.enable }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@ -8,3 +9,4 @@ metadata:
data: data:
nfd-worker.conf: |- nfd-worker.conf: |-
{{- .Values.worker.config | toYaml | nindent 4 }} {{- .Values.worker.config | toYaml | nindent 4 }}
{{- end }}

View file

@ -1,4 +1,4 @@
{{- if .Values.worker.rbac.create }} {{- if and .Values.worker.enable .Values.worker.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:

View file

@ -1,4 +1,4 @@
{{- if .Values.worker.rbac.create }} {{- if and .Values.worker.enable .Values.worker.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
metadata: metadata:

View file

@ -1,4 +1,4 @@
{{- if not .Values.enableNodeFeatureApi }} {{- if and (not .Values.enableNodeFeatureApi) .Values.master.enable }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:

View file

@ -1,4 +1,4 @@
{{- if .Values.master.serviceAccount.create -}} {{- if and .Values.master.enable .Values.master.serviceAccount.create }}
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
@ -42,7 +42,7 @@ metadata:
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Values.worker.serviceAccount.create }} {{- if and .Values.worker.enable .Values.worker.serviceAccount.create }}
--- ---
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount

View file

@ -1,3 +1,4 @@
{{- if .Values.worker.enable }}
apiVersion: apps/v1 apiVersion: apps/v1
kind: DaemonSet kind: DaemonSet
metadata: metadata:
@ -150,3 +151,4 @@ spec:
{{- with .Values.worker.priorityClassName }} {{- with .Values.worker.priorityClassName }}
priorityClassName: {{ . | quote }} priorityClassName: {{ . | quote }}
{{- end }} {{- end }}
{{- end }}

View file

@ -13,6 +13,7 @@ namespaceOverride: ""
enableNodeFeatureApi: true enableNodeFeatureApi: true
master: master:
enable: true
config: ### <NFD-MASTER-CONF-START-DO-NOT-REMOVE> config: ### <NFD-MASTER-CONF-START-DO-NOT-REMOVE>
# noPublish: false # noPublish: false
# extraLabelNs: ["added.ns.io","added.kubernets.io"] # extraLabelNs: ["added.ns.io","added.kubernets.io"]
@ -132,6 +133,7 @@ master:
values: [""] values: [""]
worker: worker:
enable: true
config: ### <NFD-WORKER-CONF-START-DO-NOT-REMOVE> config: ### <NFD-WORKER-CONF-START-DO-NOT-REMOVE>
#core: #core:
# labelWhiteList: # labelWhiteList:

View file

@ -114,6 +114,7 @@ API's you need to install the prometheus operator in your cluster.
| Name | Type | Default | description | | Name | Type | Default | description |
|-----------------------------|---------|-----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------| |-----------------------------|---------|-----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
| `master.*` | dict | | NFD master deployment configuration | | `master.*` | dict | | NFD master deployment configuration |
| `master.enable` | bool | true | Specifies whether nfd-master should be deployed |
| `master.port` | integer | | Specifies the TCP port that nfd-master listens for incoming requests. **NOTE**: this parameter is related to the deprecated gRPC API and will be removed with it in a future release | | `master.port` | integer | | Specifies the TCP port that nfd-master listens for incoming requests. **NOTE**: this parameter is related to the deprecated gRPC API and will be removed with it in a future release |
| `master.metricsPort` | integer | 8081 | Port on which to expose metrics from components to prometheus operator | | `master.metricsPort` | integer | 8081 | Port on which to expose metrics from components to prometheus operator |
| `master.instance` | string | | Instance name. Used to separate annotation namespaces for multiple parallel deployments | | `master.instance` | string | | Instance name. Used to separate annotation namespaces for multiple parallel deployments |
@ -146,6 +147,7 @@ API's you need to install the prometheus operator in your cluster.
| Name | Type | Default | description | | Name | Type | Default | description |
| ---- | ---- | ------- | ----------- | | ---- | ---- | ------- | ----------- |
| `worker.*` | dict | | NFD worker daemonset configuration | | `worker.*` | dict | | NFD worker daemonset configuration |
| `worker.enable` | bool | true | Specifies whether nfd-worker should be deployed |
| `worker.metricsPort*` | integer | 8081 | Port on which to expose metrics from components to prometheus operator | | `worker.metricsPort*` | integer | 8081 | Port on which to expose metrics from components to prometheus operator |
| `worker.config` | dict | | NFD worker [configuration](../reference/worker-configuration-reference) | | `worker.config` | dict | | NFD worker [configuration](../reference/worker-configuration-reference) |
| `worker.podSecurityContext` | dict | {} | [PodSecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) holds pod-level security attributes and common container settings | | `worker.podSecurityContext` | dict | {} | [PodSecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) holds pod-level security attributes and common container settings |