mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +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
|
// Federation retrieves the FederationClient
|
||||||
func (c *Clientset) Federation() unversionedfederation.FederationInterface {
|
func (c *Clientset) Federation() unversionedfederation.FederationInterface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return c.FederationClient
|
return c.FederationClient
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
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.
|
// This package has the automatically generated clientset.
|
||||||
package federation_internalclientset
|
package federation_internalclientset
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
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.
|
// This package has the automatically generated fake clientset.
|
||||||
package fake
|
package fake
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
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.
|
// This package has the automatically generated typed clients.
|
||||||
package unversioned
|
package unversioned
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
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 has the automatically generated clients.
|
||||||
package fake
|
package fake
|
||||||
|
@ -18,6 +18,7 @@ package fake
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
unversioned "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned"
|
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"
|
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -28,3 +29,9 @@ type FakeFederation struct {
|
|||||||
func (c *FakeFederation) Clusters() unversioned.ClusterInterface {
|
func (c *FakeFederation) Clusters() unversioned.ClusterInterface {
|
||||||
return &FakeClusters{c}
|
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 {
|
type FederationInterface interface {
|
||||||
|
GetRESTClient() *restclient.RESTClient
|
||||||
ClustersGetter
|
ClustersGetter
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +80,8 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||||||
config.GroupVersion = ©GroupVersion
|
config.GroupVersion = ©GroupVersion
|
||||||
//}
|
//}
|
||||||
|
|
||||||
config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion)
|
config.NegotiatedSerializer = api.Codecs
|
||||||
|
|
||||||
if config.QPS == 0 {
|
if config.QPS == 0 {
|
||||||
config.QPS = 5
|
config.QPS = 5
|
||||||
}
|
}
|
||||||
@ -88,3 +90,12 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||||||
}
|
}
|
||||||
return nil
|
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
|
// Federation retrieves the FederationClient
|
||||||
func (c *Clientset) Federation() v1alpha1federation.FederationInterface {
|
func (c *Clientset) Federation() v1alpha1federation.FederationInterface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return c.FederationClient
|
return c.FederationClient
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
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.
|
// This package has the automatically generated clientset.
|
||||||
package federation_release_1_3
|
package federation_release_1_3
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
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.
|
// This package has the automatically generated fake clientset.
|
||||||
package fake
|
package fake
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
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.
|
// This package has the automatically generated typed clients.
|
||||||
package v1alpha1
|
package v1alpha1
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
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 has the automatically generated clients.
|
||||||
package fake
|
package fake
|
||||||
|
@ -18,6 +18,7 @@ package fake
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
v1alpha1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1"
|
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"
|
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -28,3 +29,9 @@ type FakeFederation struct {
|
|||||||
func (c *FakeFederation) Clusters() v1alpha1.ClusterInterface {
|
func (c *FakeFederation) Clusters() v1alpha1.ClusterInterface {
|
||||||
return &FakeClusters{c}
|
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
|
package v1alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
|
||||||
api "k8s.io/kubernetes/pkg/api"
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
registered "k8s.io/kubernetes/pkg/apimachinery/registered"
|
registered "k8s.io/kubernetes/pkg/apimachinery/registered"
|
||||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||||
)
|
)
|
||||||
|
|
||||||
type FederationInterface interface {
|
type FederationInterface interface {
|
||||||
|
GetRESTClient() *restclient.RESTClient
|
||||||
ClustersGetter
|
ClustersGetter
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,11 +80,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||||||
config.GroupVersion = ©GroupVersion
|
config.GroupVersion = ©GroupVersion
|
||||||
//}
|
//}
|
||||||
|
|
||||||
codec, ok := api.Codecs.SerializerForFileExtension("json")
|
config.NegotiatedSerializer = api.Codecs
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("unable to find serializer for JSON")
|
|
||||||
}
|
|
||||||
config.Codec = codec
|
|
||||||
|
|
||||||
if config.QPS == 0 {
|
if config.QPS == 0 {
|
||||||
config.QPS = 5
|
config.QPS = 5
|
||||||
@ -94,3 +90,12 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||||||
}
|
}
|
||||||
return nil
|
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.
|
# update- and verify- scripts.
|
||||||
${clientgen} "$@"
|
${clientgen} "$@"
|
||||||
${clientgen} -t "$@"
|
${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} "$@"
|
${conversiongen} "$@"
|
||||||
${deepcopygen} "$@"
|
${deepcopygen} "$@"
|
||||||
${setgen} "$@"
|
${setgen} "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user