mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #25447 from nikhiljindal/verifyFedClientGen
Automatic merge from submit-queue Updating hack/update-codegen to keep federation_clientset updated Right now, there is no check for this and hence federation_clientset becomes stale over time. Updating hack/update-codegen to keep federation_clientset updated. hack/verify-codegen.sh ensures that it is updated. cc @caesarxuchao @lavalamp @jianhuiz @kubernetes/sig-cluster-federation
This commit is contained in:
commit
87d11300f0
@ -38,6 +38,9 @@ type Clientset struct {
|
||||
|
||||
// Federation retrieves the FederationClient
|
||||
func (c *Clientset) Federation() unversionedfederation.FederationInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.FederationClient
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[federation/] --input-base=k8s.io/kubernetes/federation/apis
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[../../federation/apis/federation/]
|
||||
|
||||
// This package has the automatically generated clientset.
|
||||
package federation_internalclientset
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[federation/] --input-base=k8s.io/kubernetes/federation/apis
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[../../federation/apis/federation/]
|
||||
|
||||
// This package has the automatically generated fake clientset.
|
||||
package fake
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[federation/] --input-base=k8s.io/kubernetes/federation/apis
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[../../federation/apis/federation/]
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package unversioned
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[federation/] --input-base=k8s.io/kubernetes/federation/apis
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[../../federation/apis/federation/]
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
unversioned "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
||||
@ -28,3 +29,9 @@ type FakeFederation struct {
|
||||
func (c *FakeFederation) Clusters() unversioned.ClusterInterface {
|
||||
return &FakeClusters{c}
|
||||
}
|
||||
|
||||
// GetRESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeFederation) GetRESTClient() *restclient.RESTClient {
|
||||
return nil
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
)
|
||||
|
||||
type FederationInterface interface {
|
||||
GetRESTClient() *restclient.RESTClient
|
||||
ClustersGetter
|
||||
}
|
||||
|
||||
@ -79,7 +80,8 @@ func setConfigDefaults(config *restclient.Config) error {
|
||||
config.GroupVersion = ©GroupVersion
|
||||
//}
|
||||
|
||||
config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion)
|
||||
config.NegotiatedSerializer = api.Codecs
|
||||
|
||||
if config.QPS == 0 {
|
||||
config.QPS = 5
|
||||
}
|
||||
@ -88,3 +90,12 @@ func setConfigDefaults(config *restclient.Config) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetRESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FederationClient) GetRESTClient() *restclient.RESTClient {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.RESTClient
|
||||
}
|
||||
|
@ -38,6 +38,9 @@ type Clientset struct {
|
||||
|
||||
// Federation retrieves the FederationClient
|
||||
func (c *Clientset) Federation() v1alpha1federation.FederationInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.FederationClient
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[federation/v1alpha1] --input-base=k8s.io/kubernetes/federation/apis
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[../../federation/apis/federation/v1alpha1]
|
||||
|
||||
// This package has the automatically generated clientset.
|
||||
package federation_release_1_3
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[federation/v1alpha1] --input-base=k8s.io/kubernetes/federation/apis
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[../../federation/apis/federation/v1alpha1]
|
||||
|
||||
// This package has the automatically generated fake clientset.
|
||||
package fake
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[federation/v1alpha1] --input-base=k8s.io/kubernetes/federation/apis
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[../../federation/apis/federation/v1alpha1]
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1alpha1
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[federation/v1alpha1] --input-base=k8s.io/kubernetes/federation/apis
|
||||
// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input=[../../federation/apis/federation/v1alpha1]
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
v1alpha1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
||||
@ -28,3 +29,9 @@ type FakeFederation struct {
|
||||
func (c *FakeFederation) Clusters() v1alpha1.ClusterInterface {
|
||||
return &FakeClusters{c}
|
||||
}
|
||||
|
||||
// GetRESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeFederation) GetRESTClient() *restclient.RESTClient {
|
||||
return nil
|
||||
}
|
||||
|
@ -17,13 +17,13 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
registered "k8s.io/kubernetes/pkg/apimachinery/registered"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
type FederationInterface interface {
|
||||
GetRESTClient() *restclient.RESTClient
|
||||
ClustersGetter
|
||||
}
|
||||
|
||||
@ -80,11 +80,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
||||
config.GroupVersion = ©GroupVersion
|
||||
//}
|
||||
|
||||
codec, ok := api.Codecs.SerializerForFileExtension("json")
|
||||
if !ok {
|
||||
return fmt.Errorf("unable to find serializer for JSON")
|
||||
}
|
||||
config.Codec = codec
|
||||
config.NegotiatedSerializer = api.Codecs
|
||||
|
||||
if config.QPS == 0 {
|
||||
config.QPS = 5
|
||||
@ -94,3 +90,12 @@ func setConfigDefaults(config *restclient.Config) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetRESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FederationClient) GetRESTClient() *restclient.RESTClient {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.RESTClient
|
||||
}
|
||||
|
@ -43,6 +43,11 @@ setgen=$(kube::util::find-binary "set-gen")
|
||||
# update- and verify- scripts.
|
||||
${clientgen} "$@"
|
||||
${clientgen} -t "$@"
|
||||
|
||||
# Clientgen for federation clientset.
|
||||
${clientgen} --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input="../../federation/apis/federation/" "$@"
|
||||
${clientgen} --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input="../../federation/apis/federation/v1alpha1" "$@"
|
||||
|
||||
${conversiongen} "$@"
|
||||
${deepcopygen} "$@"
|
||||
${setgen} "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user