Skip to content

Commit d754a3d

Browse files
authored
Merge branch 'kubernetes-sigs:master' into kvm
2 parents d6c54b3 + d6c3eb7 commit d754a3d

36 files changed

+291
-216
lines changed

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
curl -sfL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash -s -- --version v3.5.2
2828
2929
- name: Check out repo
30-
uses: actions/checkout@v5
30+
uses: actions/checkout@v6
3131
with:
3232
fetch-depth: 0
3333

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
version: 3.12.3
2424

2525
- name: Check out repo
26-
uses: actions/checkout@v5
26+
uses: actions/checkout@v6
2727
with:
2828
fetch-depth: 0
2929

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ BASE_IMAGE_MINIMAL ?= scratch
1616
# Use host networking because 'jekyll serve' is stupid enough to use the
1717
# same site url than the "host" it binds to. Thus, all the links will be
1818
# broken if we'd bind to 0.0.0.0
19-
RUBY_IMAGE_VERSION := 3.3
19+
RUBY_IMAGE_VERSION := 3.4
2020
TOOOLCHAIN_MODE ?= $(shell $(GO_CMD) env GOVERSION)+auto
2121
JEKYLL_ENV ?= development
2222
SITE_BUILD_CMD := $(CONTAINER_RUN_CMD) --rm -i -u "`id -u`:`id -g`" \

cmd/nfd/subcmd/compat/validate-node.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,16 @@ var (
4949
username string
5050
password string
5151
accessToken string
52+
53+
validateExample = `
54+
# Validate image compatibility
55+
nfd compat validate-node --image <image-url>`
5256
)
5357

5458
var validateNodeCmd = &cobra.Command{
55-
Use: "validate-node",
56-
Short: "Perform node validation based on its associated image compatibility artifact",
59+
Use: "validate-node",
60+
Short: "Perform node validation based on its associated image compatibility artifact",
61+
Example: validateExample,
5762
PreRunE: func(cmd *cobra.Command, args []string) error {
5863
var err error
5964

cmd/nfd/subcmd/export/features.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,20 @@ import (
2525
"sigs.k8s.io/node-feature-discovery/source"
2626
)
2727

28+
var (
29+
exportFeaturesExample = `
30+
# Export node features to stdout (prints to terminal)
31+
nfd export features
32+
33+
# Export node features to a file instead
34+
nfd export features --path /tmp/features.json`
35+
)
36+
2837
func NewExportCmd() *cobra.Command {
2938
cmd := &cobra.Command{
30-
Use: "features",
31-
Short: "Export features for given node",
39+
Use: "features",
40+
Short: "Export features for given node",
41+
Example: exportFeaturesExample,
3242
RunE: func(cmd *cobra.Command, args []string) error {
3343
sources := map[string]source.FeatureSource{}
3444
for k, v := range source.GetAllFeatureSources() {
@@ -59,7 +69,7 @@ func NewExportCmd() *cobra.Command {
5969
return err
6070
},
6171
}
62-
cmd.Flags().StringVar(&outputPath, "path", "", "export to this JSON path")
72+
cmd.Flags().StringVarP(&outputPath, "path", "p", "", "export to this JSON path")
6373
return cmd
6474
}
6575

cmd/nfd/subcmd/export/labels.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,20 @@ import (
3131
"sigs.k8s.io/node-feature-discovery/source"
3232
)
3333

34+
var (
35+
exportLabelsExample = `
36+
# Export node labels to stdout (prints to terminal)
37+
nfd export features
38+
39+
# Export node labels to a file instead
40+
nfd export features --path /tmp/labels.json`
41+
)
42+
3443
func NewLabelsCmd() *cobra.Command {
3544
cmd := &cobra.Command{
36-
Use: "labels",
37-
Short: "Export feature labels for given node",
45+
Use: "labels",
46+
Short: "Export feature labels for given node",
47+
Example: exportLabelsExample,
3848
RunE: func(cmd *cobra.Command, args []string) error {
3949

4050
// Determine enabled feature sources
@@ -93,7 +103,7 @@ func NewLabelsCmd() *cobra.Command {
93103
return err
94104
},
95105
}
96-
cmd.Flags().StringVar(&outputPath, "path", "", "export to this JSON path")
106+
cmd.Flags().StringVarP(&outputPath, "path", "p", "", "export to this JSON path")
97107
return cmd
98108
}
99109

cmd/nfd/subcmd/root.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ var RootCmd = &cobra.Command{
3535
func init() {
3636
RootCmd.AddCommand(compat.CompatCmd)
3737
RootCmd.AddCommand(export.ExportCmd)
38+
RootCmd.SilenceUsage = true
3839
}
3940

4041
// Execute adds all child commands to the root command and sets flags appropriately.

deployment/helm/node-feature-discovery/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ NFD.
201201
| master.podDisruptionBudget.minAvailable | int | `1` | Minimum number (or percentage) of pods that must be available after the eviction. |
202202
| master.podDisruptionBudget.unhealthyPodEvictionPolicy | string | `"AlwaysAllow"` | Policy to evict unhealthy pods when a PodDisruptionBudget is defined. |
203203
| master.annotations | object | `{}` | [Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations) to add to the nfd-master pods. |
204+
| master.labels | object | `{}` | [Labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) to add to the nfd-master pods. |
204205
| master.affinity | object | `{"nodeAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"preference":{"matchExpressions":[{"key":"node-role.kubernetes.io/control-plane","operator":"In","values":[""]}]},"weight":1}]}}` | [Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) for the nfd-master pods. |
205206
| master.startupProbe | object | | Startup probe configuration. [More information](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-startup-probes). |
206207
| master.startupProbe.initialDelaySeconds | int | `nil` | The number of seconds after the container has started before probe is initiated. |
@@ -255,6 +256,7 @@ NFD.
255256
| worker.nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) for the nfd-worker pods. |
256257
| worker.tolerations | list | `[]` | [Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for the nfd-worker pods. |
257258
| worker.annotations | object | `{}` | [Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations) to add to the nfd-worker pods. |
259+
| worker.labels | object | `{}` | [Labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) to add to the nfd-worker pods. |
258260
| worker.affinity | object | `{}` | [Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) for the nfd-worker pods. |
259261
| worker.priorityClassName | string | `nil` | The name of the PriorityClass to be used for the nfd-worker pods. |
260262
| worker.updateStrategy | object | `{}` | Update strategy for the nfd-worker DaemonSet. [More info](https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set) |
@@ -299,6 +301,7 @@ NFD.
299301
| topologyUpdater.nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) for the nfd-topology-updater pods. |
300302
| topologyUpdater.tolerations | list | `[]` | [Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for the nfd-topology-updater pods. |
301303
| topologyUpdater.annotations | object | `{}` | [Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations) to add to the nfd-topology-updater pods. |
304+
| topologyUpdater.labels | object | `{}` | [Labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) to add to the nfd-topology-updater pods. |
302305
| topologyUpdater.daemonsetAnnotations | object | `{}` | [Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations) to add to the nfd-topology-updater DaemonSet. |
303306
| topologyUpdater.affinity | object | `{}` | [Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) for the nfd-topology-updater pods. |
304307
| topologyUpdater.podSetFingerprint | bool | `true` | Enables compute and report of pod fingerprint in NRT objects. |
@@ -336,6 +339,7 @@ NFD.
336339
| gc.nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) for the nfd-gc pods. |
337340
| gc.tolerations | list | `[]` | [Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for the nfd-gc pods. |
338341
| gc.annotations | object | `{}` | [Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations) to add to the nfd-gc pods. |
342+
| gc.labels | object | `{}` | [Labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) to add to the nfd-gc pods. |
339343
| gc.deploymentAnnotations | object | `{}` | [Annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations) to add to the nfd-gc Deployment. |
340344
| gc.affinity | object | `{}` | [Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) for the nfd-gc pods. |
341345
| gc.podDisruptionBudget.enable | bool | `false` | Configure PodDisruptionBudget for the nfd-master Deployment. |

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ spec:
2222
metadata:
2323
labels:
2424
{{- include "node-feature-discovery.selectorLabels" . | nindent 8 }}
25+
{{- with .Values.master.labels }}
26+
{{- toYaml . | nindent 8 }}
27+
{{- end }}
2528
role: master
2629
annotations:
2730
checksum/config: {{ include (print $.Template.BasePath "/nfd-master-conf.yaml") . | sha256sum }}

deployment/helm/node-feature-discovery/templates/nfd-gc.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ spec:
2222
metadata:
2323
labels:
2424
{{- include "node-feature-discovery.selectorLabels" . | nindent 8 }}
25+
{{- with .Values.gc.labels }}
26+
{{- toYaml . | nindent 8 }}
27+
{{- end }}
2528
role: gc
2629
{{- with .Values.gc.annotations }}
2730
annotations:

0 commit comments

Comments
 (0)