File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import (
23
23
"net/http"
24
24
"net/url"
25
25
"path"
26
+ "sort"
26
27
"strconv"
27
28
28
29
"k8s.io/api/admissionregistration/v1beta1"
@@ -237,6 +238,10 @@ func (s *Server) mutatingWHConfigs() (runtime.Object, error) {
237
238
mutatingWebhooks = append (mutatingWebhooks , * wh )
238
239
}
239
240
241
+ sort .Slice (mutatingWebhooks , func (i , j int ) bool {
242
+ return mutatingWebhooks [i ].Name < mutatingWebhooks [j ].Name
243
+ })
244
+
240
245
if len (mutatingWebhooks ) > 0 {
241
246
return & admissionregistration.MutatingWebhookConfiguration {
242
247
TypeMeta : metav1.TypeMeta {
@@ -268,6 +273,10 @@ func (s *Server) validatingWHConfigs() (runtime.Object, error) {
268
273
validatingWebhooks = append (validatingWebhooks , * wh )
269
274
}
270
275
276
+ sort .Slice (validatingWebhooks , func (i , j int ) bool {
277
+ return validatingWebhooks [i ].Name < validatingWebhooks [j ].Name
278
+ })
279
+
271
280
if len (validatingWebhooks ) > 0 {
272
281
return & admissionregistration.ValidatingWebhookConfiguration {
273
282
TypeMeta : metav1.TypeMeta {
You can’t perform that action at this time.
0 commit comments