Skip to content

Commit c6b52ef

Browse files
committed
UPSTREAM: <carry>: apiextensions-apiserver
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
1 parent 503185f commit c6b52ef

35 files changed

+1848
-1349
lines changed

staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go

Lines changed: 94 additions & 78 deletions
Large diffs are not rendered by default.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
Copyright 2022 The KCP Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package validation
18+
19+
import "k8s.io/apimachinery/pkg/util/sets"
20+
21+
var kubernetesAPIGroups = sets.NewString(
22+
"admissionregistration.k8s.io",
23+
"apps",
24+
"authentication.k8s.io",
25+
"authorization.k8s.io",
26+
"autoscaling",
27+
"batch",
28+
"certificates.k8s.io",
29+
"coordination.k8s.io",
30+
"discovery.k8s.io",
31+
"events.k8s.io",
32+
"extensions",
33+
"flowcontrol.apiserver.k8s.io",
34+
"imagepolicy.k8s.io",
35+
"policy",
36+
"rbac.authorization.k8s.io",
37+
"scheduling.k8s.io",
38+
"storage.k8s.io",
39+
"",
40+
)
41+
42+
func isKubernetesAPIGroup(group string) bool {
43+
return kubernetesAPIGroups.Has(group)
44+
}

0 commit comments

Comments
 (0)