Skip to content

Commit 6a1f576

Browse files
Merge pull request #271 from Mellanox/agent/agent-5c4d879d/flaky-tests-nic-operator
feat: implement flaky-tests-nic-operator
2 parents 0b52987 + 7425ca5 commit 6a1f576

14 files changed

+78
-171
lines changed

.github/workflows/build-test-lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
build:
55
strategy:
66
matrix:
7-
go-version: [1.24.x]
7+
go-version: [1.25.x]
88
goarch: [amd64]
99
os: [ubuntu-latest]
1010
runs-on: ${{ matrix.os }}
@@ -27,7 +27,7 @@ jobs:
2727
- name: Set up Go
2828
uses: actions/setup-go@v6
2929
with:
30-
go-version: 1.24.x
30+
go-version: 1.25.x
3131
- name: Check out code into the Go module directory
3232
uses: actions/checkout@v6
3333
- name: Lint
@@ -39,7 +39,7 @@ jobs:
3939
- name: Set up Go
4040
uses: actions/setup-go@v6
4141
with:
42-
go-version: 1.24.x
42+
go-version: 1.25.x
4343
- name: Check out code into the Go module directory
4444
uses: actions/checkout@v6
4545
- name: Run tests
@@ -67,7 +67,7 @@ jobs:
6767
- name: Set up Go
6868
uses: actions/setup-go@v6
6969
with:
70-
go-version: 1.24.x
70+
go-version: 1.25.x
7171
# if this fails, run go mod tidy
7272
- name: Check if module files are consistent with code
7373
run: go mod tidy && git diff --exit-code
@@ -82,7 +82,7 @@ jobs:
8282
- name: Set up Go
8383
uses: actions/setup-go@v6
8484
with:
85-
go-version: 1.24.x
85+
go-version: 1.25.x
8686
- name: Generate coverage report
8787
run: make test
8888
- name: Upload to Coveralls

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION)
206206

207207
## Tool Versions
208208
KUSTOMIZE_VERSION ?= v5.3.0
209-
CONTROLLER_TOOLS_VERSION ?= v0.14.0
209+
CONTROLLER_TOOLS_VERSION ?= v0.20.0
210210
ENVTEST_VERSION ?= release-0.19
211211
GOLANGCI_LINT_VERSION ?= v1.64.2
212212

config/crd/bases/configuration.net.nvidia.com_nicconfigurationtemplates.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.20.0
77
name: nicconfigurationtemplates.configuration.net.nvidia.com
88
spec:
99
group: configuration.net.nvidia.com
@@ -50,6 +50,7 @@ spec:
5050
pciAddresses:
5151
description: Array of PCI addresses to be selected, e.g. "0000:03:00.0"
5252
items:
53+
pattern: ^0000:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}\.[0-7]$
5354
type: string
5455
type: array
5556
serialNumbers:

config/crd/bases/configuration.net.nvidia.com_nicdevices.yaml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.20.0
77
name: nicdevices.configuration.net.nvidia.com
88
spec:
99
group: configuration.net.nvidia.com
@@ -272,9 +272,6 @@ spec:
272272
NIC belongs to based on the Template
273273
type: integer
274274
rdmaDevicePrefix:
275-
description: |-
276-
--- Parameters from the NicInterfaceNameTemplate CR ---
277-
RdmaDevicePrefix specifies the prefix for the rdma device name
278275
type: string
279276
required:
280277
- netDevicePrefix
@@ -290,16 +287,8 @@ spec:
290287
conditions:
291288
description: List of conditions observed for the device
292289
items:
293-
description: "Condition contains details for one aspect of the current
294-
state of this API Resource.\n---\nThis struct is intended for
295-
direct use as an array at the field path .status.conditions. For
296-
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
297-
observations of a foo's current state.\n\t // Known .status.conditions.type
298-
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
299-
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
300-
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
301-
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
302-
\ // other fields\n\t}"
290+
description: Condition contains details for one aspect of the current
291+
state of this API Resource.
303292
properties:
304293
lastTransitionTime:
305294
description: |-
@@ -340,12 +329,7 @@ spec:
340329
- Unknown
341330
type: string
342331
type:
343-
description: |-
344-
type of condition in CamelCase or in foo.example.com/CamelCase.
345-
---
346-
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
347-
useful (see .node.status.conditions), the ability to deconflict is important.
348-
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
332+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
349333
maxLength: 316
350334
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
351335
type: string

config/crd/bases/configuration.net.nvidia.com_nicfirmwaresources.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.20.0
77
name: nicfirmwaresources.configuration.net.nvidia.com
88
spec:
99
group: configuration.net.nvidia.com

config/crd/bases/configuration.net.nvidia.com_nicfirmwaretemplates.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.20.0
77
name: nicfirmwaretemplates.configuration.net.nvidia.com
88
spec:
99
group: configuration.net.nvidia.com
@@ -51,6 +51,7 @@ spec:
5151
pciAddresses:
5252
description: Array of PCI addresses to be selected, e.g. "0000:03:00.0"
5353
items:
54+
pattern: ^0000:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}\.[0-7]$
5455
type: string
5556
type: array
5657
serialNumbers:

config/crd/bases/configuration.net.nvidia.com_nicinterfacenametemplates.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.20.0
77
name: nicinterfacenametemplates.configuration.net.nvidia.com
88
spec:
99
group: configuration.net.nvidia.com

config/rbac/role.yaml

Lines changed: 7 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -42,84 +42,10 @@ rules:
4242
- configuration.net.nvidia.com
4343
resources:
4444
- nicconfigurationtemplates
45-
verbs:
46-
- create
47-
- delete
48-
- get
49-
- list
50-
- patch
51-
- update
52-
- watch
53-
- apiGroups:
54-
- configuration.net.nvidia.com
55-
resources:
56-
- nicconfigurationtemplates/finalizers
57-
verbs:
58-
- update
59-
- apiGroups:
60-
- configuration.net.nvidia.com
61-
resources:
62-
- nicconfigurationtemplates/status
63-
verbs:
64-
- get
65-
- patch
66-
- update
67-
- apiGroups:
68-
- configuration.net.nvidia.com
69-
resources:
7045
- nicdevices
71-
verbs:
72-
- create
73-
- delete
74-
- get
75-
- list
76-
- patch
77-
- update
78-
- watch
79-
- apiGroups:
80-
- configuration.net.nvidia.com
81-
resources:
82-
- nicdevices/finalizers
83-
verbs:
84-
- update
85-
- apiGroups:
86-
- configuration.net.nvidia.com
87-
resources:
88-
- nicdevices/status
89-
verbs:
90-
- get
91-
- patch
92-
- update
93-
- apiGroups:
94-
- configuration.net.nvidia.com
95-
resources:
9646
- nicfirmwaresources
97-
verbs:
98-
- create
99-
- delete
100-
- get
101-
- list
102-
- patch
103-
- update
104-
- watch
105-
- apiGroups:
106-
- configuration.net.nvidia.com
107-
resources:
108-
- nicfirmwaresources/finalizers
109-
verbs:
110-
- update
111-
- apiGroups:
112-
- configuration.net.nvidia.com
113-
resources:
114-
- nicfirmwaresources/status
115-
verbs:
116-
- get
117-
- patch
118-
- update
119-
- apiGroups:
120-
- configuration.net.nvidia.com
121-
resources:
12247
- nicfirmwaretemplates
48+
- nicinterfacenametemplates
12349
verbs:
12450
- create
12551
- delete
@@ -131,32 +57,19 @@ rules:
13157
- apiGroups:
13258
- configuration.net.nvidia.com
13359
resources:
60+
- nicconfigurationtemplates/finalizers
61+
- nicdevices/finalizers
62+
- nicfirmwaresources/finalizers
13463
- nicfirmwaretemplates/finalizers
13564
verbs:
13665
- update
13766
- apiGroups:
13867
- configuration.net.nvidia.com
13968
resources:
69+
- nicconfigurationtemplates/status
70+
- nicdevices/status
71+
- nicfirmwaresources/status
14072
- nicfirmwaretemplates/status
141-
verbs:
142-
- get
143-
- patch
144-
- update
145-
- apiGroups:
146-
- configuration.net.nvidia.com
147-
resources:
148-
- nicinterfacenametemplates
149-
verbs:
150-
- create
151-
- delete
152-
- get
153-
- list
154-
- patch
155-
- update
156-
- watch
157-
- apiGroups:
158-
- configuration.net.nvidia.com
159-
resources:
16073
- nicinterfacenametemplates/status
16174
verbs:
16275
- get

deployment/nic-configuration-operator-chart/crds/configuration.net.nvidia.com_nicconfigurationtemplates.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.20.0
77
name: nicconfigurationtemplates.configuration.net.nvidia.com
88
spec:
99
group: configuration.net.nvidia.com
@@ -50,6 +50,7 @@ spec:
5050
pciAddresses:
5151
description: Array of PCI addresses to be selected, e.g. "0000:03:00.0"
5252
items:
53+
pattern: ^0000:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}\.[0-7]$
5354
type: string
5455
type: array
5556
serialNumbers:

deployment/nic-configuration-operator-chart/crds/configuration.net.nvidia.com_nicdevices.yaml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.20.0
77
name: nicdevices.configuration.net.nvidia.com
88
spec:
99
group: configuration.net.nvidia.com
@@ -272,9 +272,6 @@ spec:
272272
NIC belongs to based on the Template
273273
type: integer
274274
rdmaDevicePrefix:
275-
description: |-
276-
--- Parameters from the NicInterfaceNameTemplate CR ---
277-
RdmaDevicePrefix specifies the prefix for the rdma device name
278275
type: string
279276
required:
280277
- netDevicePrefix
@@ -290,16 +287,8 @@ spec:
290287
conditions:
291288
description: List of conditions observed for the device
292289
items:
293-
description: "Condition contains details for one aspect of the current
294-
state of this API Resource.\n---\nThis struct is intended for
295-
direct use as an array at the field path .status.conditions. For
296-
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
297-
observations of a foo's current state.\n\t // Known .status.conditions.type
298-
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
299-
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
300-
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
301-
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
302-
\ // other fields\n\t}"
290+
description: Condition contains details for one aspect of the current
291+
state of this API Resource.
303292
properties:
304293
lastTransitionTime:
305294
description: |-
@@ -340,12 +329,7 @@ spec:
340329
- Unknown
341330
type: string
342331
type:
343-
description: |-
344-
type of condition in CamelCase or in foo.example.com/CamelCase.
345-
---
346-
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
347-
useful (see .node.status.conditions), the ability to deconflict is important.
348-
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
332+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
349333
maxLength: 316
350334
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
351335
type: string

0 commit comments

Comments
 (0)