Skip to content

Commit 6424f19

Browse files
authored
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
2 parents a379faf + d27eb0a commit 6424f19

File tree

13 files changed

+23
-8
lines changed

13 files changed

+23
-8
lines changed

deployment/helm/node-feature-discovery/templates/cert-manager-certs.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{{- if .Values.tls.certManager }}
2+
{{- if .Values.master.enable }}
23
---
34
apiVersion: cert-manager.io/v1
45
kind: Certificate
@@ -21,8 +22,9 @@ spec:
2122
name: nfd-ca-issuer
2223
kind: Issuer
2324
group: cert-manager.io
24-
25+
{{- end }}
2526
---
27+
{{- if .Values.worker.enable }}
2628
apiVersion: cert-manager.io/v1
2729
kind: Certificate
2830
metadata:
@@ -40,6 +42,7 @@ spec:
4042
name: nfd-ca-issuer
4143
kind: Issuer
4244
group: cert-manager.io
45+
{{- end }}
4346

4447
{{- if .Values.topologyUpdater.enable }}
4548
---

deployment/helm/node-feature-discovery/templates/clusterrole.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.master.rbac.create }}
1+
{{- if and .Values.master.enable .Values.master.rbac.create }}
22
apiVersion: rbac.authorization.k8s.io/v1
33
kind: ClusterRole
44
metadata:

deployment/helm/node-feature-discovery/templates/clusterrolebinding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.master.rbac.create }}
1+
{{- if and .Values.master.enable .Values.master.rbac.create }}
22
apiVersion: rbac.authorization.k8s.io/v1
33
kind: ClusterRoleBinding
44
metadata:

deployment/helm/node-feature-discovery/templates/master.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.master.enable }}
12
apiVersion: apps/v1
23
kind: Deployment
34
metadata:
@@ -141,3 +142,4 @@ spec:
141142
tolerations:
142143
{{- toYaml . | nindent 8 }}
143144
{{- end }}
145+
{{- end }}

deployment/helm/node-feature-discovery/templates/nfd-master-conf.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.master.enable }}
12
apiVersion: v1
23
kind: ConfigMap
34
metadata:
@@ -8,3 +9,4 @@ metadata:
89
data:
910
nfd-master.conf: |-
1011
{{- .Values.master.config | toYaml | nindent 4 }}
12+
{{- end }}

deployment/helm/node-feature-discovery/templates/nfd-worker-conf.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.worker.enable }}
12
apiVersion: v1
23
kind: ConfigMap
34
metadata:
@@ -8,3 +9,4 @@ metadata:
89
data:
910
nfd-worker.conf: |-
1011
{{- .Values.worker.config | toYaml | nindent 4 }}
12+
{{- end }}

deployment/helm/node-feature-discovery/templates/role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.worker.rbac.create }}
1+
{{- if and .Values.worker.enable .Values.worker.rbac.create }}
22
apiVersion: rbac.authorization.k8s.io/v1
33
kind: Role
44
metadata:

deployment/helm/node-feature-discovery/templates/rolebinding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.worker.rbac.create }}
1+
{{- if and .Values.worker.enable .Values.worker.rbac.create }}
22
apiVersion: rbac.authorization.k8s.io/v1
33
kind: RoleBinding
44
metadata:

deployment/helm/node-feature-discovery/templates/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if not .Values.enableNodeFeatureApi }}
1+
{{- if and (not .Values.enableNodeFeatureApi) .Values.master.enable }}
22
apiVersion: v1
33
kind: Service
44
metadata:

deployment/helm/node-feature-discovery/templates/serviceaccount.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.master.serviceAccount.create -}}
1+
{{- if and .Values.master.enable .Values.master.serviceAccount.create }}
22
apiVersion: v1
33
kind: ServiceAccount
44
metadata:
@@ -42,7 +42,7 @@ metadata:
4242
{{- end }}
4343
{{- end }}
4444

45-
{{- if .Values.worker.serviceAccount.create }}
45+
{{- if and .Values.worker.enable .Values.worker.serviceAccount.create }}
4646
---
4747
apiVersion: v1
4848
kind: ServiceAccount

0 commit comments

Comments
 (0)