@@ -184,6 +184,7 @@ func validateTLSSecurityProfileType(fieldPath *field.Path, profile *configv1.TLS
184
184
string (configv1 .TLSProfileOldType ),
185
185
string (configv1 .TLSProfileIntermediateType ),
186
186
string (configv1 .TLSProfileCustomType ),
187
+ string (configv1 .TLSProfileModernType ),
187
188
}
188
189
189
190
switch profile .Type {
@@ -200,7 +201,9 @@ func validateTLSSecurityProfileType(fieldPath *field.Path, profile *configv1.TLS
200
201
errs = append (errs , field .Required (fieldPath .Child ("intermediate" ), fmt .Sprintf (typeProfileMismatchFmt , profile .Type )))
201
202
}
202
203
case configv1 .TLSProfileModernType :
203
- errs = append (errs , field .NotSupported (fieldPath .Child ("type" ), profile .Type , availableTypes ))
204
+ if profile .Modern == nil {
205
+ errs = append (errs , field .Required (fieldPath .Child ("modern" ), fmt .Sprintf (typeProfileMismatchFmt , profile .Type )))
206
+ }
204
207
case configv1 .TLSProfileCustomType :
205
208
if profile .Custom == nil {
206
209
errs = append (errs , field .Required (fieldPath .Child ("custom" ), fmt .Sprintf (typeProfileMismatchFmt , profile .Type )))
@@ -247,10 +250,6 @@ func haveRequiredHTTP2CipherSuites(suites []string) bool {
247
250
func validateMinTLSVersion (fieldPath * field.Path , version configv1.TLSProtocolVersion ) field.ErrorList {
248
251
errs := field.ErrorList {}
249
252
250
- if version == configv1 .VersionTLS13 {
251
- return append (errs , field .NotSupported (fieldPath , version , []string {string (configv1 .VersionTLS10 ), string (configv1 .VersionTLS11 ), string (configv1 .VersionTLS12 )}))
252
- }
253
-
254
253
if _ , err := libgocrypto .TLSVersion (string (version )); err != nil {
255
254
errs = append (errs , field .Invalid (fieldPath , version , err .Error ()))
256
255
}
0 commit comments