Skip to content

Commit

Permalink
Merge pull request #122880 from Jefftree/agg-discovery-v2-types
Browse files Browse the repository at this point in the history
Add aggregated discovery v2 types
  • Loading branch information
k8s-ci-robot committed Feb 21, 2024
2 parents 5a21b23 + 1645667 commit 6049a1b
Show file tree
Hide file tree
Showing 17 changed files with 3,168 additions and 0 deletions.
1 change: 1 addition & 0 deletions hack/lib/init.sh
Expand Up @@ -135,6 +135,7 @@ KUBE_NONSERVER_GROUP_VERSIONS="
abac.authorization.kubernetes.io/v0 \
abac.authorization.kubernetes.io/v1beta1 \
apidiscovery.k8s.io/v2beta1 \
apidiscovery.k8s.io/v2 \
componentconfig/v1alpha1 \
imagepolicy.k8s.io/v1alpha1\
admission.k8s.io/v1\
Expand Down
24 changes: 24 additions & 0 deletions pkg/apis/apidiscovery/v2/doc.go
@@ -0,0 +1,24 @@
/*
Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apidiscovery
// +k8s:conversion-gen-external-types=k8s.io/api/apidiscovery/v2
// +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=k8s.io/api/apidiscovery/v2

// +groupName=apidiscovery.k8s.io

package v2 // import "k8s.io/kubernetes/pkg/apis/apidiscovery/v2"
39 changes: 39 additions & 0 deletions pkg/apis/apidiscovery/v2/register.go
@@ -0,0 +1,39 @@
/*
Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v2

import (
apidiscoveryv2 "k8s.io/api/apidiscovery/v2"
"k8s.io/apimachinery/pkg/runtime/schema"
)

// GroupName is the group name use in this package
const GroupName = "apidiscovery.k8s.io"

// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2"}

// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}

var (
localSchemeBuilder = &apidiscoveryv2.SchemeBuilder
// AddToScheme adds api to a scheme
AddToScheme = localSchemeBuilder.AddToScheme
)
220 changes: 220 additions & 0 deletions pkg/apis/apidiscovery/v2/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions pkg/apis/apidiscovery/v2/zz_generated.defaults.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6049a1b

Please sign in to comment.