Skip to content

Commit 454b119

Browse files
committed
TELCODOCS#2104: Support for resourceInjectorMatchCondition feature
1 parent ec57779 commit 454b119

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

modules/nw-sriov-configuring-operator.adoc

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ include::snippets/technology-preview.adoc[]
108108
[id="about-network-resource-injector_{context}"]
109109
== About the Network Resources Injector
110110

111-
The Network Resources Injector is a Kubernetes Dynamic Admission Controller
112-
application. It provides the following capabilities:
111+
The Network Resources Injector is a Kubernetes Dynamic Admission Controller application, which provides the following capabilities:
113112

114113
* Mutation of resource requests and limits in a pod specification to add an SR-IOV resource name according to an SR-IOV network attachment definition annotation.
115114
* Mutation of a pod specification with a Downward API volume to expose pod annotations, labels, and huge pages requests and limits. Containers that run in the pod can access the exposed information as files under the `/etc/podnetinfo` path.
@@ -130,6 +129,29 @@ network-resources-injector-dwqpx 1/1 Running 0 10m
130129
network-resources-injector-lktz5 1/1 Running 0 10m
131130
----
132131

132+
By default, the `failurePolicy` field in the Network Resources Injector webhook is set to `Ignore`. This default setting prevents pod creation from being blocked if the webhook is unavailable.
133+
134+
If you set the `failurePolicy` field to `Fail`, and the Network Resources Injector webhook is unavailable, the webhook attempts to mutate all pod creation and update requests. This behavior can block pod creation and disrupt normal cluster operations. To prevent such issues, you can enable the `featureGates.resourceInjectorMatchCondition` feature in the `SriovOperatorConfig` object to limit the scope of the Network Resources Injector webhook. If this feature is enabled, the webhook applies only to pods with the secondary network annotation `k8s.v1.cni.cncf.io/networks`.
135+
136+
If you set the `failurePolicy` field to `Fail` after enabling the `resourceInjectorMatchCondition` feature, the webhook applies only to pods with the secondary network annotation `k8s.v1.cni.cncf.io/networks`. If the webhook is unavailable, pods without this annotation are still deployed, preventing unnecessary disruptions to cluster operations.
137+
138+
The `featureGates.resourceInjectorMatchCondition` feature is disabled by default. To enable this feature, set the `featureGates.resourceInjectorMatchCondition` field to `true` in the `SriovOperatorConfig` object.
139+
140+
.Example `SriovOperatorConfig` object configuration
141+
[source,yaml]
142+
----
143+
apiVersion: sriovnetwork.openshift.io/v1
144+
kind: SriovOperatorConfig
145+
metadata:
146+
name: default
147+
namespace: sriov-network-operator
148+
spec:
149+
# ...
150+
featureGates:
151+
resourceInjectorMatchCondition: true
152+
# ...
153+
----
154+
133155
[id="disable-enable-network-resource-injector_{context}"]
134156
== Disabling or enabling the Network Resources Injector
135157

0 commit comments

Comments
 (0)