Skip to content

Commit 242410d

Browse files
authored
Merge pull request #1910 from ArangoGutierrez/I/1546
Drop NFD gRPC API
2 parents c7e7877 + 0bd82cf commit 242410d

30 files changed

+51
-1499
lines changed

cmd/nfd-master/main.go

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,6 @@ func main() {
8080
args.Overrides.ResyncPeriod = overrides.ResyncPeriod
8181
case "nfd-api-parallelism":
8282
args.Overrides.NfdApiParallelism = overrides.NfdApiParallelism
83-
case "ca-file":
84-
klog.InfoS("-ca-file is deprecated, will be removed in a future release along with the deprecated gRPC API")
85-
case "cert-file":
86-
klog.InfoS("-cert-file is deprecated, will be removed in a future release along with the deprecated gRPC API")
87-
case "key-file":
88-
klog.InfoS("-key-file is deprecated, will be removed in a future release along with the deprecated gRPC API")
89-
case "port":
90-
klog.InfoS("-port is deprecated, will be removed in a future release along with the deprecated gRPC API")
91-
case "verify-node-name":
92-
klog.InfoS("-verify-node-name is deprecated, will be removed in a future release along with the deprecated gRPC API")
9383
}
9484
})
9585

@@ -122,39 +112,18 @@ func main() {
122112
func initFlags(flagset *flag.FlagSet) (*master.Args, *master.ConfigOverrideArgs) {
123113
args := &master.Args{}
124114

125-
flagset.StringVar(&args.CaFile, "ca-file", "",
126-
"Root certificate for verifying connections."+
127-
" DEPRECATED: will be removed in a future release along with the deprecated gRPC API.")
128-
flagset.StringVar(&args.CertFile, "cert-file", "",
129-
"Certificate used for authenticating connections."+
130-
" DEPRECATED: will be removed in a future release along with the deprecated gRPC API.")
131115
flagset.StringVar(&args.Instance, "instance", "",
132116
"Instance name. Used to separate annotation namespaces for multiple parallel deployments.")
133-
flagset.StringVar(&args.KeyFile, "key-file", "",
134-
"Private key matching -cert-file."+
135-
" DEPRECATED: will be removed in a future release along with the deprecated gRPC API.")
136117
flagset.StringVar(&args.ConfigFile, "config", "/etc/kubernetes/node-feature-discovery/nfd-master.conf",
137118
"Config file to use.")
138119
flagset.StringVar(&args.Kubeconfig, "kubeconfig", "",
139120
"Kubeconfig to use")
140-
flagset.BoolVar(&args.CrdController, "featurerules-controller", true,
141-
"Enable NFD CRD API controller. DEPRECATED: use -crd-controller instead")
142-
flagset.BoolVar(&args.CrdController, "crd-controller", true,
143-
"Enable NFD CRD API controller for processing NodeFeature and NodeFeatureRule objects."+
144-
" DEPRECATED: will be removed in a future release along with the deprecated gRPC API.")
145-
flagset.IntVar(&args.Port, "port", 8080,
146-
"Port on which to listen for gRPC connections."+
147-
" DEPRECATED: will be removed in a future release along with the deprecated gRPC API.")
148121
flagset.IntVar(&args.MetricsPort, "metrics", 8081,
149122
"Port on which to expose metrics.")
150123
flagset.IntVar(&args.GrpcHealthPort, "grpc-health", 8082,
151124
"Port on which to expose the grpc health endpoint.")
152125
flagset.BoolVar(&args.Prune, "prune", false,
153126
"Prune all NFD related attributes from all nodes of the cluster and exit.")
154-
flagset.BoolVar(&args.VerifyNodeName, "verify-node-name", false,
155-
"Verify worker node name against the worker's TLS certificate. "+
156-
"Only takes effect when TLS authentication has been enabled."+
157-
" DEPRECATED: will be removed in a future release along with the deprecated gRPC API.")
158127
flagset.StringVar(&args.Options, "options", "",
159128
"Specify config options from command line. Config options are specified "+
160129
"in the same format as in the config file (i.e. json or yaml). These options")

cmd/nfd-worker/main.go

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,6 @@ func main() {
5959
klog.InfoS("version not set! Set -ldflags \"-X sigs.k8s.io/node-feature-discovery/pkg/version.version=`git describe --tags --dirty --always`\" during build or run.")
6060
}
6161

62-
// Check deprecated flags
63-
flags.Visit(func(f *flag.Flag) {
64-
switch f.Name {
65-
case "ca-file":
66-
klog.InfoS("-ca-file is deprecated, will be removed in a future release along with the deprecated gRPC API")
67-
case "cert-file":
68-
klog.InfoS("-cert-file is deprecated, will be removed in a future release along with the deprecated gRPC API")
69-
case "key-file":
70-
klog.InfoS("-key-file is deprecated, will be removed in a future release along with the deprecated gRPC API")
71-
case "server":
72-
klog.InfoS("-server is deprecated, will be removed in a future release along with the deprecated gRPC API")
73-
case "server-name-override":
74-
klog.InfoS("-server-name-override is deprecated, will be removed in a future release along with the deprecated gRPC API")
75-
}
76-
})
77-
7862
// Plug klog into grpc logging infrastructure
7963
utils.ConfigureGrpcKlog()
8064

@@ -119,17 +103,8 @@ func parseArgs(flags *flag.FlagSet, osArgs ...string) *worker.Args {
119103
func initFlags(flagset *flag.FlagSet) (*worker.Args, *worker.ConfigOverrideArgs) {
120104
args := &worker.Args{}
121105

122-
flagset.StringVar(&args.CaFile, "ca-file", "",
123-
"Root certificate for verifying connections."+
124-
" DEPRECATED: will be removed in a future release along with the deprecated gRPC API.")
125-
flagset.StringVar(&args.CertFile, "cert-file", "",
126-
"Certificate used for authenticating connections."+
127-
" DEPRECATED: will be removed in a future release along with the deprecated gRPC API.")
128106
flagset.StringVar(&args.ConfigFile, "config", "/etc/kubernetes/node-feature-discovery/nfd-worker.conf",
129107
"Config file to use.")
130-
flagset.StringVar(&args.KeyFile, "key-file", "",
131-
"Private key matching -cert-file."+
132-
" DEPRECATED: will be removed in a future release along with the deprecated gRPC API.")
133108
flagset.StringVar(&args.Kubeconfig, "kubeconfig", "",
134109
"Kubeconfig to use")
135110
flagset.BoolVar(&args.Oneshot, "oneshot", false,
@@ -141,12 +116,6 @@ func initFlags(flagset *flag.FlagSet) (*worker.Args, *worker.ConfigOverrideArgs)
141116
flagset.StringVar(&args.Options, "options", "",
142117
"Specify config options from command line. Config options are specified "+
143118
"in the same format as in the config file (i.e. json or yaml). These options")
144-
flagset.StringVar(&args.Server, "server", "localhost:8080",
145-
"NFD server address to connecto to."+
146-
" DEPRECATED: will be removed in a future release along with the deprecated gRPC API.")
147-
flagset.StringVar(&args.ServerNameOverride, "server-name-override", "",
148-
"Hostname expected from server certificate, useful in testing."+
149-
" DEPRECATED: will be removed in a future release along with the deprecated gRPC API.")
150119

151120
args.Klog = klogutils.InitKlogFlags(flagset)
152121

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

Lines changed: 0 additions & 80 deletions
This file was deleted.

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

Lines changed: 0 additions & 42 deletions
This file was deleted.

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

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,7 @@ spec:
103103
{{- if .Values.master.instance | empty | not }}
104104
- "-instance={{ .Values.master.instance }}"
105105
{{- end }}
106-
{{- if not .Values.featureGates.NodeFeatureAPI }}
107-
- "-port={{ .Values.master.port | default "8080" }}"
108-
{{- else if gt (int .Values.master.replicaCount) 1 }}
109106
- "-enable-leader-election"
110-
{{- end }}
111107
{{- if .Values.master.extraLabelNs | empty | not }}
112108
- "-extra-label-ns={{- join "," .Values.master.extraLabelNs }}"
113109
{{- end }}
@@ -120,12 +116,6 @@ spec:
120116
{{- if .Values.master.enableTaints }}
121117
- "-enable-taints"
122118
{{- end }}
123-
{{- if .Values.master.crdController | kindIs "invalid" | not }}
124-
- "-crd-controller={{ .Values.master.crdController }}"
125-
{{- else }}
126-
## By default, disable crd controller for other than the default instances
127-
- "-crd-controller={{ .Values.master.instance | empty }}"
128-
{{- end }}
129119
{{- if .Values.master.featureRulesController | kindIs "invalid" | not }}
130120
- "-featurerules-controller={{ .Values.master.featureRulesController }}"
131121
{{- end }}
@@ -135,11 +125,6 @@ spec:
135125
{{- if .Values.master.nfdApiParallelism | empty | not }}
136126
- "-nfd-api-parallelism={{ .Values.master.nfdApiParallelism }}"
137127
{{- end }}
138-
{{- if .Values.tls.enable }}
139-
- "-ca-file=/etc/kubernetes/node-feature-discovery/certs/ca.crt"
140-
- "-key-file=/etc/kubernetes/node-feature-discovery/certs/tls.key"
141-
- "-cert-file=/etc/kubernetes/node-feature-discovery/certs/tls.crt"
142-
{{- end }}
143128
# Go over featureGates and add the feature-gate flag
144129
{{- range $key, $value := .Values.featureGates }}
145130
- "-feature-gates={{ $key }}={{ $value }}"
@@ -150,20 +135,10 @@ spec:
150135
{{- toYaml . | nindent 12 }}
151136
{{- end }}
152137
volumeMounts:
153-
{{- if .Values.tls.enable }}
154-
- name: nfd-master-cert
155-
mountPath: "/etc/kubernetes/node-feature-discovery/certs"
156-
readOnly: true
157-
{{- end }}
158138
- name: nfd-master-conf
159139
mountPath: "/etc/kubernetes/node-feature-discovery"
160140
readOnly: true
161141
volumes:
162-
{{- if .Values.tls.enable }}
163-
- name: nfd-master-cert
164-
secret:
165-
secretName: nfd-master-cert
166-
{{- end }}
167142
- name: nfd-master-conf
168143
configMap:
169144
name: {{ include "node-feature-discovery.fullname" . }}-master-conf

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,6 @@ spec:
103103
{{- else }}
104104
- "-watch-namespace=*"
105105
{{- end }}
106-
{{- if .Values.tls.enable }}
107-
- "-ca-file=/etc/kubernetes/node-feature-discovery/certs/ca.crt"
108-
- "-key-file=/etc/kubernetes/node-feature-discovery/certs/tls.key"
109-
- "-cert-file=/etc/kubernetes/node-feature-discovery/certs/tls.crt"
110-
{{- end }}
111106
{{- if not .Values.topologyUpdater.podSetFingerprint }}
112107
- "-pods-fingerprint=false"
113108
{{- end }}
@@ -142,11 +137,6 @@ spec:
142137
mountPath: /host-var/lib/kubelet
143138
readOnly: true
144139
{{- end }}
145-
{{- if .Values.tls.enable }}
146-
- name: nfd-topology-updater-cert
147-
mountPath: "/etc/kubernetes/node-feature-discovery/certs"
148-
readOnly: true
149-
{{- end }}
150140
- name: nfd-topology-updater-conf
151141
mountPath: "/etc/kubernetes/node-feature-discovery"
152142
readOnly: true
@@ -182,12 +172,6 @@ spec:
182172
items:
183173
- key: nfd-topology-updater.conf
184174
path: nfd-topology-updater.conf
185-
{{- if .Values.tls.enable }}
186-
- name: nfd-topology-updater-cert
187-
secret:
188-
secretName: nfd-topology-updater-cert
189-
{{- end }}
190-
191175

192176
{{- with .Values.topologyUpdater.nodeSelector }}
193177
nodeSelector:

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,6 @@ spec:
103103
{{- if not .Values.featureGates.NodeFeatureAPI }}
104104
- "-server={{ include "node-feature-discovery.fullname" . }}-master:{{ .Values.master.service.port }}"
105105
{{- end }}
106-
{{- if .Values.tls.enable }}
107-
- "-ca-file=/etc/kubernetes/node-feature-discovery/certs/ca.crt"
108-
- "-key-file=/etc/kubernetes/node-feature-discovery/certs/tls.key"
109-
- "-cert-file=/etc/kubernetes/node-feature-discovery/certs/tls.crt"
110-
{{- end }}
111106
# Go over featureGate and add the feature-gate flag
112107
{{- range $key, $value := .Values.featureGates }}
113108
- "-feature-gates={{ $key }}={{ $value }}"
@@ -155,11 +150,6 @@ spec:
155150
- name: nfd-worker-conf
156151
mountPath: "/etc/kubernetes/node-feature-discovery"
157152
readOnly: true
158-
{{- if .Values.tls.enable }}
159-
- name: nfd-worker-cert
160-
mountPath: "/etc/kubernetes/node-feature-discovery/certs"
161-
readOnly: true
162-
{{- end }}
163153
volumes:
164154
- name: host-boot
165155
hostPath:
@@ -196,11 +186,6 @@ spec:
196186
items:
197187
- key: nfd-worker.conf
198188
path: nfd-worker.conf
199-
{{- if .Values.tls.enable }}
200-
- name: nfd-worker-cert
201-
secret:
202-
secretName: nfd-worker-cert
203-
{{- end }}
204189
{{- with .Values.worker.nodeSelector }}
205190
nodeSelector:
206191
{{- toYaml . | nindent 8 }}

0 commit comments

Comments
 (0)