Skip to content

Commit ffc555a

Browse files
Skip OAuth proxy validation when it's disabled
1 parent a0edab0 commit ffc555a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pkg/controllers/raycluster_webhook.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,12 @@ func (w *rayClusterWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj r
104104
}
105105

106106
allErrors = append(allErrors, validateIngress(rayCluster)...)
107-
allErrors = append(allErrors, validateOAuthProxyContainer(rayCluster)...)
108-
allErrors = append(allErrors, validateOAuthProxyVolume(rayCluster)...)
109-
allErrors = append(allErrors, validateHeadGroupServiceAccountName(rayCluster)...)
107+
108+
if ptr.Deref(w.Config.RayDashboardOAuthEnabled, true) {
109+
allErrors = append(allErrors, validateOAuthProxyContainer(rayCluster)...)
110+
allErrors = append(allErrors, validateOAuthProxyVolume(rayCluster)...)
111+
allErrors = append(allErrors, validateHeadGroupServiceAccountName(rayCluster)...)
112+
}
110113

111114
return warnings, allErrors.ToAggregate()
112115
}

0 commit comments

Comments
 (0)