Skip to content

Commit e77ccfa

Browse files
committed
chore: update comments
1 parent e28b29f commit e77ccfa

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

distros/kubernetes/nvsentinel/charts/labeler/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ logLevel: info
2525
# will check BOTH this custom label AND the default 'katacontainers.io/kata-runtime' label as
2626
# input sources for detection. The labeler will then set the output label
2727
# 'nvsentinel.dgxc.nvidia.com/kata.enabled' to "true" or "false" based on the detection result.
28-
# Example: 'io.katacontainers.config.hypervisor.path' to detect Kata via additional label
28+
# Example: 'custom.kata.label' or 'io.katacontainers.config.runtime.oci_runtime'
2929
# Note: The input label value must be truthy (case-insensitive): "true", "enabled", "1", or "yes"
3030
kataLabelOverride: ""
3131

distros/kubernetes/nvsentinel/charts/syslog-health-monitor/templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ data:
2626
# Note: This ConfigMap is shared by both regular and kata DaemonSet variants.
2727
# Kata detection is handled by the labeler-module which sets the
2828
# "nvsentinel.dgxc.nvidia.com/kata.enabled" label on nodes. The DaemonSets
29-
# use nodeAffinity to deploy the correct variant based on this label.
29+
# use nodeSelector to deploy the correct variant based on this label.
3030
#
3131
# Previously, kata-specific journal tags (e.g., "-u containerd.service") were
3232
# conditionally added here, but these are no longer needed because:

labeler-module/pkg/labeler/labeler_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,8 @@ func TestLabeler_handlePodEvent(t *testing.T) {
559559
require.NoError(t, labeler.Run(ctx), "failed to run labeler")
560560
}()
561561

562-
ok := cache.WaitForCacheSync(ctx.Done(), labeler.informersSynced...)
563-
assert.True(t, ok, "failed to wait for cache sync")
562+
synced := cache.WaitForCacheSync(ctx.Done(), labeler.informersSynced...)
563+
assert.True(t, synced, "failed to wait for cache sync")
564564

565565
if tt.pod != nil {
566566
p, err := cli.CoreV1().Pods(ns.Name).Get(ctx, tt.pod.Name, metav1.GetOptions{})

tests/topology_test.go

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -160,24 +160,21 @@ func TestKataTopology(t *testing.T) {
160160

161161
// Verify the correct DaemonSet variant is scheduled based on kata.enabled
162162
nodeValidated := false
163+
expectedKataValue := kataEnabled
163164
for _, pod := range syslogPods {
164165
podKataLabel, hasPodLabel := pod.Labels["nvsentinel.dgxc.nvidia.com/kata"]
165-
if kataEnabled == "true" {
166-
assert.True(t, hasPodLabel, "Kata node %s has syslog pod without kata label", nodeName)
167-
assert.Equal(t, "true", podKataLabel, "Kata node %s has syslog pod with wrong kata label: %s", nodeName, podKataLabel)
168-
if !nodeValidated {
166+
assert.True(t, hasPodLabel, "Node %s has syslog pod without kata label", nodeName)
167+
assert.Equal(t, expectedKataValue, podKataLabel, "Node %s has syslog pod with wrong kata label: expected %s, got %s", nodeName, expectedKataValue, podKataLabel)
168+
169+
if !nodeValidated {
170+
if kataEnabled == "true" {
169171
kataNodes[nodeName] = true
170-
nodeValidated = true
171172
t.Logf("✓ Kata node %s correctly has kata syslog DaemonSet pod", nodeName)
172-
}
173-
} else {
174-
assert.True(t, hasPodLabel, "Regular node %s has syslog pod without kata label", nodeName)
175-
assert.Equal(t, "false", podKataLabel, "Regular node %s has syslog pod with wrong kata label: %s", nodeName, podKataLabel)
176-
if !nodeValidated {
173+
} else {
177174
regularNodes[nodeName] = true
178-
nodeValidated = true
179175
t.Logf("✓ Regular node %s correctly has regular syslog DaemonSet pod", nodeName)
180176
}
177+
nodeValidated = true
181178
}
182179
}
183180

0 commit comments

Comments
 (0)