Skip to content

Commit 66247d0

Browse files
authored
Merge pull request #756 from tobiasgiese/add-featuregates-readme
docs: add feature gates to our readme
2 parents 15a3f73 + edf9cab commit 66247d0

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

README.md

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -327,19 +327,37 @@ spec:
327327
node-role.kubernetes.io/worker: ""
328328
```
329329

330-
### Resource Injector Policy
330+
## Feature Gates
331331

332-
By default, the Resource injector webhook has a failed policy of ignored, this was implemented to not block pod creation
333-
in case the webhook is not available.
332+
Feature gates are used to enable or disable specific features in the operator.
334333

335-
with a feature introduced in Kubernetes 1.28(Beta) called [MatchConditions](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-matchconditions)
336-
we can move the webhook failed policy to be Fail. In this case the operator configured the Mutating webhook for the resource
337-
injector only on pods with the secondary network annotation of `k8s.v1.cni.cncf.io/networks`.
338-
It's possible to enable the feature with a FeatureGate via the SriovOperatorConfig object
334+
> **NOTE**: As features mature and graduate to stable status, default settings may change, and feature gates might be removed in future releases. Keep this in mind when configuring feature gates and ensure your environment is compatible with any updates.
339335

340-
> **NOTE**: the feature is disabled by default
336+
### Available Feature Gates
341337

342-
**Example**:
338+
1. **Parallel NIC Configuration** (`parallelNicConfig`)
339+
- **Description:** Allows the configuration of NICs in parallel, which can potentially reduce the time required for network setup.
340+
- **Default:** Disabled
341+
342+
2. **Resource Injector Match Condition** (`resourceInjectorMatchCondition`)
343+
- **Description:** Switches the resource injector's webhook failure policy from "Ignore" to "Fail" by utilizing the `MatchConditions` feature introduced in Kubernetes 1.28. This ensures the webhook only targets pods with the `k8s.v1.cni.cncf.io/networks` annotation, improving reliability without affecting other pods.
344+
- **Default:** Disabled
345+
346+
3. **Metrics Exporter** (`metricsExporter`)
347+
- **Description:** Enables the metrics exporter on the same node where the config-daemon is running. This helps in collecting and exporting metrics related to SR-IOV network devices.
348+
- **Default:** Disabled
349+
350+
4. **Manage Software Bridges** (`manageSoftwareBridges`)
351+
- **Description:** Allows the operator to manage software bridges. This feature gate is useful for environments where bridge management is required.
352+
- **Default:** Disabled
353+
354+
5. **Mellanox Firmware Reset** (`mellanoxFirmwareReset`)
355+
- **Description:** Enables the firmware reset via `mstfwreset` before a system reboot. This feature is specific to Mellanox network devices and is used to ensure that the firmware is properly reset during system maintenance.
356+
- **Default:** Disabled
357+
358+
### Enabling Feature Gates
359+
360+
To enable a feature gate, add it to your configuration file or command line with the desired state. For example, to enable the `resourceInjectorMatchCondition` feature gate, you would specify:
343361

344362
```yaml
345363
apiVersion: sriovnetwork.openshift.io/v1
@@ -348,7 +366,6 @@ metadata:
348366
name: default
349367
namespace: sriov-network-operator
350368
spec:
351-
...
352369
featureGates:
353370
resourceInjectorMatchCondition: true
354371
...

0 commit comments

Comments
 (0)