@@ -165,16 +165,16 @@ func (wh *IngressControllerWebhook) authorized(request admissionctl.Request) adm
165
165
}
166
166
167
167
/* TODO:
168
+ * - Currently only 'classic' handled by this webhook, and 'hypershift' work may or may not follow once defined.
168
169
* - HypershiftEnabled is currently set to false/disabled.
169
170
* - Classic vs HCP could likely share some of the network funcions, but will need slightly
170
- * different logic for the different minimum CIDR sets required, as well as different
171
+ * different logic for the different minimum CIDR sets required, different
171
172
* permissions fetching the network config info from different
172
- * source (configmap) locations and config formats(?) .
173
+ * source (configmap) locations, and different parsing of config formats, etc. .
173
174
*/
174
175
// Only check for machine cidr in allowed ranges if creating or updating resource...
175
176
reqOp := request .AdmissionRequest .Operation
176
177
if reqOp == admissionv1 .Create || reqOp == admissionv1 .Update {
177
- //TODO: Will these need to iterate over more than just the default IngressController config?
178
178
if ic .ObjectMeta .Name == "default" && ic .ObjectMeta .Namespace == "openshift-ingress-operator" {
179
179
ret := wh .checkAllowsMachineCIDR (ic .Spec .EndpointPublishingStrategy .LoadBalancer .AllowedSourceRanges )
180
180
ret .UID = request .AdmissionRequest .UID
@@ -231,7 +231,7 @@ func (wh *IngressControllerWebhook) getClusterConfig() (*installer.InstallConfig
231
231
clusterConfig := & corev1.ConfigMap {}
232
232
err = kubeClient .Get (context .Background (), client.ObjectKey {Name : installConfigMap , Namespace : installConfigNamespace }, clusterConfig )
233
233
if err != nil {
234
- log .Error (err , "Failed to fetch configmap: 'cluster-config-v1 ' for cluster config" )
234
+ log .Error (err , fmt . Sprintf ( "Failed to fetch configmap: '%s ' for cluster config" , installConfigMap ) )
235
235
return nil , err
236
236
}
237
237
data , ok := clusterConfig .Data [installConfigKeyName ]
0 commit comments