mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #22928 from caesarxuchao/print-client-gen-command
Auto commit by PR queue bot
This commit is contained in:
commit
460ece34d5
@ -41,4 +41,6 @@ type Args struct {
|
||||
ClientsetOnly bool
|
||||
// FakeClient determines if client-gen generates the fake clients.
|
||||
FakeClient bool
|
||||
// CmdArgs is the command line arguments supplied when the client-gen is called.
|
||||
CmdArgs string
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ limitations under the License.
|
||||
package generators
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@ -153,6 +154,11 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
|
||||
glog.Fatalf("cannot convert arguments.CustomArgs to clientgenargs.Args")
|
||||
}
|
||||
|
||||
if len(customArgs.CmdArgs) != 0 {
|
||||
boilerplate = append(boilerplate, []byte(fmt.Sprintf("\n// This file is generated by client-gen with arguments: %s\n\n", customArgs.CmdArgs))...)
|
||||
} else {
|
||||
boilerplate = append(boilerplate, []byte(fmt.Sprintf("\n// This file is generated by client-gen with the default arguments.\n\n"))...)
|
||||
}
|
||||
gvToTypes := map[unversioned.GroupVersion][]*types.Type{}
|
||||
for gv, inputDir := range customArgs.GroupVersionToInputPath {
|
||||
p := context.Universe.Package(inputDir)
|
||||
|
@ -74,6 +74,14 @@ func parseInputVersions() (paths []string, groupVersions []unversioned.GroupVers
|
||||
func main() {
|
||||
arguments := args.Default()
|
||||
flag.Parse()
|
||||
var cmdArgs string
|
||||
flag.VisitAll(func(f *flag.Flag) {
|
||||
if !f.Changed || f.Name == "verify-only" {
|
||||
return
|
||||
}
|
||||
cmdArgs = cmdArgs + fmt.Sprintf("--%s=%s ", f.Name, f.Value)
|
||||
})
|
||||
|
||||
dependencies := []string{
|
||||
"k8s.io/kubernetes/pkg/fields",
|
||||
"k8s.io/kubernetes/pkg/labels",
|
||||
@ -97,6 +105,7 @@ func main() {
|
||||
"k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/",
|
||||
false,
|
||||
false,
|
||||
cmdArgs,
|
||||
}
|
||||
} else {
|
||||
inputPath, groupVersions, gvToPath, err := parseInputVersions()
|
||||
@ -119,6 +128,7 @@ func main() {
|
||||
*clientsetPath,
|
||||
*clientsetOnly,
|
||||
*fakeClient,
|
||||
cmdArgs,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with arguments: --test=true
|
||||
|
||||
package test_internalclientset
|
||||
|
||||
import (
|
||||
|
@ -14,5 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with arguments: --test=true
|
||||
|
||||
// Package unversioned has the automatically generated clients for unversioned resources.
|
||||
package unversioned
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with arguments: --test=true
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with arguments: --test=true
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package internalclientset
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,5 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
// Package unversioned has the automatically generated clients for unversioned resources.
|
||||
package unversioned
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,5 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,5 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
// Package unversioned has the automatically generated clients for unversioned resources.
|
||||
package unversioned
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,5 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
// FakeScales implements ScaleInterface
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
// ScalesGetter has a method to return a ScaleInterface.
|
||||
|
@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package unversioned
|
||||
|
||||
import (
|
||||
|
Loading…
Reference in New Issue
Block a user