mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-30 06:13:29 -02:30
Bump node-feature-discovery to v0.19.0 (#13512)
* chore(deps): bump node-feature-discovery to v0.19.0 Checked all intermediate releases (0.17.0, 0.18.0, 0.19.0) for breaking changes. v0.19.0's RBAC breaking change (nfd-topology-updater needs list+watch on pods) does not apply here: Kubespray does not deploy an nfd-topology-updater workload (only an unused ConfigMap template for it exists in this role). v0.19.0 also removed env/expandenv/getHostByName from NodeFeatureRule templates -- only affects user-authored custom NodeFeatureRule resources, not anything this role ships by default. * fix(nfd): add missing namespaces RBAC rule and fix nodefeaturegroups typo * fix(nfd): add missing delete verb to nfd-worker Role * chore(nfd): sync CRD manifest with upstream v0.19.0 * fix(nfd): drop removed gRPC-era flags/ports from nfd-master * fix(nfd): remove leftover crd-controller args block Previous commit added the new args but left the old -crd-controller and -metrics block in place instead of replacing it. * fix(nfd): drop removed gRPC-era flags from nfd-worker * chore(nfd): drop variables no longer read by any template * fix(nfd): align nfd-worker port naming and add health probes * fix(nfd): remove obsolete nfd-master Service * chore(nfd): register removed variables in validate_inventory * fix(nfd): clean up the obsolete Service manifest on disk * fix(nfd): add health probes and http port to nfd-gc * fix(nfd): align nfd-worker env and mounts with upstream
This commit is contained in:
@@ -139,7 +139,7 @@ Note:
|
||||
- [gcp-pd-csi-plugin](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver) 1.9.2
|
||||
- [local-path-provisioner](https://github.com/rancher/local-path-provisioner) 0.0.32
|
||||
- [local-volume-provisioner](https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner) 2.5.0
|
||||
- [node-feature-discovery](https://github.com/kubernetes-sigs/node-feature-discovery) 0.16.4
|
||||
- [node-feature-discovery](https://github.com/kubernetes-sigs/node-feature-discovery) 0.19.0
|
||||
|
||||
<!-- END ANSIBLE MANAGED BLOCK -->
|
||||
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
---
|
||||
node_feature_discovery_enabled: false
|
||||
node_feature_discovery_namespace: node-feature-discovery
|
||||
node_feature_discovery_enable_nodefeature_api: true
|
||||
node_feature_discovery_gc_replicas: 1
|
||||
node_feature_discovery_gc_interval: 1h
|
||||
node_feature_discovery_gc_sa_name: node-feature-discovery-gc
|
||||
node_feature_discovery_gc_sa_create: true
|
||||
node_feature_discovery_master_replicas: 1
|
||||
node_feature_discovery_master_crd_controller: null
|
||||
node_feature_discovery_master_instance: null
|
||||
node_feature_discovery_master_config: null
|
||||
node_feature_discovery_worker_sa_name: node-feature-discovery-worker
|
||||
node_feature_discovery_worker_sa_create: true
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
- { name: nfd-gc, file: nfd-gc.yaml, type: deploy }
|
||||
- { name: nfd-master, file: nfd-master.yaml, type: deploy }
|
||||
- { name: nfd-worker, file: nfd-worker.yaml, type: ds }
|
||||
- { name: nfd-service, file: nfd-service.yaml, type: srv }
|
||||
|
||||
- name: Node Feature Discovery | Create manifests
|
||||
template:
|
||||
@@ -47,3 +46,22 @@
|
||||
with_items: "{{ node_feature_discovery_manifests.results }}"
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
|
||||
# TODO: remove after the 2.32.0 release
|
||||
- name: Node Feature Discovery | Remove obsolete master Service
|
||||
kube:
|
||||
name: node-feature-discovery-master
|
||||
kubectl: "{{ bin_dir }}/kubectl"
|
||||
resource: svc
|
||||
namespace: "{{ node_feature_discovery_namespace }}"
|
||||
state: absent
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
|
||||
# TODO: remove after the 2.32.0 release
|
||||
- name: Node Feature Discovery | Remove obsolete master Service manifest
|
||||
file:
|
||||
path: "{{ kube_config_dir }}/addons/node_feature_discovery/nfd-service.yaml"
|
||||
state: absent
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
|
||||
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: nodefeatures.nfd.k8s-sigs.io
|
||||
spec:
|
||||
group: nfd.k8s-sigs.io
|
||||
@@ -69,8 +69,9 @@ spec:
|
||||
properties:
|
||||
elements:
|
||||
additionalProperties:
|
||||
description: Nil is a dummy empty struct for protobuf
|
||||
compatibility
|
||||
description: |-
|
||||
Nil is a dummy empty struct for protobuf compatibility.
|
||||
NOTE: protobuf definitions have been removed but this is kept for API compatibility.
|
||||
type: object
|
||||
description: Individual features of the feature set.
|
||||
type: object
|
||||
@@ -124,7 +125,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: nodefeaturegroups.nfd.k8s-sigs.io
|
||||
spec:
|
||||
group: nfd.k8s-sigs.io
|
||||
@@ -203,11 +204,19 @@ spec:
|
||||
- Exists
|
||||
- DoesNotExist
|
||||
- Gt
|
||||
- Ge
|
||||
- Lt
|
||||
- Le
|
||||
- GtLt
|
||||
- GeLe
|
||||
- IsTrue
|
||||
- IsFalse
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
Type defines the value type for specific operators.
|
||||
The currently supported type is 'version' for Gt,Ge,Lt,Le,GtLt,GeLe operators.
|
||||
type: string
|
||||
value:
|
||||
description: |-
|
||||
Value is the list of values that the operand evaluates the input
|
||||
@@ -239,11 +248,19 @@ spec:
|
||||
- Exists
|
||||
- DoesNotExist
|
||||
- Gt
|
||||
- Ge
|
||||
- Lt
|
||||
- Le
|
||||
- GtLt
|
||||
- GeLe
|
||||
- IsTrue
|
||||
- IsFalse
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
Type defines the value type for specific operators.
|
||||
The currently supported type is 'version' for Gt,Ge,Lt,Le,GtLt,GeLe operators.
|
||||
type: string
|
||||
value:
|
||||
description: |-
|
||||
Value is the list of values that the operand evaluates the input
|
||||
@@ -294,11 +311,19 @@ spec:
|
||||
- Exists
|
||||
- DoesNotExist
|
||||
- Gt
|
||||
- Ge
|
||||
- Lt
|
||||
- Le
|
||||
- GtLt
|
||||
- GeLe
|
||||
- IsTrue
|
||||
- IsFalse
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
Type defines the value type for specific operators.
|
||||
The currently supported type is 'version' for Gt,Ge,Lt,Le,GtLt,GeLe operators.
|
||||
type: string
|
||||
value:
|
||||
description: |-
|
||||
Value is the list of values that the operand evaluates the input
|
||||
@@ -330,11 +355,19 @@ spec:
|
||||
- Exists
|
||||
- DoesNotExist
|
||||
- Gt
|
||||
- Ge
|
||||
- Lt
|
||||
- Le
|
||||
- GtLt
|
||||
- GeLe
|
||||
- IsTrue
|
||||
- IsFalse
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
Type defines the value type for specific operators.
|
||||
The currently supported type is 'version' for Gt,Ge,Lt,Le,GtLt,GeLe operators.
|
||||
type: string
|
||||
value:
|
||||
description: |-
|
||||
Value is the list of values that the operand evaluates the input
|
||||
@@ -355,6 +388,19 @@ spec:
|
||||
name:
|
||||
description: Name of the rule.
|
||||
type: string
|
||||
vars:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
Vars is the variables to store if the rule matches. Variables can be
|
||||
referenced from other rules enabling more complex rule hierarchies.
|
||||
type: object
|
||||
varsTemplate:
|
||||
description: |-
|
||||
VarsTemplate specifies a template to expand for dynamically generating
|
||||
multiple variables. Data (after template expansion) must be keys with an
|
||||
optional value (<key>[=<value>]) separated by newlines.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
@@ -395,7 +441,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: nodefeaturerules.nfd.k8s-sigs.io
|
||||
spec:
|
||||
group: nfd.k8s-sigs.io
|
||||
@@ -497,11 +543,19 @@ spec:
|
||||
- Exists
|
||||
- DoesNotExist
|
||||
- Gt
|
||||
- Ge
|
||||
- Lt
|
||||
- Le
|
||||
- GtLt
|
||||
- GeLe
|
||||
- IsTrue
|
||||
- IsFalse
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
Type defines the value type for specific operators.
|
||||
The currently supported type is 'version' for Gt,Ge,Lt,Le,GtLt,GeLe operators.
|
||||
type: string
|
||||
value:
|
||||
description: |-
|
||||
Value is the list of values that the operand evaluates the input
|
||||
@@ -533,11 +587,19 @@ spec:
|
||||
- Exists
|
||||
- DoesNotExist
|
||||
- Gt
|
||||
- Ge
|
||||
- Lt
|
||||
- Le
|
||||
- GtLt
|
||||
- GeLe
|
||||
- IsTrue
|
||||
- IsFalse
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
Type defines the value type for specific operators.
|
||||
The currently supported type is 'version' for Gt,Ge,Lt,Le,GtLt,GeLe operators.
|
||||
type: string
|
||||
value:
|
||||
description: |-
|
||||
Value is the list of values that the operand evaluates the input
|
||||
@@ -588,11 +650,19 @@ spec:
|
||||
- Exists
|
||||
- DoesNotExist
|
||||
- Gt
|
||||
- Ge
|
||||
- Lt
|
||||
- Le
|
||||
- GtLt
|
||||
- GeLe
|
||||
- IsTrue
|
||||
- IsFalse
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
Type defines the value type for specific operators.
|
||||
The currently supported type is 'version' for Gt,Ge,Lt,Le,GtLt,GeLe operators.
|
||||
type: string
|
||||
value:
|
||||
description: |-
|
||||
Value is the list of values that the operand evaluates the input
|
||||
@@ -624,11 +694,19 @@ spec:
|
||||
- Exists
|
||||
- DoesNotExist
|
||||
- Gt
|
||||
- Ge
|
||||
- Lt
|
||||
- Le
|
||||
- GtLt
|
||||
- GeLe
|
||||
- IsTrue
|
||||
- IsFalse
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
Type defines the value type for specific operators.
|
||||
The currently supported type is 'version' for Gt,Ge,Lt,Le,GtLt,GeLe operators.
|
||||
type: string
|
||||
value:
|
||||
description: |-
|
||||
Value is the list of values that the operand evaluates the input
|
||||
|
||||
@@ -3,6 +3,13 @@ kind: ClusterRole
|
||||
metadata:
|
||||
name: node-feature-discovery
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- namespaces
|
||||
verbs:
|
||||
- watch
|
||||
- list
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
@@ -26,7 +33,7 @@ rules:
|
||||
- apiGroups:
|
||||
- nfd.k8s-sigs.io
|
||||
resources:
|
||||
- nodefeaturegroup/status
|
||||
- nodefeaturegroups/status
|
||||
verbs:
|
||||
- patch
|
||||
- update
|
||||
|
||||
@@ -33,6 +33,19 @@ spec:
|
||||
- "nfd-gc"
|
||||
args:
|
||||
- "-gc-interval={{ node_feature_discovery_gc_interval }}"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
|
||||
@@ -33,21 +33,21 @@ spec:
|
||||
image: {{ node_feature_discovery_image_repo }}:{{ node_feature_discovery_image_tag }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
grpc:
|
||||
port: 8082
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
grpc:
|
||||
port: 8082
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
failureThreshold: 10
|
||||
ports:
|
||||
- containerPort: 8082
|
||||
name: grpc
|
||||
- containerPort: 8081
|
||||
name: metrics
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
env:
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
@@ -57,23 +57,9 @@ spec:
|
||||
- "nfd-master"
|
||||
args:
|
||||
- "-port=8080"
|
||||
{% if not node_feature_discovery_enable_nodefeature_api %}
|
||||
- "-enable-nodefeature-api=false"
|
||||
{% elif node_feature_discovery_master_replicas > 1 %}
|
||||
{% if node_feature_discovery_master_replicas > 1 %}
|
||||
- "-enable-leader-election"
|
||||
{% endif %}
|
||||
{% if node_feature_discovery_master_crd_controller != none %}
|
||||
- "-crd-controller={{ node_feature_discovery_master_crd_controller }}"
|
||||
{% else %}
|
||||
{% if node_feature_discovery_master_instance %}
|
||||
## By default, disable crd controller for other than the default instances
|
||||
- "-crd-controller=false"
|
||||
{% else %}
|
||||
## By default, disable crd controller for other than the default instances
|
||||
- "-crd-controller=true"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
- "-metrics=8081"
|
||||
volumeMounts:
|
||||
- name: nfd-master-conf
|
||||
mountPath: "/etc/kubernetes/node-feature-discovery"
|
||||
|
||||
@@ -12,6 +12,7 @@ rules:
|
||||
- create
|
||||
- get
|
||||
- update
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: node-feature-discovery-master
|
||||
namespace: {{ node_feature_discovery_namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: node-feature-discovery
|
||||
role: master
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 8080
|
||||
targetPort: grpc
|
||||
protocol: TCP
|
||||
name: grpc
|
||||
selector:
|
||||
app.kubernetes.io/name: node-feature-discovery
|
||||
role: master
|
||||
@@ -35,17 +35,32 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: POD_UID
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.uid
|
||||
command:
|
||||
- "nfd-worker"
|
||||
args:
|
||||
- "-server=node-feature-discovery-master:8080"
|
||||
{% if not node_feature_discovery_enable_nodefeature_api %}
|
||||
- "-enable-nodefeature-api=false"
|
||||
{% endif %}
|
||||
- "-metrics=8081"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
failureThreshold: 10
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 8081
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
volumeMounts:
|
||||
- name: host-boot
|
||||
mountPath: "/host-boot"
|
||||
@@ -56,15 +71,15 @@ spec:
|
||||
- name: host-sys
|
||||
mountPath: "/host-sys"
|
||||
readOnly: true
|
||||
- name: host-proc-swaps
|
||||
mountPath: "/host-proc/swaps"
|
||||
readOnly: true
|
||||
- name: host-usr-lib
|
||||
mountPath: "/host-usr/lib"
|
||||
readOnly: true
|
||||
- name: host-lib
|
||||
mountPath: "/host-lib"
|
||||
readOnly: true
|
||||
- name: source-d
|
||||
mountPath: "/etc/kubernetes/node-feature-discovery/source.d/"
|
||||
readOnly: true
|
||||
- name: features-d
|
||||
mountPath: "/etc/kubernetes/node-feature-discovery/features.d/"
|
||||
readOnly: true
|
||||
@@ -81,15 +96,15 @@ spec:
|
||||
- name: host-sys
|
||||
hostPath:
|
||||
path: "/sys"
|
||||
- name: host-proc-swaps
|
||||
hostPath:
|
||||
path: "/proc/swaps"
|
||||
- name: host-usr-lib
|
||||
hostPath:
|
||||
path: "/usr/lib"
|
||||
- name: host-lib
|
||||
hostPath:
|
||||
path: "/lib"
|
||||
- name: source-d
|
||||
hostPath:
|
||||
path: "/etc/kubernetes/node-feature-discovery/source.d/"
|
||||
- name: features-d
|
||||
hostPath:
|
||||
path: "/etc/kubernetes/node-feature-discovery/features.d/"
|
||||
|
||||
@@ -368,7 +368,7 @@ metallb_controller_image_repo: "{{ quay_image_repo }}/metallb/controller"
|
||||
metallb_version: 0.13.9
|
||||
metallb_image_tag: "v{{ metallb_version }}"
|
||||
|
||||
node_feature_discovery_version: 0.16.4
|
||||
node_feature_discovery_version: 0.19.0
|
||||
node_feature_discovery_image_repo: "{{ kube_image_repo }}/nfd/node-feature-discovery"
|
||||
node_feature_discovery_image_tag: "v{{ node_feature_discovery_version }}"
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
removed_vars:
|
||||
- kubelet_static_pod_path # 2.31.0
|
||||
- eviction_hard_control_plane # 2.31.0
|
||||
- node_feature_discovery_enable_nodefeature_api # 2.32.0
|
||||
- node_feature_discovery_master_crd_controller # 2.32.0
|
||||
- node_feature_discovery_master_instance # 2.32.0
|
||||
removed_vars_found: "{{ query('varnames', '^' + (removed_vars | join('|')) + '$') }}"
|
||||
assert:
|
||||
that: removed_vars_found | length == 0
|
||||
|
||||
Reference in New Issue
Block a user