k8snetworkplumbingwg / sriov-network-operator

Operator for provisioning and configuring SR-IOV CNI plugin and device plugin
Apache License 2.0
76 stars 104 forks source link

Use per node device plugin config hash #619

Open adrianchiris opened 5 months ago

adrianchiris commented 5 months ago

Today SriovNetworkNodeState.Spec.dpConfigVersion contains the (fnv)hash of device plugin config map data. that means that each time this config us updated, this hash willl change and trigger reconcile of config daemon.

Since this config map contains per-node device plugin configurations, it only makes sense to calculate hash for the specific node data instead of the entire thing thus preventing un-needed operations by sriov config daemon.

a non-existing sriov config map and an "empty" entry in the config map for the node should yield the same hash. since intially config map will not exist.

apiVersion: v1
data:
  worker-node-2: '{"resourceList":null}'
kind: ConfigMap
metadata:
  creationTimestamp: "2024-02-06T11:59:28Z"
  name: device-plugin-config
  namespace: sriov-network-operator
  resourceVersion: "9112888"
  uid: 59155454-a365-4c95-b2d5-bace3e06d01f
SchSeba commented 4 months ago

question here I never understand why we really need the dpConfigVersion can we drop that ?

SchSeba commented 3 months ago

This PR https://github.com/k8snetworkplumbingwg/sriov-network-operator/pull/669 should remove it