Commit 35c0143
committed
desiredIstio: Enable GIE if InferencePool found
Configure the Istio control-plane to enable Gateway API Inference
Extension (GIE) if the InferencePool CRD from GIE exists on the cluster.
Conditionally set one new environment variable in the Istio CR:
ENABLE_GATEWAY_API_INFERENCE_EXTENSION
This commit resolves NE-2104.
https://issues.redhat.com/browse/NE-2104
* pkg/operator/controller/gatewayclass/controller.go
(inferencepoolCrdName, inferencepoolExperimentalCrdName): New consts.
(NewUnmanaged): Watch customresourcedefinitions, with a predicate on the
InferencePool CRD, in order to reconcile the Istio CR when the
InferencePool CRD is created or deleted.
* pkg/operator/controller/gatewayclass/istio.go (ensureIstio): Use the
new inferencepoolCrdExists helper to check whether the InferencePool CRD
exists, and pass a flag to desiredIstio when the CRD is present.
(inferencepoolCrdExists): New helper. Using the new crdExists helper,
check whether the InferencePool CRD exists in the
inference.networking.k8s.io or inference.networking.x-k8s.io API groups.
(crdExists): New helper.
(desiredIstio): Add a Boolean parameter, and set the environment
variable when the argument is true.1 parent 4f1ed7f commit 35c0143
2 files changed
+66
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
34 | 42 | | |
35 | 43 | | |
36 | 44 | | |
| |||
92 | 100 | | |
93 | 101 | | |
94 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
95 | 117 | | |
96 | 118 | | |
97 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
| |||
56 | 63 | | |
57 | 64 | | |
58 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
59 | 98 | | |
60 | | - | |
| 99 | + | |
61 | 100 | | |
62 | 101 | | |
63 | 102 | | |
| |||
106 | 145 | | |
107 | 146 | | |
108 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
109 | 151 | | |
110 | 152 | | |
111 | 153 | | |
| |||
0 commit comments