diff --git a/go.mod b/go.mod index 5328293..a75bfcf 100644 --- a/go.mod +++ b/go.mod @@ -1,16 +1,16 @@ module volcano.sh/apis -go 1.22.0 +go 1.23.0 require ( - k8s.io/api v0.31.3 - k8s.io/apimachinery v0.31.3 - k8s.io/apiserver v0.31.3 - k8s.io/client-go v0.31.3 - k8s.io/code-generator v0.31.3 + k8s.io/api v0.32.2 + k8s.io/apimachinery v0.32.2 + k8s.io/apiserver v0.32.2 + k8s.io/client-go v0.32.2 + k8s.io/code-generator v0.32.2 k8s.io/klog/v2 v2.130.1 - k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 + k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f + sigs.k8s.io/structured-merge-diff/v4 v4.4.2 ) require ( @@ -21,15 +21,16 @@ require ( github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-logr/logr v1.4.2 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.4 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.6.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect @@ -41,32 +42,34 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect + github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/x448/float16 v0.8.4 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect - google.golang.org/protobuf v1.34.2 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/net v0.30.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/term v0.25.0 // indirect + golang.org/x/text v0.19.0 // indirect + golang.org/x/time v0.7.0 // indirect + golang.org/x/tools v0.26.0 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/component-base v0.31.3 // indirect - k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect - k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + k8s.io/component-base v0.32.2 // indirect + k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect + k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect + sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) replace ( - k8s.io/api => k8s.io/api v0.31.3 - k8s.io/apimachinery => k8s.io/apimachinery v0.31.3 - k8s.io/apiserver => k8s.io/apiserver v0.31.3 - k8s.io/client-go => k8s.io/client-go v0.31.3 + k8s.io/api => k8s.io/api v0.32.2 + k8s.io/apimachinery => k8s.io/apimachinery v0.32.2 + k8s.io/apiserver => k8s.io/apiserver v0.32.2 + k8s.io/client-go => k8s.io/client-go v0.32.2 ) diff --git a/go.sum b/go.sum index 9bcf0bd..4dd8405 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,7 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -15,13 +16,14 @@ github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -36,10 +38,12 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM= -github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= +github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -62,10 +66,10 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= -github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= -github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= -github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= +github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= +github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= +github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= +github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -81,6 +85,9 @@ github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0leargg github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -96,51 +103,55 @@ github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= +golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= +golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -148,35 +159,32 @@ gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSP gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= -k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= -k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= -k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/apiserver v0.31.3 h1:+1oHTtCB+OheqFEz375D0IlzHZ5VeQKX1KGXnx+TTuY= -k8s.io/apiserver v0.31.3/go.mod h1:PrxVbebxrxQPFhJk4powDISIROkNMKHibTg9lTRQ0Qg= -k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= -k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= -k8s.io/code-generator v0.31.3 h1:Pj0fYOBms+ZrsulLi4DMsCEx1jG8fWKRLy44onHsLBI= -k8s.io/code-generator v0.31.3/go.mod h1:/umCIlT84g1+Yu5ZXtP1KGSRTnGiIzzX5AzUAxsNlts= -k8s.io/component-base v0.31.3 h1:DMCXXVx546Rfvhj+3cOm2EUxhS+EyztH423j+8sOwhQ= -k8s.io/component-base v0.31.3/go.mod h1:xME6BHfUOafRgT0rGVBGl7TuSg8Z9/deT7qq6w7qjIU= -k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo= -k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= +k8s.io/api v0.32.2 h1:bZrMLEkgizC24G9eViHGOPbW+aRo9duEISRIJKfdJuw= +k8s.io/api v0.32.2/go.mod h1:hKlhk4x1sJyYnHENsrdCWw31FEmCijNGPJO5WzHiJ6Y= +k8s.io/apimachinery v0.32.2 h1:yoQBR9ZGkA6Rgmhbp/yuT9/g+4lxtsGYwW6dR6BDPLQ= +k8s.io/apimachinery v0.32.2/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= +k8s.io/apiserver v0.32.2 h1:WzyxAu4mvLkQxwD9hGa4ZfExo3yZZaYzoYvvVDlM6vw= +k8s.io/apiserver v0.32.2/go.mod h1:PEwREHiHNU2oFdte7BjzA1ZyjWjuckORLIK/wLV5goM= +k8s.io/client-go v0.32.2 h1:4dYCD4Nz+9RApM2b/3BtVvBHw54QjMFUl1OLcJG5yOA= +k8s.io/client-go v0.32.2/go.mod h1:fpZ4oJXclZ3r2nDOv+Ux3XcJutfrwjKTCHz2H3sww94= +k8s.io/code-generator v0.32.2 h1:CIvyPrLWP7cMgrqval2qYT839YAwCDeSvGfXgWSNpHQ= +k8s.io/code-generator v0.32.2/go.mod h1:plh7bWk7JztAUkHM4zpbdy0KOMdrhsePcZL2HLWFH7Y= +k8s.io/component-base v0.32.2 h1:1aUL5Vdmu7qNo4ZsE+569PV5zFatM9hl+lb3dEea2zU= +k8s.io/component-base v0.32.2/go.mod h1:PXJ61Vx9Lg+P5mS8TLd7bCIr+eMJRQTyXe8KvkrvJq0= +k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 h1:si3PfKm8dDYxgfbeA6orqrtLkvvIeH8UqffFJDl0bz4= +k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/hack/generate-groups.sh b/hack/generate-groups.sh index f9ee40e..21685b3 100755 --- a/hack/generate-groups.sh +++ b/hack/generate-groups.sh @@ -46,7 +46,7 @@ APIS_PKG="$3" GROUPS_WITH_VERSIONS="$4" shift 4 -go install k8s.io/code-generator/cmd/{defaulter-gen,client-gen,lister-gen,informer-gen,deepcopy-gen,conversion-gen}@v0.31.3 +go install k8s.io/code-generator/cmd/{defaulter-gen,client-gen,lister-gen,informer-gen,deepcopy-gen,conversion-gen}@v0.32.2 # Go installs the above commands to get installed in $GOBIN if defined, and $GOPATH/bin otherwise: GOBIN="$(go env GOBIN)" diff --git a/hack/generate-internal-groups.sh b/hack/generate-internal-groups.sh index 8618631..4bd25a9 100644 --- a/hack/generate-internal-groups.sh +++ b/hack/generate-internal-groups.sh @@ -47,7 +47,7 @@ EXT_APIS_PKG="$4" GROUPS_WITH_VERSIONS="$5" shift 5 -go install k8s.io/code-generator/cmd/{defaulter-gen,conversion-gen,client-gen,lister-gen,informer-gen,deepcopy-gen,openapi-gen}@v0.31.3 +go install k8s.io/code-generator/cmd/{defaulter-gen,conversion-gen,client-gen,lister-gen,informer-gen,deepcopy-gen,openapi-gen}@v0.32.2 # Go installs the above commands to get installed in $GOBIN if defined, and $GOPATH/bin otherwise: GOBIN="$(go env GOBIN)" diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/dependson.go b/pkg/client/applyconfiguration/batch/v1alpha1/dependson.go index 9b959a5..c0705bf 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/dependson.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/dependson.go @@ -18,14 +18,14 @@ limitations under the License. package v1alpha1 import ( - v1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" + batchv1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" ) // DependsOnApplyConfiguration represents a declarative configuration of the DependsOn type for use // with apply. type DependsOnApplyConfiguration struct { - Name []string `json:"name,omitempty"` - Iteration *v1alpha1.Iteration `json:"iteration,omitempty"` + Name []string `json:"name,omitempty"` + Iteration *batchv1alpha1.Iteration `json:"iteration,omitempty"` } // DependsOnApplyConfiguration constructs a declarative configuration of the DependsOn type for use with @@ -47,7 +47,7 @@ func (b *DependsOnApplyConfiguration) WithName(values ...string) *DependsOnApply // WithIteration sets the Iteration field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Iteration field is set to the value of the last call. -func (b *DependsOnApplyConfiguration) WithIteration(value v1alpha1.Iteration) *DependsOnApplyConfiguration { +func (b *DependsOnApplyConfiguration) WithIteration(value batchv1alpha1.Iteration) *DependsOnApplyConfiguration { b.Iteration = &value return b } diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/job.go b/pkg/client/applyconfiguration/batch/v1alpha1/job.go index 5aaacb7..c3afcfb 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/job.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/job.go @@ -47,7 +47,7 @@ func Job(name, namespace string) *JobApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *JobApplyConfiguration) WithKind(value string) *JobApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -55,7 +55,7 @@ func (b *JobApplyConfiguration) WithKind(value string) *JobApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *JobApplyConfiguration) WithAPIVersion(value string) *JobApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -64,7 +64,7 @@ func (b *JobApplyConfiguration) WithAPIVersion(value string) *JobApplyConfigurat // If called multiple times, the Name field is set to the value of the last call. func (b *JobApplyConfiguration) WithName(value string) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -73,7 +73,7 @@ func (b *JobApplyConfiguration) WithName(value string) *JobApplyConfiguration { // If called multiple times, the GenerateName field is set to the value of the last call. func (b *JobApplyConfiguration) WithGenerateName(value string) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -82,7 +82,7 @@ func (b *JobApplyConfiguration) WithGenerateName(value string) *JobApplyConfigur // If called multiple times, the Namespace field is set to the value of the last call. func (b *JobApplyConfiguration) WithNamespace(value string) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -91,7 +91,7 @@ func (b *JobApplyConfiguration) WithNamespace(value string) *JobApplyConfigurati // If called multiple times, the UID field is set to the value of the last call. func (b *JobApplyConfiguration) WithUID(value types.UID) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -100,7 +100,7 @@ func (b *JobApplyConfiguration) WithUID(value types.UID) *JobApplyConfiguration // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *JobApplyConfiguration) WithResourceVersion(value string) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -109,7 +109,7 @@ func (b *JobApplyConfiguration) WithResourceVersion(value string) *JobApplyConfi // If called multiple times, the Generation field is set to the value of the last call. func (b *JobApplyConfiguration) WithGeneration(value int64) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -118,7 +118,7 @@ func (b *JobApplyConfiguration) WithGeneration(value int64) *JobApplyConfigurati // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *JobApplyConfiguration) WithCreationTimestamp(value metav1.Time) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -127,7 +127,7 @@ func (b *JobApplyConfiguration) WithCreationTimestamp(value metav1.Time) *JobApp // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *JobApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -136,7 +136,7 @@ func (b *JobApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *JobApp // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *JobApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -146,11 +146,11 @@ func (b *JobApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *Job // overwriting an existing map entries in Labels field with the same key. func (b *JobApplyConfiguration) WithLabels(entries map[string]string) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -161,11 +161,11 @@ func (b *JobApplyConfiguration) WithLabels(entries map[string]string) *JobApplyC // overwriting an existing map entries in Annotations field with the same key. func (b *JobApplyConfiguration) WithAnnotations(entries map[string]string) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -179,7 +179,7 @@ func (b *JobApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReference if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -190,7 +190,7 @@ func (b *JobApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReference func (b *JobApplyConfiguration) WithFinalizers(values ...string) *JobApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -220,5 +220,5 @@ func (b *JobApplyConfiguration) WithStatus(value *JobStatusApplyConfiguration) * // GetName retrieves the value of the Name field in the declarative configuration. func (b *JobApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/jobcondition.go b/pkg/client/applyconfiguration/batch/v1alpha1/jobcondition.go index 8a802f1..db70e97 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/jobcondition.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/jobcondition.go @@ -19,14 +19,14 @@ package v1alpha1 import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - v1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" + batchv1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" ) // JobConditionApplyConfiguration represents a declarative configuration of the JobCondition type for use // with apply. type JobConditionApplyConfiguration struct { - Status *v1alpha1.JobPhase `json:"status,omitempty"` - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` + Status *batchv1alpha1.JobPhase `json:"status,omitempty"` + LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` } // JobConditionApplyConfiguration constructs a declarative configuration of the JobCondition type for use with @@ -38,7 +38,7 @@ func JobCondition() *JobConditionApplyConfiguration { // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *JobConditionApplyConfiguration) WithStatus(value v1alpha1.JobPhase) *JobConditionApplyConfiguration { +func (b *JobConditionApplyConfiguration) WithStatus(value batchv1alpha1.JobPhase) *JobConditionApplyConfiguration { b.Status = &value return b } diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/jobstate.go b/pkg/client/applyconfiguration/batch/v1alpha1/jobstate.go index 406aeca..1140c86 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/jobstate.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/jobstate.go @@ -19,16 +19,16 @@ package v1alpha1 import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - v1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" + batchv1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" ) // JobStateApplyConfiguration represents a declarative configuration of the JobState type for use // with apply. type JobStateApplyConfiguration struct { - Phase *v1alpha1.JobPhase `json:"phase,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` + Phase *batchv1alpha1.JobPhase `json:"phase,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` + LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` } // JobStateApplyConfiguration constructs a declarative configuration of the JobState type for use with @@ -40,7 +40,7 @@ func JobState() *JobStateApplyConfiguration { // WithPhase sets the Phase field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Phase field is set to the value of the last call. -func (b *JobStateApplyConfiguration) WithPhase(value v1alpha1.JobPhase) *JobStateApplyConfiguration { +func (b *JobStateApplyConfiguration) WithPhase(value batchv1alpha1.JobPhase) *JobStateApplyConfiguration { b.Phase = &value return b } diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/lifecyclepolicy.go b/pkg/client/applyconfiguration/batch/v1alpha1/lifecyclepolicy.go index 8204cdb..fb490b9 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/lifecyclepolicy.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/lifecyclepolicy.go @@ -19,17 +19,17 @@ package v1alpha1 import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - v1alpha1 "volcano.sh/apis/pkg/apis/bus/v1alpha1" + busv1alpha1 "volcano.sh/apis/pkg/apis/bus/v1alpha1" ) // LifecyclePolicyApplyConfiguration represents a declarative configuration of the LifecyclePolicy type for use // with apply. type LifecyclePolicyApplyConfiguration struct { - Action *v1alpha1.Action `json:"action,omitempty"` - Event *v1alpha1.Event `json:"event,omitempty"` - Events []v1alpha1.Event `json:"events,omitempty"` - ExitCode *int32 `json:"exitCode,omitempty"` - Timeout *v1.Duration `json:"timeout,omitempty"` + Action *busv1alpha1.Action `json:"action,omitempty"` + Event *busv1alpha1.Event `json:"event,omitempty"` + Events []busv1alpha1.Event `json:"events,omitempty"` + ExitCode *int32 `json:"exitCode,omitempty"` + Timeout *v1.Duration `json:"timeout,omitempty"` } // LifecyclePolicyApplyConfiguration constructs a declarative configuration of the LifecyclePolicy type for use with @@ -41,7 +41,7 @@ func LifecyclePolicy() *LifecyclePolicyApplyConfiguration { // WithAction sets the Action field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Action field is set to the value of the last call. -func (b *LifecyclePolicyApplyConfiguration) WithAction(value v1alpha1.Action) *LifecyclePolicyApplyConfiguration { +func (b *LifecyclePolicyApplyConfiguration) WithAction(value busv1alpha1.Action) *LifecyclePolicyApplyConfiguration { b.Action = &value return b } @@ -49,7 +49,7 @@ func (b *LifecyclePolicyApplyConfiguration) WithAction(value v1alpha1.Action) *L // WithEvent sets the Event field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Event field is set to the value of the last call. -func (b *LifecyclePolicyApplyConfiguration) WithEvent(value v1alpha1.Event) *LifecyclePolicyApplyConfiguration { +func (b *LifecyclePolicyApplyConfiguration) WithEvent(value busv1alpha1.Event) *LifecyclePolicyApplyConfiguration { b.Event = &value return b } @@ -57,7 +57,7 @@ func (b *LifecyclePolicyApplyConfiguration) WithEvent(value v1alpha1.Event) *Lif // WithEvents adds the given value to the Events field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Events field. -func (b *LifecyclePolicyApplyConfiguration) WithEvents(values ...v1alpha1.Event) *LifecyclePolicyApplyConfiguration { +func (b *LifecyclePolicyApplyConfiguration) WithEvents(values ...busv1alpha1.Event) *LifecyclePolicyApplyConfiguration { for i := range values { b.Events = append(b.Events, values[i]) } diff --git a/pkg/client/applyconfiguration/bus/v1alpha1/command.go b/pkg/client/applyconfiguration/bus/v1alpha1/command.go index b6cb8b2..f36d192 100644 --- a/pkg/client/applyconfiguration/bus/v1alpha1/command.go +++ b/pkg/client/applyconfiguration/bus/v1alpha1/command.go @@ -49,7 +49,7 @@ func Command(name, namespace string) *CommandApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *CommandApplyConfiguration) WithKind(value string) *CommandApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -57,7 +57,7 @@ func (b *CommandApplyConfiguration) WithKind(value string) *CommandApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *CommandApplyConfiguration) WithAPIVersion(value string) *CommandApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -66,7 +66,7 @@ func (b *CommandApplyConfiguration) WithAPIVersion(value string) *CommandApplyCo // If called multiple times, the Name field is set to the value of the last call. func (b *CommandApplyConfiguration) WithName(value string) *CommandApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -75,7 +75,7 @@ func (b *CommandApplyConfiguration) WithName(value string) *CommandApplyConfigur // If called multiple times, the GenerateName field is set to the value of the last call. func (b *CommandApplyConfiguration) WithGenerateName(value string) *CommandApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -84,7 +84,7 @@ func (b *CommandApplyConfiguration) WithGenerateName(value string) *CommandApply // If called multiple times, the Namespace field is set to the value of the last call. func (b *CommandApplyConfiguration) WithNamespace(value string) *CommandApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -93,7 +93,7 @@ func (b *CommandApplyConfiguration) WithNamespace(value string) *CommandApplyCon // If called multiple times, the UID field is set to the value of the last call. func (b *CommandApplyConfiguration) WithUID(value types.UID) *CommandApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -102,7 +102,7 @@ func (b *CommandApplyConfiguration) WithUID(value types.UID) *CommandApplyConfig // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *CommandApplyConfiguration) WithResourceVersion(value string) *CommandApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -111,7 +111,7 @@ func (b *CommandApplyConfiguration) WithResourceVersion(value string) *CommandAp // If called multiple times, the Generation field is set to the value of the last call. func (b *CommandApplyConfiguration) WithGeneration(value int64) *CommandApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -120,7 +120,7 @@ func (b *CommandApplyConfiguration) WithGeneration(value int64) *CommandApplyCon // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *CommandApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CommandApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -129,7 +129,7 @@ func (b *CommandApplyConfiguration) WithCreationTimestamp(value metav1.Time) *Co // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *CommandApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CommandApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -138,7 +138,7 @@ func (b *CommandApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Co // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *CommandApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CommandApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -148,11 +148,11 @@ func (b *CommandApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) // overwriting an existing map entries in Labels field with the same key. func (b *CommandApplyConfiguration) WithLabels(entries map[string]string) *CommandApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -163,11 +163,11 @@ func (b *CommandApplyConfiguration) WithLabels(entries map[string]string) *Comma // overwriting an existing map entries in Annotations field with the same key. func (b *CommandApplyConfiguration) WithAnnotations(entries map[string]string) *CommandApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -181,7 +181,7 @@ func (b *CommandApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefer if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -192,7 +192,7 @@ func (b *CommandApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefer func (b *CommandApplyConfiguration) WithFinalizers(values ...string) *CommandApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -238,5 +238,5 @@ func (b *CommandApplyConfiguration) WithMessage(value string) *CommandApplyConfi // GetName retrieves the value of the Name field in the declarative configuration. func (b *CommandApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/pkg/client/applyconfiguration/flow/v1alpha1/condition.go b/pkg/client/applyconfiguration/flow/v1alpha1/condition.go index 30748fd..b51a147 100644 --- a/pkg/client/applyconfiguration/flow/v1alpha1/condition.go +++ b/pkg/client/applyconfiguration/flow/v1alpha1/condition.go @@ -19,17 +19,17 @@ package v1alpha1 import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - v1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" - batchv1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/batch/v1alpha1" + batchv1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" + applyconfigurationbatchv1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/batch/v1alpha1" ) // ConditionApplyConfiguration represents a declarative configuration of the Condition type for use // with apply. type ConditionApplyConfiguration struct { - Phase *v1alpha1.JobPhase `json:"phase,omitempty"` - CreateTimestamp *v1.Time `json:"createTime,omitempty"` - RunningDuration *v1.Duration `json:"runningDuration,omitempty"` - TaskStatusCount map[string]batchv1alpha1.TaskStateApplyConfiguration `json:"taskStatusCount,omitempty"` + Phase *batchv1alpha1.JobPhase `json:"phase,omitempty"` + CreateTimestamp *v1.Time `json:"createTime,omitempty"` + RunningDuration *v1.Duration `json:"runningDuration,omitempty"` + TaskStatusCount map[string]applyconfigurationbatchv1alpha1.TaskStateApplyConfiguration `json:"taskStatusCount,omitempty"` } // ConditionApplyConfiguration constructs a declarative configuration of the Condition type for use with @@ -41,7 +41,7 @@ func Condition() *ConditionApplyConfiguration { // WithPhase sets the Phase field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Phase field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithPhase(value v1alpha1.JobPhase) *ConditionApplyConfiguration { +func (b *ConditionApplyConfiguration) WithPhase(value batchv1alpha1.JobPhase) *ConditionApplyConfiguration { b.Phase = &value return b } @@ -66,9 +66,9 @@ func (b *ConditionApplyConfiguration) WithRunningDuration(value v1.Duration) *Co // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the TaskStatusCount field, // overwriting an existing map entries in TaskStatusCount field with the same key. -func (b *ConditionApplyConfiguration) WithTaskStatusCount(entries map[string]batchv1alpha1.TaskStateApplyConfiguration) *ConditionApplyConfiguration { +func (b *ConditionApplyConfiguration) WithTaskStatusCount(entries map[string]applyconfigurationbatchv1alpha1.TaskStateApplyConfiguration) *ConditionApplyConfiguration { if b.TaskStatusCount == nil && len(entries) > 0 { - b.TaskStatusCount = make(map[string]batchv1alpha1.TaskStateApplyConfiguration, len(entries)) + b.TaskStatusCount = make(map[string]applyconfigurationbatchv1alpha1.TaskStateApplyConfiguration, len(entries)) } for k, v := range entries { b.TaskStatusCount[k] = v diff --git a/pkg/client/applyconfiguration/flow/v1alpha1/jobflow.go b/pkg/client/applyconfiguration/flow/v1alpha1/jobflow.go index b9075cc..7d841a4 100644 --- a/pkg/client/applyconfiguration/flow/v1alpha1/jobflow.go +++ b/pkg/client/applyconfiguration/flow/v1alpha1/jobflow.go @@ -47,7 +47,7 @@ func JobFlow(name, namespace string) *JobFlowApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *JobFlowApplyConfiguration) WithKind(value string) *JobFlowApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -55,7 +55,7 @@ func (b *JobFlowApplyConfiguration) WithKind(value string) *JobFlowApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *JobFlowApplyConfiguration) WithAPIVersion(value string) *JobFlowApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -64,7 +64,7 @@ func (b *JobFlowApplyConfiguration) WithAPIVersion(value string) *JobFlowApplyCo // If called multiple times, the Name field is set to the value of the last call. func (b *JobFlowApplyConfiguration) WithName(value string) *JobFlowApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -73,7 +73,7 @@ func (b *JobFlowApplyConfiguration) WithName(value string) *JobFlowApplyConfigur // If called multiple times, the GenerateName field is set to the value of the last call. func (b *JobFlowApplyConfiguration) WithGenerateName(value string) *JobFlowApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -82,7 +82,7 @@ func (b *JobFlowApplyConfiguration) WithGenerateName(value string) *JobFlowApply // If called multiple times, the Namespace field is set to the value of the last call. func (b *JobFlowApplyConfiguration) WithNamespace(value string) *JobFlowApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -91,7 +91,7 @@ func (b *JobFlowApplyConfiguration) WithNamespace(value string) *JobFlowApplyCon // If called multiple times, the UID field is set to the value of the last call. func (b *JobFlowApplyConfiguration) WithUID(value types.UID) *JobFlowApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -100,7 +100,7 @@ func (b *JobFlowApplyConfiguration) WithUID(value types.UID) *JobFlowApplyConfig // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *JobFlowApplyConfiguration) WithResourceVersion(value string) *JobFlowApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -109,7 +109,7 @@ func (b *JobFlowApplyConfiguration) WithResourceVersion(value string) *JobFlowAp // If called multiple times, the Generation field is set to the value of the last call. func (b *JobFlowApplyConfiguration) WithGeneration(value int64) *JobFlowApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -118,7 +118,7 @@ func (b *JobFlowApplyConfiguration) WithGeneration(value int64) *JobFlowApplyCon // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *JobFlowApplyConfiguration) WithCreationTimestamp(value metav1.Time) *JobFlowApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -127,7 +127,7 @@ func (b *JobFlowApplyConfiguration) WithCreationTimestamp(value metav1.Time) *Jo // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *JobFlowApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *JobFlowApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -136,7 +136,7 @@ func (b *JobFlowApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Jo // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *JobFlowApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *JobFlowApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -146,11 +146,11 @@ func (b *JobFlowApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) // overwriting an existing map entries in Labels field with the same key. func (b *JobFlowApplyConfiguration) WithLabels(entries map[string]string) *JobFlowApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -161,11 +161,11 @@ func (b *JobFlowApplyConfiguration) WithLabels(entries map[string]string) *JobFl // overwriting an existing map entries in Annotations field with the same key. func (b *JobFlowApplyConfiguration) WithAnnotations(entries map[string]string) *JobFlowApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -179,7 +179,7 @@ func (b *JobFlowApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefer if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -190,7 +190,7 @@ func (b *JobFlowApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefer func (b *JobFlowApplyConfiguration) WithFinalizers(values ...string) *JobFlowApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -220,5 +220,5 @@ func (b *JobFlowApplyConfiguration) WithStatus(value *JobFlowStatusApplyConfigur // GetName retrieves the value of the Name field in the declarative configuration. func (b *JobFlowApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/pkg/client/applyconfiguration/flow/v1alpha1/jobrunninghistory.go b/pkg/client/applyconfiguration/flow/v1alpha1/jobrunninghistory.go index 7c57935..bba03cb 100644 --- a/pkg/client/applyconfiguration/flow/v1alpha1/jobrunninghistory.go +++ b/pkg/client/applyconfiguration/flow/v1alpha1/jobrunninghistory.go @@ -19,15 +19,15 @@ package v1alpha1 import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - v1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" + batchv1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" ) // JobRunningHistoryApplyConfiguration represents a declarative configuration of the JobRunningHistory type for use // with apply. type JobRunningHistoryApplyConfiguration struct { - StartTimestamp *v1.Time `json:"startTimestamp,omitempty"` - EndTimestamp *v1.Time `json:"endTimestamp,omitempty"` - State *v1alpha1.JobPhase `json:"state,omitempty"` + StartTimestamp *v1.Time `json:"startTimestamp,omitempty"` + EndTimestamp *v1.Time `json:"endTimestamp,omitempty"` + State *batchv1alpha1.JobPhase `json:"state,omitempty"` } // JobRunningHistoryApplyConfiguration constructs a declarative configuration of the JobRunningHistory type for use with @@ -55,7 +55,7 @@ func (b *JobRunningHistoryApplyConfiguration) WithEndTimestamp(value v1.Time) *J // WithState sets the State field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the State field is set to the value of the last call. -func (b *JobRunningHistoryApplyConfiguration) WithState(value v1alpha1.JobPhase) *JobRunningHistoryApplyConfiguration { +func (b *JobRunningHistoryApplyConfiguration) WithState(value batchv1alpha1.JobPhase) *JobRunningHistoryApplyConfiguration { b.State = &value return b } diff --git a/pkg/client/applyconfiguration/flow/v1alpha1/jobstatus.go b/pkg/client/applyconfiguration/flow/v1alpha1/jobstatus.go index 1f963d7..18b9181 100644 --- a/pkg/client/applyconfiguration/flow/v1alpha1/jobstatus.go +++ b/pkg/client/applyconfiguration/flow/v1alpha1/jobstatus.go @@ -19,14 +19,14 @@ package v1alpha1 import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - v1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" + batchv1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" ) // JobStatusApplyConfiguration represents a declarative configuration of the JobStatus type for use // with apply. type JobStatusApplyConfiguration struct { Name *string `json:"name,omitempty"` - State *v1alpha1.JobPhase `json:"state,omitempty"` + State *batchv1alpha1.JobPhase `json:"state,omitempty"` StartTimestamp *v1.Time `json:"startTimestamp,omitempty"` EndTimestamp *v1.Time `json:"endTimestamp,omitempty"` RestartCount *int32 `json:"restartCount,omitempty"` @@ -50,7 +50,7 @@ func (b *JobStatusApplyConfiguration) WithName(value string) *JobStatusApplyConf // WithState sets the State field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the State field is set to the value of the last call. -func (b *JobStatusApplyConfiguration) WithState(value v1alpha1.JobPhase) *JobStatusApplyConfiguration { +func (b *JobStatusApplyConfiguration) WithState(value batchv1alpha1.JobPhase) *JobStatusApplyConfiguration { b.State = &value return b } diff --git a/pkg/client/applyconfiguration/flow/v1alpha1/jobtemplate.go b/pkg/client/applyconfiguration/flow/v1alpha1/jobtemplate.go index 2b2e804..81eeccf 100644 --- a/pkg/client/applyconfiguration/flow/v1alpha1/jobtemplate.go +++ b/pkg/client/applyconfiguration/flow/v1alpha1/jobtemplate.go @@ -21,7 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" v1 "k8s.io/client-go/applyconfigurations/meta/v1" - v1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/batch/v1alpha1" + batchv1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/batch/v1alpha1" ) // JobTemplateApplyConfiguration represents a declarative configuration of the JobTemplate type for use @@ -29,8 +29,8 @@ import ( type JobTemplateApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *v1alpha1.JobSpecApplyConfiguration `json:"spec,omitempty"` - Status *JobTemplateStatusApplyConfiguration `json:"status,omitempty"` + Spec *batchv1alpha1.JobSpecApplyConfiguration `json:"spec,omitempty"` + Status *JobTemplateStatusApplyConfiguration `json:"status,omitempty"` } // JobTemplate constructs a declarative configuration of the JobTemplate type for use with @@ -48,7 +48,7 @@ func JobTemplate(name, namespace string) *JobTemplateApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *JobTemplateApplyConfiguration) WithKind(value string) *JobTemplateApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -56,7 +56,7 @@ func (b *JobTemplateApplyConfiguration) WithKind(value string) *JobTemplateApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *JobTemplateApplyConfiguration) WithAPIVersion(value string) *JobTemplateApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -65,7 +65,7 @@ func (b *JobTemplateApplyConfiguration) WithAPIVersion(value string) *JobTemplat // If called multiple times, the Name field is set to the value of the last call. func (b *JobTemplateApplyConfiguration) WithName(value string) *JobTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -74,7 +74,7 @@ func (b *JobTemplateApplyConfiguration) WithName(value string) *JobTemplateApply // If called multiple times, the GenerateName field is set to the value of the last call. func (b *JobTemplateApplyConfiguration) WithGenerateName(value string) *JobTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -83,7 +83,7 @@ func (b *JobTemplateApplyConfiguration) WithGenerateName(value string) *JobTempl // If called multiple times, the Namespace field is set to the value of the last call. func (b *JobTemplateApplyConfiguration) WithNamespace(value string) *JobTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -92,7 +92,7 @@ func (b *JobTemplateApplyConfiguration) WithNamespace(value string) *JobTemplate // If called multiple times, the UID field is set to the value of the last call. func (b *JobTemplateApplyConfiguration) WithUID(value types.UID) *JobTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -101,7 +101,7 @@ func (b *JobTemplateApplyConfiguration) WithUID(value types.UID) *JobTemplateApp // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *JobTemplateApplyConfiguration) WithResourceVersion(value string) *JobTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -110,7 +110,7 @@ func (b *JobTemplateApplyConfiguration) WithResourceVersion(value string) *JobTe // If called multiple times, the Generation field is set to the value of the last call. func (b *JobTemplateApplyConfiguration) WithGeneration(value int64) *JobTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -119,7 +119,7 @@ func (b *JobTemplateApplyConfiguration) WithGeneration(value int64) *JobTemplate // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *JobTemplateApplyConfiguration) WithCreationTimestamp(value metav1.Time) *JobTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -128,7 +128,7 @@ func (b *JobTemplateApplyConfiguration) WithCreationTimestamp(value metav1.Time) // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *JobTemplateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *JobTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -137,7 +137,7 @@ func (b *JobTemplateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *JobTemplateApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *JobTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -147,11 +147,11 @@ func (b *JobTemplateApplyConfiguration) WithDeletionGracePeriodSeconds(value int // overwriting an existing map entries in Labels field with the same key. func (b *JobTemplateApplyConfiguration) WithLabels(entries map[string]string) *JobTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -162,11 +162,11 @@ func (b *JobTemplateApplyConfiguration) WithLabels(entries map[string]string) *J // overwriting an existing map entries in Annotations field with the same key. func (b *JobTemplateApplyConfiguration) WithAnnotations(entries map[string]string) *JobTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -180,7 +180,7 @@ func (b *JobTemplateApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -191,7 +191,7 @@ func (b *JobTemplateApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR func (b *JobTemplateApplyConfiguration) WithFinalizers(values ...string) *JobTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -205,7 +205,7 @@ func (b *JobTemplateApplyConfiguration) ensureObjectMetaApplyConfigurationExists // WithSpec sets the Spec field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Spec field is set to the value of the last call. -func (b *JobTemplateApplyConfiguration) WithSpec(value *v1alpha1.JobSpecApplyConfiguration) *JobTemplateApplyConfiguration { +func (b *JobTemplateApplyConfiguration) WithSpec(value *batchv1alpha1.JobSpecApplyConfiguration) *JobTemplateApplyConfiguration { b.Spec = value return b } @@ -221,5 +221,5 @@ func (b *JobTemplateApplyConfiguration) WithStatus(value *JobTemplateStatusApply // GetName retrieves the value of the Name field in the declarative configuration. func (b *JobTemplateApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/pkg/client/applyconfiguration/flow/v1alpha1/state.go b/pkg/client/applyconfiguration/flow/v1alpha1/state.go index d9bfd55..1fc00de 100644 --- a/pkg/client/applyconfiguration/flow/v1alpha1/state.go +++ b/pkg/client/applyconfiguration/flow/v1alpha1/state.go @@ -18,13 +18,13 @@ limitations under the License. package v1alpha1 import ( - v1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" + flowv1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" ) // StateApplyConfiguration represents a declarative configuration of the State type for use // with apply. type StateApplyConfiguration struct { - Phase *v1alpha1.Phase `json:"phase,omitempty"` + Phase *flowv1alpha1.Phase `json:"phase,omitempty"` } // StateApplyConfiguration constructs a declarative configuration of the State type for use with @@ -36,7 +36,7 @@ func State() *StateApplyConfiguration { // WithPhase sets the Phase field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Phase field is set to the value of the last call. -func (b *StateApplyConfiguration) WithPhase(value v1alpha1.Phase) *StateApplyConfiguration { +func (b *StateApplyConfiguration) WithPhase(value flowv1alpha1.Phase) *StateApplyConfiguration { b.Phase = &value return b } diff --git a/pkg/client/applyconfiguration/internal/internal.go b/pkg/client/applyconfiguration/internal/internal.go index e8a7e9c..6e107e5 100644 --- a/pkg/client/applyconfiguration/internal/internal.go +++ b/pkg/client/applyconfiguration/internal/internal.go @@ -18,8 +18,8 @@ limitations under the License. package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopology.go b/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopology.go index 5d3d8b7..7372004 100644 --- a/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopology.go +++ b/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopology.go @@ -45,7 +45,7 @@ func Numatopology(name string) *NumatopologyApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *NumatopologyApplyConfiguration) WithKind(value string) *NumatopologyApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -53,7 +53,7 @@ func (b *NumatopologyApplyConfiguration) WithKind(value string) *NumatopologyApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *NumatopologyApplyConfiguration) WithAPIVersion(value string) *NumatopologyApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -62,7 +62,7 @@ func (b *NumatopologyApplyConfiguration) WithAPIVersion(value string) *Numatopol // If called multiple times, the Name field is set to the value of the last call. func (b *NumatopologyApplyConfiguration) WithName(value string) *NumatopologyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -71,7 +71,7 @@ func (b *NumatopologyApplyConfiguration) WithName(value string) *NumatopologyApp // If called multiple times, the GenerateName field is set to the value of the last call. func (b *NumatopologyApplyConfiguration) WithGenerateName(value string) *NumatopologyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -80,7 +80,7 @@ func (b *NumatopologyApplyConfiguration) WithGenerateName(value string) *Numatop // If called multiple times, the Namespace field is set to the value of the last call. func (b *NumatopologyApplyConfiguration) WithNamespace(value string) *NumatopologyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -89,7 +89,7 @@ func (b *NumatopologyApplyConfiguration) WithNamespace(value string) *Numatopolo // If called multiple times, the UID field is set to the value of the last call. func (b *NumatopologyApplyConfiguration) WithUID(value types.UID) *NumatopologyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -98,7 +98,7 @@ func (b *NumatopologyApplyConfiguration) WithUID(value types.UID) *NumatopologyA // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *NumatopologyApplyConfiguration) WithResourceVersion(value string) *NumatopologyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -107,7 +107,7 @@ func (b *NumatopologyApplyConfiguration) WithResourceVersion(value string) *Numa // If called multiple times, the Generation field is set to the value of the last call. func (b *NumatopologyApplyConfiguration) WithGeneration(value int64) *NumatopologyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -116,7 +116,7 @@ func (b *NumatopologyApplyConfiguration) WithGeneration(value int64) *Numatopolo // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *NumatopologyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *NumatopologyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -125,7 +125,7 @@ func (b *NumatopologyApplyConfiguration) WithCreationTimestamp(value metav1.Time // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *NumatopologyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *NumatopologyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -134,7 +134,7 @@ func (b *NumatopologyApplyConfiguration) WithDeletionTimestamp(value metav1.Time // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *NumatopologyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *NumatopologyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -144,11 +144,11 @@ func (b *NumatopologyApplyConfiguration) WithDeletionGracePeriodSeconds(value in // overwriting an existing map entries in Labels field with the same key. func (b *NumatopologyApplyConfiguration) WithLabels(entries map[string]string) *NumatopologyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -159,11 +159,11 @@ func (b *NumatopologyApplyConfiguration) WithLabels(entries map[string]string) * // overwriting an existing map entries in Annotations field with the same key. func (b *NumatopologyApplyConfiguration) WithAnnotations(entries map[string]string) *NumatopologyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -177,7 +177,7 @@ func (b *NumatopologyApplyConfiguration) WithOwnerReferences(values ...*v1.Owner if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -188,7 +188,7 @@ func (b *NumatopologyApplyConfiguration) WithOwnerReferences(values ...*v1.Owner func (b *NumatopologyApplyConfiguration) WithFinalizers(values ...string) *NumatopologyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -210,5 +210,5 @@ func (b *NumatopologyApplyConfiguration) WithSpec(value *NumatopoSpecApplyConfig // GetName retrieves the value of the Name field in the declarative configuration. func (b *NumatopologyApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopospec.go b/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopospec.go index fa8b59c..8cd4aff 100644 --- a/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopospec.go +++ b/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopospec.go @@ -18,13 +18,13 @@ limitations under the License. package v1alpha1 import ( - v1alpha1 "volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" + nodeinfov1alpha1 "volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" ) // NumatopoSpecApplyConfiguration represents a declarative configuration of the NumatopoSpec type for use // with apply. type NumatopoSpecApplyConfiguration struct { - Policies map[v1alpha1.PolicyName]string `json:"policies,omitempty"` + Policies map[nodeinfov1alpha1.PolicyName]string `json:"policies,omitempty"` ResReserved map[string]string `json:"resReserved,omitempty"` NumaResMap map[string]ResourceInfoApplyConfiguration `json:"numares,omitempty"` CPUDetail map[string]CPUInfoApplyConfiguration `json:"cpuDetail,omitempty"` @@ -40,9 +40,9 @@ func NumatopoSpec() *NumatopoSpecApplyConfiguration { // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Policies field, // overwriting an existing map entries in Policies field with the same key. -func (b *NumatopoSpecApplyConfiguration) WithPolicies(entries map[v1alpha1.PolicyName]string) *NumatopoSpecApplyConfiguration { +func (b *NumatopoSpecApplyConfiguration) WithPolicies(entries map[nodeinfov1alpha1.PolicyName]string) *NumatopoSpecApplyConfiguration { if b.Policies == nil && len(entries) > 0 { - b.Policies = make(map[v1alpha1.PolicyName]string, len(entries)) + b.Policies = make(map[nodeinfov1alpha1.PolicyName]string, len(entries)) } for k, v := range entries { b.Policies[k] = v diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/podgroup.go b/pkg/client/applyconfiguration/scheduling/v1beta1/podgroup.go index afa603d..37fef63 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/podgroup.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/podgroup.go @@ -47,7 +47,7 @@ func PodGroup(name, namespace string) *PodGroupApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *PodGroupApplyConfiguration) WithKind(value string) *PodGroupApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -55,7 +55,7 @@ func (b *PodGroupApplyConfiguration) WithKind(value string) *PodGroupApplyConfig // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *PodGroupApplyConfiguration) WithAPIVersion(value string) *PodGroupApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -64,7 +64,7 @@ func (b *PodGroupApplyConfiguration) WithAPIVersion(value string) *PodGroupApply // If called multiple times, the Name field is set to the value of the last call. func (b *PodGroupApplyConfiguration) WithName(value string) *PodGroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -73,7 +73,7 @@ func (b *PodGroupApplyConfiguration) WithName(value string) *PodGroupApplyConfig // If called multiple times, the GenerateName field is set to the value of the last call. func (b *PodGroupApplyConfiguration) WithGenerateName(value string) *PodGroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -82,7 +82,7 @@ func (b *PodGroupApplyConfiguration) WithGenerateName(value string) *PodGroupApp // If called multiple times, the Namespace field is set to the value of the last call. func (b *PodGroupApplyConfiguration) WithNamespace(value string) *PodGroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -91,7 +91,7 @@ func (b *PodGroupApplyConfiguration) WithNamespace(value string) *PodGroupApplyC // If called multiple times, the UID field is set to the value of the last call. func (b *PodGroupApplyConfiguration) WithUID(value types.UID) *PodGroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -100,7 +100,7 @@ func (b *PodGroupApplyConfiguration) WithUID(value types.UID) *PodGroupApplyConf // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *PodGroupApplyConfiguration) WithResourceVersion(value string) *PodGroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -109,7 +109,7 @@ func (b *PodGroupApplyConfiguration) WithResourceVersion(value string) *PodGroup // If called multiple times, the Generation field is set to the value of the last call. func (b *PodGroupApplyConfiguration) WithGeneration(value int64) *PodGroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -118,7 +118,7 @@ func (b *PodGroupApplyConfiguration) WithGeneration(value int64) *PodGroupApplyC // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *PodGroupApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PodGroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -127,7 +127,7 @@ func (b *PodGroupApplyConfiguration) WithCreationTimestamp(value metav1.Time) *P // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *PodGroupApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PodGroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -136,7 +136,7 @@ func (b *PodGroupApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *P // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *PodGroupApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PodGroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -146,11 +146,11 @@ func (b *PodGroupApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) // overwriting an existing map entries in Labels field with the same key. func (b *PodGroupApplyConfiguration) WithLabels(entries map[string]string) *PodGroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -161,11 +161,11 @@ func (b *PodGroupApplyConfiguration) WithLabels(entries map[string]string) *PodG // overwriting an existing map entries in Annotations field with the same key. func (b *PodGroupApplyConfiguration) WithAnnotations(entries map[string]string) *PodGroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -179,7 +179,7 @@ func (b *PodGroupApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefe if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -190,7 +190,7 @@ func (b *PodGroupApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefe func (b *PodGroupApplyConfiguration) WithFinalizers(values ...string) *PodGroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -220,5 +220,5 @@ func (b *PodGroupApplyConfiguration) WithStatus(value *PodGroupStatusApplyConfig // GetName retrieves the value of the Name field in the declarative configuration. func (b *PodGroupApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupcondition.go b/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupcondition.go index 27d4938..5b2de0a 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupcondition.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupcondition.go @@ -20,18 +20,18 @@ package v1beta1 import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - v1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" + schedulingv1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" ) // PodGroupConditionApplyConfiguration represents a declarative configuration of the PodGroupCondition type for use // with apply. type PodGroupConditionApplyConfiguration struct { - Type *v1beta1.PodGroupConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - TransitionID *string `json:"transitionID,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *schedulingv1beta1.PodGroupConditionType `json:"type,omitempty"` + Status *v1.ConditionStatus `json:"status,omitempty"` + TransitionID *string `json:"transitionID,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // PodGroupConditionApplyConfiguration constructs a declarative configuration of the PodGroupCondition type for use with @@ -43,7 +43,7 @@ func PodGroupCondition() *PodGroupConditionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *PodGroupConditionApplyConfiguration) WithType(value v1beta1.PodGroupConditionType) *PodGroupConditionApplyConfiguration { +func (b *PodGroupConditionApplyConfiguration) WithType(value schedulingv1beta1.PodGroupConditionType) *PodGroupConditionApplyConfiguration { b.Type = &value return b } diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupstatus.go b/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupstatus.go index 2ea885e..acd9c96 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupstatus.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupstatus.go @@ -18,13 +18,13 @@ limitations under the License. package v1beta1 import ( - v1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" + schedulingv1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" ) // PodGroupStatusApplyConfiguration represents a declarative configuration of the PodGroupStatus type for use // with apply. type PodGroupStatusApplyConfiguration struct { - Phase *v1beta1.PodGroupPhase `json:"phase,omitempty"` + Phase *schedulingv1beta1.PodGroupPhase `json:"phase,omitempty"` Conditions []PodGroupConditionApplyConfiguration `json:"conditions,omitempty"` Running *int32 `json:"running,omitempty"` Succeeded *int32 `json:"succeeded,omitempty"` @@ -40,7 +40,7 @@ func PodGroupStatus() *PodGroupStatusApplyConfiguration { // WithPhase sets the Phase field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Phase field is set to the value of the last call. -func (b *PodGroupStatusApplyConfiguration) WithPhase(value v1beta1.PodGroupPhase) *PodGroupStatusApplyConfiguration { +func (b *PodGroupStatusApplyConfiguration) WithPhase(value schedulingv1beta1.PodGroupPhase) *PodGroupStatusApplyConfiguration { b.Phase = &value return b } diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/queue.go b/pkg/client/applyconfiguration/scheduling/v1beta1/queue.go index 07cad38..5d2b5bc 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/queue.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/queue.go @@ -46,7 +46,7 @@ func Queue(name string) *QueueApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *QueueApplyConfiguration) WithKind(value string) *QueueApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -54,7 +54,7 @@ func (b *QueueApplyConfiguration) WithKind(value string) *QueueApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *QueueApplyConfiguration) WithAPIVersion(value string) *QueueApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -63,7 +63,7 @@ func (b *QueueApplyConfiguration) WithAPIVersion(value string) *QueueApplyConfig // If called multiple times, the Name field is set to the value of the last call. func (b *QueueApplyConfiguration) WithName(value string) *QueueApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -72,7 +72,7 @@ func (b *QueueApplyConfiguration) WithName(value string) *QueueApplyConfiguratio // If called multiple times, the GenerateName field is set to the value of the last call. func (b *QueueApplyConfiguration) WithGenerateName(value string) *QueueApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -81,7 +81,7 @@ func (b *QueueApplyConfiguration) WithGenerateName(value string) *QueueApplyConf // If called multiple times, the Namespace field is set to the value of the last call. func (b *QueueApplyConfiguration) WithNamespace(value string) *QueueApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -90,7 +90,7 @@ func (b *QueueApplyConfiguration) WithNamespace(value string) *QueueApplyConfigu // If called multiple times, the UID field is set to the value of the last call. func (b *QueueApplyConfiguration) WithUID(value types.UID) *QueueApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -99,7 +99,7 @@ func (b *QueueApplyConfiguration) WithUID(value types.UID) *QueueApplyConfigurat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *QueueApplyConfiguration) WithResourceVersion(value string) *QueueApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -108,7 +108,7 @@ func (b *QueueApplyConfiguration) WithResourceVersion(value string) *QueueApplyC // If called multiple times, the Generation field is set to the value of the last call. func (b *QueueApplyConfiguration) WithGeneration(value int64) *QueueApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -117,7 +117,7 @@ func (b *QueueApplyConfiguration) WithGeneration(value int64) *QueueApplyConfigu // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *QueueApplyConfiguration) WithCreationTimestamp(value metav1.Time) *QueueApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -126,7 +126,7 @@ func (b *QueueApplyConfiguration) WithCreationTimestamp(value metav1.Time) *Queu // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *QueueApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *QueueApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -135,7 +135,7 @@ func (b *QueueApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Queu // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *QueueApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *QueueApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -145,11 +145,11 @@ func (b *QueueApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *Q // overwriting an existing map entries in Labels field with the same key. func (b *QueueApplyConfiguration) WithLabels(entries map[string]string) *QueueApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -160,11 +160,11 @@ func (b *QueueApplyConfiguration) WithLabels(entries map[string]string) *QueueAp // overwriting an existing map entries in Annotations field with the same key. func (b *QueueApplyConfiguration) WithAnnotations(entries map[string]string) *QueueApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -178,7 +178,7 @@ func (b *QueueApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -189,7 +189,7 @@ func (b *QueueApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen func (b *QueueApplyConfiguration) WithFinalizers(values ...string) *QueueApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -219,5 +219,5 @@ func (b *QueueApplyConfiguration) WithStatus(value *QueueStatusApplyConfiguratio // GetName retrieves the value of the Name field in the declarative configuration. func (b *QueueApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/queuestatus.go b/pkg/client/applyconfiguration/scheduling/v1beta1/queuestatus.go index caba960..615866d 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/queuestatus.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/queuestatus.go @@ -19,13 +19,13 @@ package v1beta1 import ( v1 "k8s.io/api/core/v1" - v1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" + schedulingv1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" ) // QueueStatusApplyConfiguration represents a declarative configuration of the QueueStatus type for use // with apply. type QueueStatusApplyConfiguration struct { - State *v1beta1.QueueState `json:"state,omitempty"` + State *schedulingv1beta1.QueueState `json:"state,omitempty"` Unknown *int32 `json:"unknown,omitempty"` Pending *int32 `json:"pending,omitempty"` Running *int32 `json:"running,omitempty"` @@ -44,7 +44,7 @@ func QueueStatus() *QueueStatusApplyConfiguration { // WithState sets the State field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the State field is set to the value of the last call. -func (b *QueueStatusApplyConfiguration) WithState(value v1beta1.QueueState) *QueueStatusApplyConfiguration { +func (b *QueueStatusApplyConfiguration) WithState(value schedulingv1beta1.QueueState) *QueueStatusApplyConfiguration { b.State = &value return b } diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index 39dee68..f0b1fdd 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -18,8 +18,8 @@ limitations under the License. package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" diff --git a/pkg/client/clientset/versioned/typed/batch/v1alpha1/batch_client.go b/pkg/client/clientset/versioned/typed/batch/v1alpha1/batch_client.go index 7b99ce6..848242f 100644 --- a/pkg/client/clientset/versioned/typed/batch/v1alpha1/batch_client.go +++ b/pkg/client/clientset/versioned/typed/batch/v1alpha1/batch_client.go @@ -18,11 +18,11 @@ limitations under the License. package v1alpha1 import ( - "net/http" + http "net/http" rest "k8s.io/client-go/rest" - v1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" - "volcano.sh/apis/pkg/client/clientset/versioned/scheme" + batchv1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" + scheme "volcano.sh/apis/pkg/client/clientset/versioned/scheme" ) type BatchV1alpha1Interface interface { @@ -84,10 +84,10 @@ func New(c rest.Interface) *BatchV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := batchv1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/pkg/client/clientset/versioned/typed/batch/v1alpha1/fake/fake_batch_client.go b/pkg/client/clientset/versioned/typed/batch/v1alpha1/fake/fake_batch_client.go index ffc853e..3dcfda2 100644 --- a/pkg/client/clientset/versioned/typed/batch/v1alpha1/fake/fake_batch_client.go +++ b/pkg/client/clientset/versioned/typed/batch/v1alpha1/fake/fake_batch_client.go @@ -28,7 +28,7 @@ type FakeBatchV1alpha1 struct { } func (c *FakeBatchV1alpha1) Jobs(namespace string) v1alpha1.JobInterface { - return &FakeJobs{c, namespace} + return newFakeJobs(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/pkg/client/clientset/versioned/typed/batch/v1alpha1/fake/fake_job.go b/pkg/client/clientset/versioned/typed/batch/v1alpha1/fake/fake_job.go index 1de4b9d..b7775d8 100644 --- a/pkg/client/clientset/versioned/typed/batch/v1alpha1/fake/fake_job.go +++ b/pkg/client/clientset/versioned/typed/batch/v1alpha1/fake/fake_job.go @@ -18,179 +18,31 @@ limitations under the License. package fake import ( - "context" - json "encoding/json" - "fmt" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + gentype "k8s.io/client-go/gentype" v1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" batchv1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/batch/v1alpha1" + typedbatchv1alpha1 "volcano.sh/apis/pkg/client/clientset/versioned/typed/batch/v1alpha1" ) -// FakeJobs implements JobInterface -type FakeJobs struct { +// fakeJobs implements JobInterface +type fakeJobs struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.Job, *v1alpha1.JobList, *batchv1alpha1.JobApplyConfiguration] Fake *FakeBatchV1alpha1 - ns string } -var jobsResource = v1alpha1.SchemeGroupVersion.WithResource("jobs") - -var jobsKind = v1alpha1.SchemeGroupVersion.WithKind("Job") - -// Get takes name of the job, and returns the corresponding job object, and an error if there is any. -func (c *FakeJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Job, err error) { - emptyResult := &v1alpha1.Job{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(jobsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeJobs(fake *FakeBatchV1alpha1, namespace string) typedbatchv1alpha1.JobInterface { + return &fakeJobs{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.Job, *v1alpha1.JobList, *batchv1alpha1.JobApplyConfiguration]( + fake.Fake, + namespace, + v1alpha1.SchemeGroupVersion.WithResource("jobs"), + v1alpha1.SchemeGroupVersion.WithKind("Job"), + func() *v1alpha1.Job { return &v1alpha1.Job{} }, + func() *v1alpha1.JobList { return &v1alpha1.JobList{} }, + func(dst, src *v1alpha1.JobList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.JobList) []*v1alpha1.Job { return gentype.ToPointerSlice(list.Items) }, + func(list *v1alpha1.JobList, items []*v1alpha1.Job) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1alpha1.Job), err -} - -// List takes label and field selectors, and returns the list of Jobs that match those selectors. -func (c *FakeJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.JobList, err error) { - emptyResult := &v1alpha1.JobList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(jobsResource, jobsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.JobList{ListMeta: obj.(*v1alpha1.JobList).ListMeta} - for _, item := range obj.(*v1alpha1.JobList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested jobs. -func (c *FakeJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(jobsResource, c.ns, opts)) - -} - -// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any. -func (c *FakeJobs) Create(ctx context.Context, job *v1alpha1.Job, opts v1.CreateOptions) (result *v1alpha1.Job, err error) { - emptyResult := &v1alpha1.Job{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(jobsResource, c.ns, job, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Job), err -} - -// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any. -func (c *FakeJobs) Update(ctx context.Context, job *v1alpha1.Job, opts v1.UpdateOptions) (result *v1alpha1.Job, err error) { - emptyResult := &v1alpha1.Job{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(jobsResource, c.ns, job, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Job), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeJobs) UpdateStatus(ctx context.Context, job *v1alpha1.Job, opts v1.UpdateOptions) (result *v1alpha1.Job, err error) { - emptyResult := &v1alpha1.Job{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(jobsResource, "status", c.ns, job, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Job), err -} - -// Delete takes name of the job and deletes it. Returns an error if one occurs. -func (c *FakeJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(jobsResource, c.ns, name, opts), &v1alpha1.Job{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(jobsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.JobList{}) - return err -} - -// Patch applies the patch and returns the patched job. -func (c *FakeJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Job, err error) { - emptyResult := &v1alpha1.Job{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(jobsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Job), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied job. -func (c *FakeJobs) Apply(ctx context.Context, job *batchv1alpha1.JobApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Job, err error) { - if job == nil { - return nil, fmt.Errorf("job provided to Apply must not be nil") - } - data, err := json.Marshal(job) - if err != nil { - return nil, err - } - name := job.Name - if name == nil { - return nil, fmt.Errorf("job.Name must be provided to Apply") - } - emptyResult := &v1alpha1.Job{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(jobsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Job), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeJobs) ApplyStatus(ctx context.Context, job *batchv1alpha1.JobApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Job, err error) { - if job == nil { - return nil, fmt.Errorf("job provided to Apply must not be nil") - } - data, err := json.Marshal(job) - if err != nil { - return nil, err - } - name := job.Name - if name == nil { - return nil, fmt.Errorf("job.Name must be provided to Apply") - } - emptyResult := &v1alpha1.Job{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(jobsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Job), err } diff --git a/pkg/client/clientset/versioned/typed/batch/v1alpha1/job.go b/pkg/client/clientset/versioned/typed/batch/v1alpha1/job.go index 9db79bc..19383d3 100644 --- a/pkg/client/clientset/versioned/typed/batch/v1alpha1/job.go +++ b/pkg/client/clientset/versioned/typed/batch/v1alpha1/job.go @@ -18,14 +18,14 @@ limitations under the License. package v1alpha1 import ( - "context" + context "context" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" gentype "k8s.io/client-go/gentype" - v1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" - batchv1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/batch/v1alpha1" + batchv1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" + applyconfigurationbatchv1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/batch/v1alpha1" scheme "volcano.sh/apis/pkg/client/clientset/versioned/scheme" ) @@ -37,36 +37,37 @@ type JobsGetter interface { // JobInterface has methods to work with Job resources. type JobInterface interface { - Create(ctx context.Context, job *v1alpha1.Job, opts v1.CreateOptions) (*v1alpha1.Job, error) - Update(ctx context.Context, job *v1alpha1.Job, opts v1.UpdateOptions) (*v1alpha1.Job, error) + Create(ctx context.Context, job *batchv1alpha1.Job, opts v1.CreateOptions) (*batchv1alpha1.Job, error) + Update(ctx context.Context, job *batchv1alpha1.Job, opts v1.UpdateOptions) (*batchv1alpha1.Job, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, job *v1alpha1.Job, opts v1.UpdateOptions) (*v1alpha1.Job, error) + UpdateStatus(ctx context.Context, job *batchv1alpha1.Job, opts v1.UpdateOptions) (*batchv1alpha1.Job, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.Job, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.JobList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*batchv1alpha1.Job, error) + List(ctx context.Context, opts v1.ListOptions) (*batchv1alpha1.JobList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Job, err error) - Apply(ctx context.Context, job *batchv1alpha1.JobApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Job, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *batchv1alpha1.Job, err error) + Apply(ctx context.Context, job *applyconfigurationbatchv1alpha1.JobApplyConfiguration, opts v1.ApplyOptions) (result *batchv1alpha1.Job, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, job *batchv1alpha1.JobApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Job, err error) + ApplyStatus(ctx context.Context, job *applyconfigurationbatchv1alpha1.JobApplyConfiguration, opts v1.ApplyOptions) (result *batchv1alpha1.Job, err error) JobExpansion } // jobs implements JobInterface type jobs struct { - *gentype.ClientWithListAndApply[*v1alpha1.Job, *v1alpha1.JobList, *batchv1alpha1.JobApplyConfiguration] + *gentype.ClientWithListAndApply[*batchv1alpha1.Job, *batchv1alpha1.JobList, *applyconfigurationbatchv1alpha1.JobApplyConfiguration] } // newJobs returns a Jobs func newJobs(c *BatchV1alpha1Client, namespace string) *jobs { return &jobs{ - gentype.NewClientWithListAndApply[*v1alpha1.Job, *v1alpha1.JobList, *batchv1alpha1.JobApplyConfiguration]( + gentype.NewClientWithListAndApply[*batchv1alpha1.Job, *batchv1alpha1.JobList, *applyconfigurationbatchv1alpha1.JobApplyConfiguration]( "jobs", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha1.Job { return &v1alpha1.Job{} }, - func() *v1alpha1.JobList { return &v1alpha1.JobList{} }), + func() *batchv1alpha1.Job { return &batchv1alpha1.Job{} }, + func() *batchv1alpha1.JobList { return &batchv1alpha1.JobList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/bus/v1alpha1/bus_client.go b/pkg/client/clientset/versioned/typed/bus/v1alpha1/bus_client.go index edb2677..74739e5 100644 --- a/pkg/client/clientset/versioned/typed/bus/v1alpha1/bus_client.go +++ b/pkg/client/clientset/versioned/typed/bus/v1alpha1/bus_client.go @@ -18,11 +18,11 @@ limitations under the License. package v1alpha1 import ( - "net/http" + http "net/http" rest "k8s.io/client-go/rest" - v1alpha1 "volcano.sh/apis/pkg/apis/bus/v1alpha1" - "volcano.sh/apis/pkg/client/clientset/versioned/scheme" + busv1alpha1 "volcano.sh/apis/pkg/apis/bus/v1alpha1" + scheme "volcano.sh/apis/pkg/client/clientset/versioned/scheme" ) type BusV1alpha1Interface interface { @@ -84,10 +84,10 @@ func New(c rest.Interface) *BusV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := busv1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/pkg/client/clientset/versioned/typed/bus/v1alpha1/command.go b/pkg/client/clientset/versioned/typed/bus/v1alpha1/command.go index 4fc2567..d0ef404 100644 --- a/pkg/client/clientset/versioned/typed/bus/v1alpha1/command.go +++ b/pkg/client/clientset/versioned/typed/bus/v1alpha1/command.go @@ -18,14 +18,14 @@ limitations under the License. package v1alpha1 import ( - "context" + context "context" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" gentype "k8s.io/client-go/gentype" - v1alpha1 "volcano.sh/apis/pkg/apis/bus/v1alpha1" - busv1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/bus/v1alpha1" + busv1alpha1 "volcano.sh/apis/pkg/apis/bus/v1alpha1" + applyconfigurationbusv1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/bus/v1alpha1" scheme "volcano.sh/apis/pkg/client/clientset/versioned/scheme" ) @@ -37,32 +37,33 @@ type CommandsGetter interface { // CommandInterface has methods to work with Command resources. type CommandInterface interface { - Create(ctx context.Context, command *v1alpha1.Command, opts v1.CreateOptions) (*v1alpha1.Command, error) - Update(ctx context.Context, command *v1alpha1.Command, opts v1.UpdateOptions) (*v1alpha1.Command, error) + Create(ctx context.Context, command *busv1alpha1.Command, opts v1.CreateOptions) (*busv1alpha1.Command, error) + Update(ctx context.Context, command *busv1alpha1.Command, opts v1.UpdateOptions) (*busv1alpha1.Command, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.Command, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.CommandList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*busv1alpha1.Command, error) + List(ctx context.Context, opts v1.ListOptions) (*busv1alpha1.CommandList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Command, err error) - Apply(ctx context.Context, command *busv1alpha1.CommandApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Command, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *busv1alpha1.Command, err error) + Apply(ctx context.Context, command *applyconfigurationbusv1alpha1.CommandApplyConfiguration, opts v1.ApplyOptions) (result *busv1alpha1.Command, err error) CommandExpansion } // commands implements CommandInterface type commands struct { - *gentype.ClientWithListAndApply[*v1alpha1.Command, *v1alpha1.CommandList, *busv1alpha1.CommandApplyConfiguration] + *gentype.ClientWithListAndApply[*busv1alpha1.Command, *busv1alpha1.CommandList, *applyconfigurationbusv1alpha1.CommandApplyConfiguration] } // newCommands returns a Commands func newCommands(c *BusV1alpha1Client, namespace string) *commands { return &commands{ - gentype.NewClientWithListAndApply[*v1alpha1.Command, *v1alpha1.CommandList, *busv1alpha1.CommandApplyConfiguration]( + gentype.NewClientWithListAndApply[*busv1alpha1.Command, *busv1alpha1.CommandList, *applyconfigurationbusv1alpha1.CommandApplyConfiguration]( "commands", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha1.Command { return &v1alpha1.Command{} }, - func() *v1alpha1.CommandList { return &v1alpha1.CommandList{} }), + func() *busv1alpha1.Command { return &busv1alpha1.Command{} }, + func() *busv1alpha1.CommandList { return &busv1alpha1.CommandList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/bus/v1alpha1/fake/fake_bus_client.go b/pkg/client/clientset/versioned/typed/bus/v1alpha1/fake/fake_bus_client.go index b4b61ff..0ea6458 100644 --- a/pkg/client/clientset/versioned/typed/bus/v1alpha1/fake/fake_bus_client.go +++ b/pkg/client/clientset/versioned/typed/bus/v1alpha1/fake/fake_bus_client.go @@ -28,7 +28,7 @@ type FakeBusV1alpha1 struct { } func (c *FakeBusV1alpha1) Commands(namespace string) v1alpha1.CommandInterface { - return &FakeCommands{c, namespace} + return newFakeCommands(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/pkg/client/clientset/versioned/typed/bus/v1alpha1/fake/fake_command.go b/pkg/client/clientset/versioned/typed/bus/v1alpha1/fake/fake_command.go index 0e3f07a..99d8d70 100644 --- a/pkg/client/clientset/versioned/typed/bus/v1alpha1/fake/fake_command.go +++ b/pkg/client/clientset/versioned/typed/bus/v1alpha1/fake/fake_command.go @@ -18,142 +18,33 @@ limitations under the License. package fake import ( - "context" - json "encoding/json" - "fmt" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + gentype "k8s.io/client-go/gentype" v1alpha1 "volcano.sh/apis/pkg/apis/bus/v1alpha1" busv1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/bus/v1alpha1" + typedbusv1alpha1 "volcano.sh/apis/pkg/client/clientset/versioned/typed/bus/v1alpha1" ) -// FakeCommands implements CommandInterface -type FakeCommands struct { +// fakeCommands implements CommandInterface +type fakeCommands struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.Command, *v1alpha1.CommandList, *busv1alpha1.CommandApplyConfiguration] Fake *FakeBusV1alpha1 - ns string } -var commandsResource = v1alpha1.SchemeGroupVersion.WithResource("commands") - -var commandsKind = v1alpha1.SchemeGroupVersion.WithKind("Command") - -// Get takes name of the command, and returns the corresponding command object, and an error if there is any. -func (c *FakeCommands) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Command, err error) { - emptyResult := &v1alpha1.Command{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(commandsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeCommands(fake *FakeBusV1alpha1, namespace string) typedbusv1alpha1.CommandInterface { + return &fakeCommands{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.Command, *v1alpha1.CommandList, *busv1alpha1.CommandApplyConfiguration]( + fake.Fake, + namespace, + v1alpha1.SchemeGroupVersion.WithResource("commands"), + v1alpha1.SchemeGroupVersion.WithKind("Command"), + func() *v1alpha1.Command { return &v1alpha1.Command{} }, + func() *v1alpha1.CommandList { return &v1alpha1.CommandList{} }, + func(dst, src *v1alpha1.CommandList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.CommandList) []*v1alpha1.Command { return gentype.ToPointerSlice(list.Items) }, + func(list *v1alpha1.CommandList, items []*v1alpha1.Command) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.Command), err -} - -// List takes label and field selectors, and returns the list of Commands that match those selectors. -func (c *FakeCommands) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CommandList, err error) { - emptyResult := &v1alpha1.CommandList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(commandsResource, commandsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.CommandList{ListMeta: obj.(*v1alpha1.CommandList).ListMeta} - for _, item := range obj.(*v1alpha1.CommandList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested commands. -func (c *FakeCommands) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(commandsResource, c.ns, opts)) - -} - -// Create takes the representation of a command and creates it. Returns the server's representation of the command, and an error, if there is any. -func (c *FakeCommands) Create(ctx context.Context, command *v1alpha1.Command, opts v1.CreateOptions) (result *v1alpha1.Command, err error) { - emptyResult := &v1alpha1.Command{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(commandsResource, c.ns, command, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Command), err -} - -// Update takes the representation of a command and updates it. Returns the server's representation of the command, and an error, if there is any. -func (c *FakeCommands) Update(ctx context.Context, command *v1alpha1.Command, opts v1.UpdateOptions) (result *v1alpha1.Command, err error) { - emptyResult := &v1alpha1.Command{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(commandsResource, c.ns, command, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Command), err -} - -// Delete takes name of the command and deletes it. Returns an error if one occurs. -func (c *FakeCommands) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(commandsResource, c.ns, name, opts), &v1alpha1.Command{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCommands) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(commandsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.CommandList{}) - return err -} - -// Patch applies the patch and returns the patched command. -func (c *FakeCommands) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Command, err error) { - emptyResult := &v1alpha1.Command{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(commandsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Command), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied command. -func (c *FakeCommands) Apply(ctx context.Context, command *busv1alpha1.CommandApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Command, err error) { - if command == nil { - return nil, fmt.Errorf("command provided to Apply must not be nil") - } - data, err := json.Marshal(command) - if err != nil { - return nil, err - } - name := command.Name - if name == nil { - return nil, fmt.Errorf("command.Name must be provided to Apply") - } - emptyResult := &v1alpha1.Command{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(commandsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Command), err } diff --git a/pkg/client/clientset/versioned/typed/flow/v1alpha1/fake/fake_flow_client.go b/pkg/client/clientset/versioned/typed/flow/v1alpha1/fake/fake_flow_client.go index 752261d..310ad64 100644 --- a/pkg/client/clientset/versioned/typed/flow/v1alpha1/fake/fake_flow_client.go +++ b/pkg/client/clientset/versioned/typed/flow/v1alpha1/fake/fake_flow_client.go @@ -28,11 +28,11 @@ type FakeFlowV1alpha1 struct { } func (c *FakeFlowV1alpha1) JobFlows(namespace string) v1alpha1.JobFlowInterface { - return &FakeJobFlows{c, namespace} + return newFakeJobFlows(c, namespace) } func (c *FakeFlowV1alpha1) JobTemplates(namespace string) v1alpha1.JobTemplateInterface { - return &FakeJobTemplates{c, namespace} + return newFakeJobTemplates(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/pkg/client/clientset/versioned/typed/flow/v1alpha1/fake/fake_jobflow.go b/pkg/client/clientset/versioned/typed/flow/v1alpha1/fake/fake_jobflow.go index f2c4b82..eb4c3c7 100644 --- a/pkg/client/clientset/versioned/typed/flow/v1alpha1/fake/fake_jobflow.go +++ b/pkg/client/clientset/versioned/typed/flow/v1alpha1/fake/fake_jobflow.go @@ -18,179 +18,33 @@ limitations under the License. package fake import ( - "context" - json "encoding/json" - "fmt" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + gentype "k8s.io/client-go/gentype" v1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" flowv1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/flow/v1alpha1" + typedflowv1alpha1 "volcano.sh/apis/pkg/client/clientset/versioned/typed/flow/v1alpha1" ) -// FakeJobFlows implements JobFlowInterface -type FakeJobFlows struct { +// fakeJobFlows implements JobFlowInterface +type fakeJobFlows struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.JobFlow, *v1alpha1.JobFlowList, *flowv1alpha1.JobFlowApplyConfiguration] Fake *FakeFlowV1alpha1 - ns string } -var jobflowsResource = v1alpha1.SchemeGroupVersion.WithResource("jobflows") - -var jobflowsKind = v1alpha1.SchemeGroupVersion.WithKind("JobFlow") - -// Get takes name of the jobFlow, and returns the corresponding jobFlow object, and an error if there is any. -func (c *FakeJobFlows) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.JobFlow, err error) { - emptyResult := &v1alpha1.JobFlow{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(jobflowsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeJobFlows(fake *FakeFlowV1alpha1, namespace string) typedflowv1alpha1.JobFlowInterface { + return &fakeJobFlows{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.JobFlow, *v1alpha1.JobFlowList, *flowv1alpha1.JobFlowApplyConfiguration]( + fake.Fake, + namespace, + v1alpha1.SchemeGroupVersion.WithResource("jobflows"), + v1alpha1.SchemeGroupVersion.WithKind("JobFlow"), + func() *v1alpha1.JobFlow { return &v1alpha1.JobFlow{} }, + func() *v1alpha1.JobFlowList { return &v1alpha1.JobFlowList{} }, + func(dst, src *v1alpha1.JobFlowList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.JobFlowList) []*v1alpha1.JobFlow { return gentype.ToPointerSlice(list.Items) }, + func(list *v1alpha1.JobFlowList, items []*v1alpha1.JobFlow) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.JobFlow), err -} - -// List takes label and field selectors, and returns the list of JobFlows that match those selectors. -func (c *FakeJobFlows) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.JobFlowList, err error) { - emptyResult := &v1alpha1.JobFlowList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(jobflowsResource, jobflowsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.JobFlowList{ListMeta: obj.(*v1alpha1.JobFlowList).ListMeta} - for _, item := range obj.(*v1alpha1.JobFlowList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested jobFlows. -func (c *FakeJobFlows) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(jobflowsResource, c.ns, opts)) - -} - -// Create takes the representation of a jobFlow and creates it. Returns the server's representation of the jobFlow, and an error, if there is any. -func (c *FakeJobFlows) Create(ctx context.Context, jobFlow *v1alpha1.JobFlow, opts v1.CreateOptions) (result *v1alpha1.JobFlow, err error) { - emptyResult := &v1alpha1.JobFlow{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(jobflowsResource, c.ns, jobFlow, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.JobFlow), err -} - -// Update takes the representation of a jobFlow and updates it. Returns the server's representation of the jobFlow, and an error, if there is any. -func (c *FakeJobFlows) Update(ctx context.Context, jobFlow *v1alpha1.JobFlow, opts v1.UpdateOptions) (result *v1alpha1.JobFlow, err error) { - emptyResult := &v1alpha1.JobFlow{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(jobflowsResource, c.ns, jobFlow, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.JobFlow), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeJobFlows) UpdateStatus(ctx context.Context, jobFlow *v1alpha1.JobFlow, opts v1.UpdateOptions) (result *v1alpha1.JobFlow, err error) { - emptyResult := &v1alpha1.JobFlow{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(jobflowsResource, "status", c.ns, jobFlow, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.JobFlow), err -} - -// Delete takes name of the jobFlow and deletes it. Returns an error if one occurs. -func (c *FakeJobFlows) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(jobflowsResource, c.ns, name, opts), &v1alpha1.JobFlow{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeJobFlows) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(jobflowsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.JobFlowList{}) - return err -} - -// Patch applies the patch and returns the patched jobFlow. -func (c *FakeJobFlows) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.JobFlow, err error) { - emptyResult := &v1alpha1.JobFlow{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(jobflowsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.JobFlow), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied jobFlow. -func (c *FakeJobFlows) Apply(ctx context.Context, jobFlow *flowv1alpha1.JobFlowApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.JobFlow, err error) { - if jobFlow == nil { - return nil, fmt.Errorf("jobFlow provided to Apply must not be nil") - } - data, err := json.Marshal(jobFlow) - if err != nil { - return nil, err - } - name := jobFlow.Name - if name == nil { - return nil, fmt.Errorf("jobFlow.Name must be provided to Apply") - } - emptyResult := &v1alpha1.JobFlow{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(jobflowsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.JobFlow), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeJobFlows) ApplyStatus(ctx context.Context, jobFlow *flowv1alpha1.JobFlowApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.JobFlow, err error) { - if jobFlow == nil { - return nil, fmt.Errorf("jobFlow provided to Apply must not be nil") - } - data, err := json.Marshal(jobFlow) - if err != nil { - return nil, err - } - name := jobFlow.Name - if name == nil { - return nil, fmt.Errorf("jobFlow.Name must be provided to Apply") - } - emptyResult := &v1alpha1.JobFlow{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(jobflowsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.JobFlow), err } diff --git a/pkg/client/clientset/versioned/typed/flow/v1alpha1/fake/fake_jobtemplate.go b/pkg/client/clientset/versioned/typed/flow/v1alpha1/fake/fake_jobtemplate.go index 6ba2b5f..6462c4d 100644 --- a/pkg/client/clientset/versioned/typed/flow/v1alpha1/fake/fake_jobtemplate.go +++ b/pkg/client/clientset/versioned/typed/flow/v1alpha1/fake/fake_jobtemplate.go @@ -18,179 +18,35 @@ limitations under the License. package fake import ( - "context" - json "encoding/json" - "fmt" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + gentype "k8s.io/client-go/gentype" v1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" flowv1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/flow/v1alpha1" + typedflowv1alpha1 "volcano.sh/apis/pkg/client/clientset/versioned/typed/flow/v1alpha1" ) -// FakeJobTemplates implements JobTemplateInterface -type FakeJobTemplates struct { +// fakeJobTemplates implements JobTemplateInterface +type fakeJobTemplates struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.JobTemplate, *v1alpha1.JobTemplateList, *flowv1alpha1.JobTemplateApplyConfiguration] Fake *FakeFlowV1alpha1 - ns string } -var jobtemplatesResource = v1alpha1.SchemeGroupVersion.WithResource("jobtemplates") - -var jobtemplatesKind = v1alpha1.SchemeGroupVersion.WithKind("JobTemplate") - -// Get takes name of the jobTemplate, and returns the corresponding jobTemplate object, and an error if there is any. -func (c *FakeJobTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.JobTemplate, err error) { - emptyResult := &v1alpha1.JobTemplate{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(jobtemplatesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeJobTemplates(fake *FakeFlowV1alpha1, namespace string) typedflowv1alpha1.JobTemplateInterface { + return &fakeJobTemplates{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.JobTemplate, *v1alpha1.JobTemplateList, *flowv1alpha1.JobTemplateApplyConfiguration]( + fake.Fake, + namespace, + v1alpha1.SchemeGroupVersion.WithResource("jobtemplates"), + v1alpha1.SchemeGroupVersion.WithKind("JobTemplate"), + func() *v1alpha1.JobTemplate { return &v1alpha1.JobTemplate{} }, + func() *v1alpha1.JobTemplateList { return &v1alpha1.JobTemplateList{} }, + func(dst, src *v1alpha1.JobTemplateList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.JobTemplateList) []*v1alpha1.JobTemplate { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.JobTemplateList, items []*v1alpha1.JobTemplate) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.JobTemplate), err -} - -// List takes label and field selectors, and returns the list of JobTemplates that match those selectors. -func (c *FakeJobTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.JobTemplateList, err error) { - emptyResult := &v1alpha1.JobTemplateList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(jobtemplatesResource, jobtemplatesKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.JobTemplateList{ListMeta: obj.(*v1alpha1.JobTemplateList).ListMeta} - for _, item := range obj.(*v1alpha1.JobTemplateList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested jobTemplates. -func (c *FakeJobTemplates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(jobtemplatesResource, c.ns, opts)) - -} - -// Create takes the representation of a jobTemplate and creates it. Returns the server's representation of the jobTemplate, and an error, if there is any. -func (c *FakeJobTemplates) Create(ctx context.Context, jobTemplate *v1alpha1.JobTemplate, opts v1.CreateOptions) (result *v1alpha1.JobTemplate, err error) { - emptyResult := &v1alpha1.JobTemplate{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(jobtemplatesResource, c.ns, jobTemplate, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.JobTemplate), err -} - -// Update takes the representation of a jobTemplate and updates it. Returns the server's representation of the jobTemplate, and an error, if there is any. -func (c *FakeJobTemplates) Update(ctx context.Context, jobTemplate *v1alpha1.JobTemplate, opts v1.UpdateOptions) (result *v1alpha1.JobTemplate, err error) { - emptyResult := &v1alpha1.JobTemplate{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(jobtemplatesResource, c.ns, jobTemplate, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.JobTemplate), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeJobTemplates) UpdateStatus(ctx context.Context, jobTemplate *v1alpha1.JobTemplate, opts v1.UpdateOptions) (result *v1alpha1.JobTemplate, err error) { - emptyResult := &v1alpha1.JobTemplate{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(jobtemplatesResource, "status", c.ns, jobTemplate, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.JobTemplate), err -} - -// Delete takes name of the jobTemplate and deletes it. Returns an error if one occurs. -func (c *FakeJobTemplates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(jobtemplatesResource, c.ns, name, opts), &v1alpha1.JobTemplate{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeJobTemplates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(jobtemplatesResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.JobTemplateList{}) - return err -} - -// Patch applies the patch and returns the patched jobTemplate. -func (c *FakeJobTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.JobTemplate, err error) { - emptyResult := &v1alpha1.JobTemplate{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(jobtemplatesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.JobTemplate), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied jobTemplate. -func (c *FakeJobTemplates) Apply(ctx context.Context, jobTemplate *flowv1alpha1.JobTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.JobTemplate, err error) { - if jobTemplate == nil { - return nil, fmt.Errorf("jobTemplate provided to Apply must not be nil") - } - data, err := json.Marshal(jobTemplate) - if err != nil { - return nil, err - } - name := jobTemplate.Name - if name == nil { - return nil, fmt.Errorf("jobTemplate.Name must be provided to Apply") - } - emptyResult := &v1alpha1.JobTemplate{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(jobtemplatesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.JobTemplate), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeJobTemplates) ApplyStatus(ctx context.Context, jobTemplate *flowv1alpha1.JobTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.JobTemplate, err error) { - if jobTemplate == nil { - return nil, fmt.Errorf("jobTemplate provided to Apply must not be nil") - } - data, err := json.Marshal(jobTemplate) - if err != nil { - return nil, err - } - name := jobTemplate.Name - if name == nil { - return nil, fmt.Errorf("jobTemplate.Name must be provided to Apply") - } - emptyResult := &v1alpha1.JobTemplate{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(jobtemplatesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.JobTemplate), err } diff --git a/pkg/client/clientset/versioned/typed/flow/v1alpha1/flow_client.go b/pkg/client/clientset/versioned/typed/flow/v1alpha1/flow_client.go index c25f0a6..905bd83 100644 --- a/pkg/client/clientset/versioned/typed/flow/v1alpha1/flow_client.go +++ b/pkg/client/clientset/versioned/typed/flow/v1alpha1/flow_client.go @@ -18,11 +18,11 @@ limitations under the License. package v1alpha1 import ( - "net/http" + http "net/http" rest "k8s.io/client-go/rest" - v1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" - "volcano.sh/apis/pkg/client/clientset/versioned/scheme" + flowv1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" + scheme "volcano.sh/apis/pkg/client/clientset/versioned/scheme" ) type FlowV1alpha1Interface interface { @@ -89,10 +89,10 @@ func New(c rest.Interface) *FlowV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := flowv1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/pkg/client/clientset/versioned/typed/flow/v1alpha1/jobflow.go b/pkg/client/clientset/versioned/typed/flow/v1alpha1/jobflow.go index 2b49d8e..95f1fb2 100644 --- a/pkg/client/clientset/versioned/typed/flow/v1alpha1/jobflow.go +++ b/pkg/client/clientset/versioned/typed/flow/v1alpha1/jobflow.go @@ -18,14 +18,14 @@ limitations under the License. package v1alpha1 import ( - "context" + context "context" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" gentype "k8s.io/client-go/gentype" - v1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" - flowv1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/flow/v1alpha1" + flowv1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" + applyconfigurationflowv1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/flow/v1alpha1" scheme "volcano.sh/apis/pkg/client/clientset/versioned/scheme" ) @@ -37,36 +37,37 @@ type JobFlowsGetter interface { // JobFlowInterface has methods to work with JobFlow resources. type JobFlowInterface interface { - Create(ctx context.Context, jobFlow *v1alpha1.JobFlow, opts v1.CreateOptions) (*v1alpha1.JobFlow, error) - Update(ctx context.Context, jobFlow *v1alpha1.JobFlow, opts v1.UpdateOptions) (*v1alpha1.JobFlow, error) + Create(ctx context.Context, jobFlow *flowv1alpha1.JobFlow, opts v1.CreateOptions) (*flowv1alpha1.JobFlow, error) + Update(ctx context.Context, jobFlow *flowv1alpha1.JobFlow, opts v1.UpdateOptions) (*flowv1alpha1.JobFlow, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, jobFlow *v1alpha1.JobFlow, opts v1.UpdateOptions) (*v1alpha1.JobFlow, error) + UpdateStatus(ctx context.Context, jobFlow *flowv1alpha1.JobFlow, opts v1.UpdateOptions) (*flowv1alpha1.JobFlow, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.JobFlow, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.JobFlowList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*flowv1alpha1.JobFlow, error) + List(ctx context.Context, opts v1.ListOptions) (*flowv1alpha1.JobFlowList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.JobFlow, err error) - Apply(ctx context.Context, jobFlow *flowv1alpha1.JobFlowApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.JobFlow, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *flowv1alpha1.JobFlow, err error) + Apply(ctx context.Context, jobFlow *applyconfigurationflowv1alpha1.JobFlowApplyConfiguration, opts v1.ApplyOptions) (result *flowv1alpha1.JobFlow, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, jobFlow *flowv1alpha1.JobFlowApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.JobFlow, err error) + ApplyStatus(ctx context.Context, jobFlow *applyconfigurationflowv1alpha1.JobFlowApplyConfiguration, opts v1.ApplyOptions) (result *flowv1alpha1.JobFlow, err error) JobFlowExpansion } // jobFlows implements JobFlowInterface type jobFlows struct { - *gentype.ClientWithListAndApply[*v1alpha1.JobFlow, *v1alpha1.JobFlowList, *flowv1alpha1.JobFlowApplyConfiguration] + *gentype.ClientWithListAndApply[*flowv1alpha1.JobFlow, *flowv1alpha1.JobFlowList, *applyconfigurationflowv1alpha1.JobFlowApplyConfiguration] } // newJobFlows returns a JobFlows func newJobFlows(c *FlowV1alpha1Client, namespace string) *jobFlows { return &jobFlows{ - gentype.NewClientWithListAndApply[*v1alpha1.JobFlow, *v1alpha1.JobFlowList, *flowv1alpha1.JobFlowApplyConfiguration]( + gentype.NewClientWithListAndApply[*flowv1alpha1.JobFlow, *flowv1alpha1.JobFlowList, *applyconfigurationflowv1alpha1.JobFlowApplyConfiguration]( "jobflows", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha1.JobFlow { return &v1alpha1.JobFlow{} }, - func() *v1alpha1.JobFlowList { return &v1alpha1.JobFlowList{} }), + func() *flowv1alpha1.JobFlow { return &flowv1alpha1.JobFlow{} }, + func() *flowv1alpha1.JobFlowList { return &flowv1alpha1.JobFlowList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/flow/v1alpha1/jobtemplate.go b/pkg/client/clientset/versioned/typed/flow/v1alpha1/jobtemplate.go index ef4a35d..9b0f9ee 100644 --- a/pkg/client/clientset/versioned/typed/flow/v1alpha1/jobtemplate.go +++ b/pkg/client/clientset/versioned/typed/flow/v1alpha1/jobtemplate.go @@ -18,14 +18,14 @@ limitations under the License. package v1alpha1 import ( - "context" + context "context" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" gentype "k8s.io/client-go/gentype" - v1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" - flowv1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/flow/v1alpha1" + flowv1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" + applyconfigurationflowv1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/flow/v1alpha1" scheme "volcano.sh/apis/pkg/client/clientset/versioned/scheme" ) @@ -37,36 +37,37 @@ type JobTemplatesGetter interface { // JobTemplateInterface has methods to work with JobTemplate resources. type JobTemplateInterface interface { - Create(ctx context.Context, jobTemplate *v1alpha1.JobTemplate, opts v1.CreateOptions) (*v1alpha1.JobTemplate, error) - Update(ctx context.Context, jobTemplate *v1alpha1.JobTemplate, opts v1.UpdateOptions) (*v1alpha1.JobTemplate, error) + Create(ctx context.Context, jobTemplate *flowv1alpha1.JobTemplate, opts v1.CreateOptions) (*flowv1alpha1.JobTemplate, error) + Update(ctx context.Context, jobTemplate *flowv1alpha1.JobTemplate, opts v1.UpdateOptions) (*flowv1alpha1.JobTemplate, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, jobTemplate *v1alpha1.JobTemplate, opts v1.UpdateOptions) (*v1alpha1.JobTemplate, error) + UpdateStatus(ctx context.Context, jobTemplate *flowv1alpha1.JobTemplate, opts v1.UpdateOptions) (*flowv1alpha1.JobTemplate, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.JobTemplate, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.JobTemplateList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*flowv1alpha1.JobTemplate, error) + List(ctx context.Context, opts v1.ListOptions) (*flowv1alpha1.JobTemplateList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.JobTemplate, err error) - Apply(ctx context.Context, jobTemplate *flowv1alpha1.JobTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.JobTemplate, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *flowv1alpha1.JobTemplate, err error) + Apply(ctx context.Context, jobTemplate *applyconfigurationflowv1alpha1.JobTemplateApplyConfiguration, opts v1.ApplyOptions) (result *flowv1alpha1.JobTemplate, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, jobTemplate *flowv1alpha1.JobTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.JobTemplate, err error) + ApplyStatus(ctx context.Context, jobTemplate *applyconfigurationflowv1alpha1.JobTemplateApplyConfiguration, opts v1.ApplyOptions) (result *flowv1alpha1.JobTemplate, err error) JobTemplateExpansion } // jobTemplates implements JobTemplateInterface type jobTemplates struct { - *gentype.ClientWithListAndApply[*v1alpha1.JobTemplate, *v1alpha1.JobTemplateList, *flowv1alpha1.JobTemplateApplyConfiguration] + *gentype.ClientWithListAndApply[*flowv1alpha1.JobTemplate, *flowv1alpha1.JobTemplateList, *applyconfigurationflowv1alpha1.JobTemplateApplyConfiguration] } // newJobTemplates returns a JobTemplates func newJobTemplates(c *FlowV1alpha1Client, namespace string) *jobTemplates { return &jobTemplates{ - gentype.NewClientWithListAndApply[*v1alpha1.JobTemplate, *v1alpha1.JobTemplateList, *flowv1alpha1.JobTemplateApplyConfiguration]( + gentype.NewClientWithListAndApply[*flowv1alpha1.JobTemplate, *flowv1alpha1.JobTemplateList, *applyconfigurationflowv1alpha1.JobTemplateApplyConfiguration]( "jobtemplates", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha1.JobTemplate { return &v1alpha1.JobTemplate{} }, - func() *v1alpha1.JobTemplateList { return &v1alpha1.JobTemplateList{} }), + func() *flowv1alpha1.JobTemplate { return &flowv1alpha1.JobTemplate{} }, + func() *flowv1alpha1.JobTemplateList { return &flowv1alpha1.JobTemplateList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/fake/fake_nodeinfo_client.go b/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/fake/fake_nodeinfo_client.go index b9dc724..4a76119 100644 --- a/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/fake/fake_nodeinfo_client.go +++ b/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/fake/fake_nodeinfo_client.go @@ -28,7 +28,7 @@ type FakeNodeinfoV1alpha1 struct { } func (c *FakeNodeinfoV1alpha1) Numatopologies() v1alpha1.NumatopologyInterface { - return &FakeNumatopologies{c} + return newFakeNumatopologies(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/fake/fake_numatopology.go b/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/fake/fake_numatopology.go index eecb2b9..73a328f 100644 --- a/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/fake/fake_numatopology.go +++ b/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/fake/fake_numatopology.go @@ -18,133 +18,35 @@ limitations under the License. package fake import ( - "context" - json "encoding/json" - "fmt" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + gentype "k8s.io/client-go/gentype" v1alpha1 "volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" nodeinfov1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/nodeinfo/v1alpha1" + typednodeinfov1alpha1 "volcano.sh/apis/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1" ) -// FakeNumatopologies implements NumatopologyInterface -type FakeNumatopologies struct { +// fakeNumatopologies implements NumatopologyInterface +type fakeNumatopologies struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.Numatopology, *v1alpha1.NumatopologyList, *nodeinfov1alpha1.NumatopologyApplyConfiguration] Fake *FakeNodeinfoV1alpha1 } -var numatopologiesResource = v1alpha1.SchemeGroupVersion.WithResource("numatopologies") - -var numatopologiesKind = v1alpha1.SchemeGroupVersion.WithKind("Numatopology") - -// Get takes name of the numatopology, and returns the corresponding numatopology object, and an error if there is any. -func (c *FakeNumatopologies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Numatopology, err error) { - emptyResult := &v1alpha1.Numatopology{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(numatopologiesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeNumatopologies(fake *FakeNodeinfoV1alpha1) typednodeinfov1alpha1.NumatopologyInterface { + return &fakeNumatopologies{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.Numatopology, *v1alpha1.NumatopologyList, *nodeinfov1alpha1.NumatopologyApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("numatopologies"), + v1alpha1.SchemeGroupVersion.WithKind("Numatopology"), + func() *v1alpha1.Numatopology { return &v1alpha1.Numatopology{} }, + func() *v1alpha1.NumatopologyList { return &v1alpha1.NumatopologyList{} }, + func(dst, src *v1alpha1.NumatopologyList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.NumatopologyList) []*v1alpha1.Numatopology { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.NumatopologyList, items []*v1alpha1.Numatopology) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.Numatopology), err -} - -// List takes label and field selectors, and returns the list of Numatopologies that match those selectors. -func (c *FakeNumatopologies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.NumatopologyList, err error) { - emptyResult := &v1alpha1.NumatopologyList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(numatopologiesResource, numatopologiesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.NumatopologyList{ListMeta: obj.(*v1alpha1.NumatopologyList).ListMeta} - for _, item := range obj.(*v1alpha1.NumatopologyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested numatopologies. -func (c *FakeNumatopologies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(numatopologiesResource, opts)) -} - -// Create takes the representation of a numatopology and creates it. Returns the server's representation of the numatopology, and an error, if there is any. -func (c *FakeNumatopologies) Create(ctx context.Context, numatopology *v1alpha1.Numatopology, opts v1.CreateOptions) (result *v1alpha1.Numatopology, err error) { - emptyResult := &v1alpha1.Numatopology{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(numatopologiesResource, numatopology, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Numatopology), err -} - -// Update takes the representation of a numatopology and updates it. Returns the server's representation of the numatopology, and an error, if there is any. -func (c *FakeNumatopologies) Update(ctx context.Context, numatopology *v1alpha1.Numatopology, opts v1.UpdateOptions) (result *v1alpha1.Numatopology, err error) { - emptyResult := &v1alpha1.Numatopology{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(numatopologiesResource, numatopology, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Numatopology), err -} - -// Delete takes name of the numatopology and deletes it. Returns an error if one occurs. -func (c *FakeNumatopologies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(numatopologiesResource, name, opts), &v1alpha1.Numatopology{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeNumatopologies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(numatopologiesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.NumatopologyList{}) - return err -} - -// Patch applies the patch and returns the patched numatopology. -func (c *FakeNumatopologies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Numatopology, err error) { - emptyResult := &v1alpha1.Numatopology{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(numatopologiesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Numatopology), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied numatopology. -func (c *FakeNumatopologies) Apply(ctx context.Context, numatopology *nodeinfov1alpha1.NumatopologyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Numatopology, err error) { - if numatopology == nil { - return nil, fmt.Errorf("numatopology provided to Apply must not be nil") - } - data, err := json.Marshal(numatopology) - if err != nil { - return nil, err - } - name := numatopology.Name - if name == nil { - return nil, fmt.Errorf("numatopology.Name must be provided to Apply") - } - emptyResult := &v1alpha1.Numatopology{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(numatopologiesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Numatopology), err } diff --git a/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/nodeinfo_client.go b/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/nodeinfo_client.go index b9195f2..dd014c79f 100644 --- a/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/nodeinfo_client.go +++ b/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/nodeinfo_client.go @@ -18,11 +18,11 @@ limitations under the License. package v1alpha1 import ( - "net/http" + http "net/http" rest "k8s.io/client-go/rest" - v1alpha1 "volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" - "volcano.sh/apis/pkg/client/clientset/versioned/scheme" + nodeinfov1alpha1 "volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" + scheme "volcano.sh/apis/pkg/client/clientset/versioned/scheme" ) type NodeinfoV1alpha1Interface interface { @@ -84,10 +84,10 @@ func New(c rest.Interface) *NodeinfoV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := nodeinfov1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/numatopology.go b/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/numatopology.go index 6b0a8ae..04fde16 100644 --- a/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/numatopology.go +++ b/pkg/client/clientset/versioned/typed/nodeinfo/v1alpha1/numatopology.go @@ -18,14 +18,14 @@ limitations under the License. package v1alpha1 import ( - "context" + context "context" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" gentype "k8s.io/client-go/gentype" - v1alpha1 "volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" - nodeinfov1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/nodeinfo/v1alpha1" + nodeinfov1alpha1 "volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" + applyconfigurationnodeinfov1alpha1 "volcano.sh/apis/pkg/client/applyconfiguration/nodeinfo/v1alpha1" scheme "volcano.sh/apis/pkg/client/clientset/versioned/scheme" ) @@ -37,32 +37,33 @@ type NumatopologiesGetter interface { // NumatopologyInterface has methods to work with Numatopology resources. type NumatopologyInterface interface { - Create(ctx context.Context, numatopology *v1alpha1.Numatopology, opts v1.CreateOptions) (*v1alpha1.Numatopology, error) - Update(ctx context.Context, numatopology *v1alpha1.Numatopology, opts v1.UpdateOptions) (*v1alpha1.Numatopology, error) + Create(ctx context.Context, numatopology *nodeinfov1alpha1.Numatopology, opts v1.CreateOptions) (*nodeinfov1alpha1.Numatopology, error) + Update(ctx context.Context, numatopology *nodeinfov1alpha1.Numatopology, opts v1.UpdateOptions) (*nodeinfov1alpha1.Numatopology, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.Numatopology, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.NumatopologyList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*nodeinfov1alpha1.Numatopology, error) + List(ctx context.Context, opts v1.ListOptions) (*nodeinfov1alpha1.NumatopologyList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Numatopology, err error) - Apply(ctx context.Context, numatopology *nodeinfov1alpha1.NumatopologyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Numatopology, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *nodeinfov1alpha1.Numatopology, err error) + Apply(ctx context.Context, numatopology *applyconfigurationnodeinfov1alpha1.NumatopologyApplyConfiguration, opts v1.ApplyOptions) (result *nodeinfov1alpha1.Numatopology, err error) NumatopologyExpansion } // numatopologies implements NumatopologyInterface type numatopologies struct { - *gentype.ClientWithListAndApply[*v1alpha1.Numatopology, *v1alpha1.NumatopologyList, *nodeinfov1alpha1.NumatopologyApplyConfiguration] + *gentype.ClientWithListAndApply[*nodeinfov1alpha1.Numatopology, *nodeinfov1alpha1.NumatopologyList, *applyconfigurationnodeinfov1alpha1.NumatopologyApplyConfiguration] } // newNumatopologies returns a Numatopologies func newNumatopologies(c *NodeinfoV1alpha1Client) *numatopologies { return &numatopologies{ - gentype.NewClientWithListAndApply[*v1alpha1.Numatopology, *v1alpha1.NumatopologyList, *nodeinfov1alpha1.NumatopologyApplyConfiguration]( + gentype.NewClientWithListAndApply[*nodeinfov1alpha1.Numatopology, *nodeinfov1alpha1.NumatopologyList, *applyconfigurationnodeinfov1alpha1.NumatopologyApplyConfiguration]( "numatopologies", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha1.Numatopology { return &v1alpha1.Numatopology{} }, - func() *v1alpha1.NumatopologyList { return &v1alpha1.NumatopologyList{} }), + func() *nodeinfov1alpha1.Numatopology { return &nodeinfov1alpha1.Numatopology{} }, + func() *nodeinfov1alpha1.NumatopologyList { return &nodeinfov1alpha1.NumatopologyList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/scheduling/v1beta1/fake/fake_podgroup.go b/pkg/client/clientset/versioned/typed/scheduling/v1beta1/fake/fake_podgroup.go index 787aa02..abaa801 100644 --- a/pkg/client/clientset/versioned/typed/scheduling/v1beta1/fake/fake_podgroup.go +++ b/pkg/client/clientset/versioned/typed/scheduling/v1beta1/fake/fake_podgroup.go @@ -18,179 +18,33 @@ limitations under the License. package fake import ( - "context" - json "encoding/json" - "fmt" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + gentype "k8s.io/client-go/gentype" v1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" schedulingv1beta1 "volcano.sh/apis/pkg/client/applyconfiguration/scheduling/v1beta1" + typedschedulingv1beta1 "volcano.sh/apis/pkg/client/clientset/versioned/typed/scheduling/v1beta1" ) -// FakePodGroups implements PodGroupInterface -type FakePodGroups struct { +// fakePodGroups implements PodGroupInterface +type fakePodGroups struct { + *gentype.FakeClientWithListAndApply[*v1beta1.PodGroup, *v1beta1.PodGroupList, *schedulingv1beta1.PodGroupApplyConfiguration] Fake *FakeSchedulingV1beta1 - ns string } -var podgroupsResource = v1beta1.SchemeGroupVersion.WithResource("podgroups") - -var podgroupsKind = v1beta1.SchemeGroupVersion.WithKind("PodGroup") - -// Get takes name of the podGroup, and returns the corresponding podGroup object, and an error if there is any. -func (c *FakePodGroups) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodGroup, err error) { - emptyResult := &v1beta1.PodGroup{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(podgroupsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakePodGroups(fake *FakeSchedulingV1beta1, namespace string) typedschedulingv1beta1.PodGroupInterface { + return &fakePodGroups{ + gentype.NewFakeClientWithListAndApply[*v1beta1.PodGroup, *v1beta1.PodGroupList, *schedulingv1beta1.PodGroupApplyConfiguration]( + fake.Fake, + namespace, + v1beta1.SchemeGroupVersion.WithResource("podgroups"), + v1beta1.SchemeGroupVersion.WithKind("PodGroup"), + func() *v1beta1.PodGroup { return &v1beta1.PodGroup{} }, + func() *v1beta1.PodGroupList { return &v1beta1.PodGroupList{} }, + func(dst, src *v1beta1.PodGroupList) { dst.ListMeta = src.ListMeta }, + func(list *v1beta1.PodGroupList) []*v1beta1.PodGroup { return gentype.ToPointerSlice(list.Items) }, + func(list *v1beta1.PodGroupList, items []*v1beta1.PodGroup) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1beta1.PodGroup), err -} - -// List takes label and field selectors, and returns the list of PodGroups that match those selectors. -func (c *FakePodGroups) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodGroupList, err error) { - emptyResult := &v1beta1.PodGroupList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(podgroupsResource, podgroupsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1beta1.PodGroupList{ListMeta: obj.(*v1beta1.PodGroupList).ListMeta} - for _, item := range obj.(*v1beta1.PodGroupList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested podGroups. -func (c *FakePodGroups) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(podgroupsResource, c.ns, opts)) - -} - -// Create takes the representation of a podGroup and creates it. Returns the server's representation of the podGroup, and an error, if there is any. -func (c *FakePodGroups) Create(ctx context.Context, podGroup *v1beta1.PodGroup, opts v1.CreateOptions) (result *v1beta1.PodGroup, err error) { - emptyResult := &v1beta1.PodGroup{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(podgroupsResource, c.ns, podGroup, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.PodGroup), err -} - -// Update takes the representation of a podGroup and updates it. Returns the server's representation of the podGroup, and an error, if there is any. -func (c *FakePodGroups) Update(ctx context.Context, podGroup *v1beta1.PodGroup, opts v1.UpdateOptions) (result *v1beta1.PodGroup, err error) { - emptyResult := &v1beta1.PodGroup{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(podgroupsResource, c.ns, podGroup, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.PodGroup), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePodGroups) UpdateStatus(ctx context.Context, podGroup *v1beta1.PodGroup, opts v1.UpdateOptions) (result *v1beta1.PodGroup, err error) { - emptyResult := &v1beta1.PodGroup{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(podgroupsResource, "status", c.ns, podGroup, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.PodGroup), err -} - -// Delete takes name of the podGroup and deletes it. Returns an error if one occurs. -func (c *FakePodGroups) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(podgroupsResource, c.ns, name, opts), &v1beta1.PodGroup{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakePodGroups) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(podgroupsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1beta1.PodGroupList{}) - return err -} - -// Patch applies the patch and returns the patched podGroup. -func (c *FakePodGroups) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodGroup, err error) { - emptyResult := &v1beta1.PodGroup{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(podgroupsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.PodGroup), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied podGroup. -func (c *FakePodGroups) Apply(ctx context.Context, podGroup *schedulingv1beta1.PodGroupApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PodGroup, err error) { - if podGroup == nil { - return nil, fmt.Errorf("podGroup provided to Apply must not be nil") - } - data, err := json.Marshal(podGroup) - if err != nil { - return nil, err - } - name := podGroup.Name - if name == nil { - return nil, fmt.Errorf("podGroup.Name must be provided to Apply") - } - emptyResult := &v1beta1.PodGroup{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(podgroupsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.PodGroup), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakePodGroups) ApplyStatus(ctx context.Context, podGroup *schedulingv1beta1.PodGroupApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PodGroup, err error) { - if podGroup == nil { - return nil, fmt.Errorf("podGroup provided to Apply must not be nil") - } - data, err := json.Marshal(podGroup) - if err != nil { - return nil, err - } - name := podGroup.Name - if name == nil { - return nil, fmt.Errorf("podGroup.Name must be provided to Apply") - } - emptyResult := &v1beta1.PodGroup{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(podgroupsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.PodGroup), err } diff --git a/pkg/client/clientset/versioned/typed/scheduling/v1beta1/fake/fake_queue.go b/pkg/client/clientset/versioned/typed/scheduling/v1beta1/fake/fake_queue.go index 429ce90..9e17ae8 100644 --- a/pkg/client/clientset/versioned/typed/scheduling/v1beta1/fake/fake_queue.go +++ b/pkg/client/clientset/versioned/typed/scheduling/v1beta1/fake/fake_queue.go @@ -18,168 +18,31 @@ limitations under the License. package fake import ( - "context" - json "encoding/json" - "fmt" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + gentype "k8s.io/client-go/gentype" v1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" schedulingv1beta1 "volcano.sh/apis/pkg/client/applyconfiguration/scheduling/v1beta1" + typedschedulingv1beta1 "volcano.sh/apis/pkg/client/clientset/versioned/typed/scheduling/v1beta1" ) -// FakeQueues implements QueueInterface -type FakeQueues struct { +// fakeQueues implements QueueInterface +type fakeQueues struct { + *gentype.FakeClientWithListAndApply[*v1beta1.Queue, *v1beta1.QueueList, *schedulingv1beta1.QueueApplyConfiguration] Fake *FakeSchedulingV1beta1 } -var queuesResource = v1beta1.SchemeGroupVersion.WithResource("queues") - -var queuesKind = v1beta1.SchemeGroupVersion.WithKind("Queue") - -// Get takes name of the queue, and returns the corresponding queue object, and an error if there is any. -func (c *FakeQueues) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Queue, err error) { - emptyResult := &v1beta1.Queue{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(queuesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeQueues(fake *FakeSchedulingV1beta1) typedschedulingv1beta1.QueueInterface { + return &fakeQueues{ + gentype.NewFakeClientWithListAndApply[*v1beta1.Queue, *v1beta1.QueueList, *schedulingv1beta1.QueueApplyConfiguration]( + fake.Fake, + "", + v1beta1.SchemeGroupVersion.WithResource("queues"), + v1beta1.SchemeGroupVersion.WithKind("Queue"), + func() *v1beta1.Queue { return &v1beta1.Queue{} }, + func() *v1beta1.QueueList { return &v1beta1.QueueList{} }, + func(dst, src *v1beta1.QueueList) { dst.ListMeta = src.ListMeta }, + func(list *v1beta1.QueueList) []*v1beta1.Queue { return gentype.ToPointerSlice(list.Items) }, + func(list *v1beta1.QueueList, items []*v1beta1.Queue) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1beta1.Queue), err -} - -// List takes label and field selectors, and returns the list of Queues that match those selectors. -func (c *FakeQueues) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.QueueList, err error) { - emptyResult := &v1beta1.QueueList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(queuesResource, queuesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1beta1.QueueList{ListMeta: obj.(*v1beta1.QueueList).ListMeta} - for _, item := range obj.(*v1beta1.QueueList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested queues. -func (c *FakeQueues) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(queuesResource, opts)) -} - -// Create takes the representation of a queue and creates it. Returns the server's representation of the queue, and an error, if there is any. -func (c *FakeQueues) Create(ctx context.Context, queue *v1beta1.Queue, opts v1.CreateOptions) (result *v1beta1.Queue, err error) { - emptyResult := &v1beta1.Queue{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(queuesResource, queue, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.Queue), err -} - -// Update takes the representation of a queue and updates it. Returns the server's representation of the queue, and an error, if there is any. -func (c *FakeQueues) Update(ctx context.Context, queue *v1beta1.Queue, opts v1.UpdateOptions) (result *v1beta1.Queue, err error) { - emptyResult := &v1beta1.Queue{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(queuesResource, queue, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.Queue), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeQueues) UpdateStatus(ctx context.Context, queue *v1beta1.Queue, opts v1.UpdateOptions) (result *v1beta1.Queue, err error) { - emptyResult := &v1beta1.Queue{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(queuesResource, "status", queue, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.Queue), err -} - -// Delete takes name of the queue and deletes it. Returns an error if one occurs. -func (c *FakeQueues) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(queuesResource, name, opts), &v1beta1.Queue{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeQueues) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(queuesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1beta1.QueueList{}) - return err -} - -// Patch applies the patch and returns the patched queue. -func (c *FakeQueues) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Queue, err error) { - emptyResult := &v1beta1.Queue{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(queuesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.Queue), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied queue. -func (c *FakeQueues) Apply(ctx context.Context, queue *schedulingv1beta1.QueueApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Queue, err error) { - if queue == nil { - return nil, fmt.Errorf("queue provided to Apply must not be nil") - } - data, err := json.Marshal(queue) - if err != nil { - return nil, err - } - name := queue.Name - if name == nil { - return nil, fmt.Errorf("queue.Name must be provided to Apply") - } - emptyResult := &v1beta1.Queue{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(queuesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.Queue), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeQueues) ApplyStatus(ctx context.Context, queue *schedulingv1beta1.QueueApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Queue, err error) { - if queue == nil { - return nil, fmt.Errorf("queue provided to Apply must not be nil") - } - data, err := json.Marshal(queue) - if err != nil { - return nil, err - } - name := queue.Name - if name == nil { - return nil, fmt.Errorf("queue.Name must be provided to Apply") - } - emptyResult := &v1beta1.Queue{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(queuesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.Queue), err } diff --git a/pkg/client/clientset/versioned/typed/scheduling/v1beta1/fake/fake_scheduling_client.go b/pkg/client/clientset/versioned/typed/scheduling/v1beta1/fake/fake_scheduling_client.go index 4900b70..0fcd461 100644 --- a/pkg/client/clientset/versioned/typed/scheduling/v1beta1/fake/fake_scheduling_client.go +++ b/pkg/client/clientset/versioned/typed/scheduling/v1beta1/fake/fake_scheduling_client.go @@ -28,11 +28,11 @@ type FakeSchedulingV1beta1 struct { } func (c *FakeSchedulingV1beta1) PodGroups(namespace string) v1beta1.PodGroupInterface { - return &FakePodGroups{c, namespace} + return newFakePodGroups(c, namespace) } func (c *FakeSchedulingV1beta1) Queues() v1beta1.QueueInterface { - return &FakeQueues{c} + return newFakeQueues(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/pkg/client/clientset/versioned/typed/scheduling/v1beta1/podgroup.go b/pkg/client/clientset/versioned/typed/scheduling/v1beta1/podgroup.go index 17f533a..fadc616 100644 --- a/pkg/client/clientset/versioned/typed/scheduling/v1beta1/podgroup.go +++ b/pkg/client/clientset/versioned/typed/scheduling/v1beta1/podgroup.go @@ -18,14 +18,14 @@ limitations under the License. package v1beta1 import ( - "context" + context "context" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" gentype "k8s.io/client-go/gentype" - v1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" - schedulingv1beta1 "volcano.sh/apis/pkg/client/applyconfiguration/scheduling/v1beta1" + schedulingv1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" + applyconfigurationschedulingv1beta1 "volcano.sh/apis/pkg/client/applyconfiguration/scheduling/v1beta1" scheme "volcano.sh/apis/pkg/client/clientset/versioned/scheme" ) @@ -37,36 +37,37 @@ type PodGroupsGetter interface { // PodGroupInterface has methods to work with PodGroup resources. type PodGroupInterface interface { - Create(ctx context.Context, podGroup *v1beta1.PodGroup, opts v1.CreateOptions) (*v1beta1.PodGroup, error) - Update(ctx context.Context, podGroup *v1beta1.PodGroup, opts v1.UpdateOptions) (*v1beta1.PodGroup, error) + Create(ctx context.Context, podGroup *schedulingv1beta1.PodGroup, opts v1.CreateOptions) (*schedulingv1beta1.PodGroup, error) + Update(ctx context.Context, podGroup *schedulingv1beta1.PodGroup, opts v1.UpdateOptions) (*schedulingv1beta1.PodGroup, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, podGroup *v1beta1.PodGroup, opts v1.UpdateOptions) (*v1beta1.PodGroup, error) + UpdateStatus(ctx context.Context, podGroup *schedulingv1beta1.PodGroup, opts v1.UpdateOptions) (*schedulingv1beta1.PodGroup, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.PodGroup, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.PodGroupList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*schedulingv1beta1.PodGroup, error) + List(ctx context.Context, opts v1.ListOptions) (*schedulingv1beta1.PodGroupList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodGroup, err error) - Apply(ctx context.Context, podGroup *schedulingv1beta1.PodGroupApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PodGroup, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *schedulingv1beta1.PodGroup, err error) + Apply(ctx context.Context, podGroup *applyconfigurationschedulingv1beta1.PodGroupApplyConfiguration, opts v1.ApplyOptions) (result *schedulingv1beta1.PodGroup, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, podGroup *schedulingv1beta1.PodGroupApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PodGroup, err error) + ApplyStatus(ctx context.Context, podGroup *applyconfigurationschedulingv1beta1.PodGroupApplyConfiguration, opts v1.ApplyOptions) (result *schedulingv1beta1.PodGroup, err error) PodGroupExpansion } // podGroups implements PodGroupInterface type podGroups struct { - *gentype.ClientWithListAndApply[*v1beta1.PodGroup, *v1beta1.PodGroupList, *schedulingv1beta1.PodGroupApplyConfiguration] + *gentype.ClientWithListAndApply[*schedulingv1beta1.PodGroup, *schedulingv1beta1.PodGroupList, *applyconfigurationschedulingv1beta1.PodGroupApplyConfiguration] } // newPodGroups returns a PodGroups func newPodGroups(c *SchedulingV1beta1Client, namespace string) *podGroups { return &podGroups{ - gentype.NewClientWithListAndApply[*v1beta1.PodGroup, *v1beta1.PodGroupList, *schedulingv1beta1.PodGroupApplyConfiguration]( + gentype.NewClientWithListAndApply[*schedulingv1beta1.PodGroup, *schedulingv1beta1.PodGroupList, *applyconfigurationschedulingv1beta1.PodGroupApplyConfiguration]( "podgroups", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1beta1.PodGroup { return &v1beta1.PodGroup{} }, - func() *v1beta1.PodGroupList { return &v1beta1.PodGroupList{} }), + func() *schedulingv1beta1.PodGroup { return &schedulingv1beta1.PodGroup{} }, + func() *schedulingv1beta1.PodGroupList { return &schedulingv1beta1.PodGroupList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/scheduling/v1beta1/queue.go b/pkg/client/clientset/versioned/typed/scheduling/v1beta1/queue.go index 70f0f64..a300f77 100644 --- a/pkg/client/clientset/versioned/typed/scheduling/v1beta1/queue.go +++ b/pkg/client/clientset/versioned/typed/scheduling/v1beta1/queue.go @@ -18,14 +18,14 @@ limitations under the License. package v1beta1 import ( - "context" + context "context" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" gentype "k8s.io/client-go/gentype" - v1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" - schedulingv1beta1 "volcano.sh/apis/pkg/client/applyconfiguration/scheduling/v1beta1" + schedulingv1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" + applyconfigurationschedulingv1beta1 "volcano.sh/apis/pkg/client/applyconfiguration/scheduling/v1beta1" scheme "volcano.sh/apis/pkg/client/clientset/versioned/scheme" ) @@ -37,36 +37,37 @@ type QueuesGetter interface { // QueueInterface has methods to work with Queue resources. type QueueInterface interface { - Create(ctx context.Context, queue *v1beta1.Queue, opts v1.CreateOptions) (*v1beta1.Queue, error) - Update(ctx context.Context, queue *v1beta1.Queue, opts v1.UpdateOptions) (*v1beta1.Queue, error) + Create(ctx context.Context, queue *schedulingv1beta1.Queue, opts v1.CreateOptions) (*schedulingv1beta1.Queue, error) + Update(ctx context.Context, queue *schedulingv1beta1.Queue, opts v1.UpdateOptions) (*schedulingv1beta1.Queue, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, queue *v1beta1.Queue, opts v1.UpdateOptions) (*v1beta1.Queue, error) + UpdateStatus(ctx context.Context, queue *schedulingv1beta1.Queue, opts v1.UpdateOptions) (*schedulingv1beta1.Queue, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Queue, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.QueueList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*schedulingv1beta1.Queue, error) + List(ctx context.Context, opts v1.ListOptions) (*schedulingv1beta1.QueueList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Queue, err error) - Apply(ctx context.Context, queue *schedulingv1beta1.QueueApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Queue, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *schedulingv1beta1.Queue, err error) + Apply(ctx context.Context, queue *applyconfigurationschedulingv1beta1.QueueApplyConfiguration, opts v1.ApplyOptions) (result *schedulingv1beta1.Queue, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, queue *schedulingv1beta1.QueueApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Queue, err error) + ApplyStatus(ctx context.Context, queue *applyconfigurationschedulingv1beta1.QueueApplyConfiguration, opts v1.ApplyOptions) (result *schedulingv1beta1.Queue, err error) QueueExpansion } // queues implements QueueInterface type queues struct { - *gentype.ClientWithListAndApply[*v1beta1.Queue, *v1beta1.QueueList, *schedulingv1beta1.QueueApplyConfiguration] + *gentype.ClientWithListAndApply[*schedulingv1beta1.Queue, *schedulingv1beta1.QueueList, *applyconfigurationschedulingv1beta1.QueueApplyConfiguration] } // newQueues returns a Queues func newQueues(c *SchedulingV1beta1Client) *queues { return &queues{ - gentype.NewClientWithListAndApply[*v1beta1.Queue, *v1beta1.QueueList, *schedulingv1beta1.QueueApplyConfiguration]( + gentype.NewClientWithListAndApply[*schedulingv1beta1.Queue, *schedulingv1beta1.QueueList, *applyconfigurationschedulingv1beta1.QueueApplyConfiguration]( "queues", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1beta1.Queue { return &v1beta1.Queue{} }, - func() *v1beta1.QueueList { return &v1beta1.QueueList{} }), + func() *schedulingv1beta1.Queue { return &schedulingv1beta1.Queue{} }, + func() *schedulingv1beta1.QueueList { return &schedulingv1beta1.QueueList{} }, + ), } } diff --git a/pkg/client/clientset/versioned/typed/scheduling/v1beta1/scheduling_client.go b/pkg/client/clientset/versioned/typed/scheduling/v1beta1/scheduling_client.go index d12e716..64e3fb4 100644 --- a/pkg/client/clientset/versioned/typed/scheduling/v1beta1/scheduling_client.go +++ b/pkg/client/clientset/versioned/typed/scheduling/v1beta1/scheduling_client.go @@ -18,11 +18,11 @@ limitations under the License. package v1beta1 import ( - "net/http" + http "net/http" rest "k8s.io/client-go/rest" - v1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" - "volcano.sh/apis/pkg/client/clientset/versioned/scheme" + schedulingv1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" + scheme "volcano.sh/apis/pkg/client/clientset/versioned/scheme" ) type SchedulingV1beta1Interface interface { @@ -89,10 +89,10 @@ func New(c rest.Interface) *SchedulingV1beta1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1beta1.SchemeGroupVersion + gv := schedulingv1beta1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/pkg/client/informers/externalversions/batch/v1alpha1/job.go b/pkg/client/informers/externalversions/batch/v1alpha1/job.go index 3f28b30..273e07f 100644 --- a/pkg/client/informers/externalversions/batch/v1alpha1/job.go +++ b/pkg/client/informers/externalversions/batch/v1alpha1/job.go @@ -18,24 +18,24 @@ limitations under the License. package v1alpha1 import ( - "context" + context "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - batchv1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" + apisbatchv1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" versioned "volcano.sh/apis/pkg/client/clientset/versioned" internalinterfaces "volcano.sh/apis/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "volcano.sh/apis/pkg/client/listers/batch/v1alpha1" + batchv1alpha1 "volcano.sh/apis/pkg/client/listers/batch/v1alpha1" ) // JobInformer provides access to a shared informer and lister for // Jobs. type JobInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.JobLister + Lister() batchv1alpha1.JobLister } type jobInformer struct { @@ -70,7 +70,7 @@ func NewFilteredJobInformer(client versioned.Interface, namespace string, resync return client.BatchV1alpha1().Jobs(namespace).Watch(context.TODO(), options) }, }, - &batchv1alpha1.Job{}, + &apisbatchv1alpha1.Job{}, resyncPeriod, indexers, ) @@ -81,9 +81,9 @@ func (f *jobInformer) defaultInformer(client versioned.Interface, resyncPeriod t } func (f *jobInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&batchv1alpha1.Job{}, f.defaultInformer) + return f.factory.InformerFor(&apisbatchv1alpha1.Job{}, f.defaultInformer) } -func (f *jobInformer) Lister() v1alpha1.JobLister { - return v1alpha1.NewJobLister(f.Informer().GetIndexer()) +func (f *jobInformer) Lister() batchv1alpha1.JobLister { + return batchv1alpha1.NewJobLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/bus/v1alpha1/command.go b/pkg/client/informers/externalversions/bus/v1alpha1/command.go index 45f9a8d..f95645a 100644 --- a/pkg/client/informers/externalversions/bus/v1alpha1/command.go +++ b/pkg/client/informers/externalversions/bus/v1alpha1/command.go @@ -18,24 +18,24 @@ limitations under the License. package v1alpha1 import ( - "context" + context "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - busv1alpha1 "volcano.sh/apis/pkg/apis/bus/v1alpha1" + apisbusv1alpha1 "volcano.sh/apis/pkg/apis/bus/v1alpha1" versioned "volcano.sh/apis/pkg/client/clientset/versioned" internalinterfaces "volcano.sh/apis/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "volcano.sh/apis/pkg/client/listers/bus/v1alpha1" + busv1alpha1 "volcano.sh/apis/pkg/client/listers/bus/v1alpha1" ) // CommandInformer provides access to a shared informer and lister for // Commands. type CommandInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.CommandLister + Lister() busv1alpha1.CommandLister } type commandInformer struct { @@ -70,7 +70,7 @@ func NewFilteredCommandInformer(client versioned.Interface, namespace string, re return client.BusV1alpha1().Commands(namespace).Watch(context.TODO(), options) }, }, - &busv1alpha1.Command{}, + &apisbusv1alpha1.Command{}, resyncPeriod, indexers, ) @@ -81,9 +81,9 @@ func (f *commandInformer) defaultInformer(client versioned.Interface, resyncPeri } func (f *commandInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&busv1alpha1.Command{}, f.defaultInformer) + return f.factory.InformerFor(&apisbusv1alpha1.Command{}, f.defaultInformer) } -func (f *commandInformer) Lister() v1alpha1.CommandLister { - return v1alpha1.NewCommandLister(f.Informer().GetIndexer()) +func (f *commandInformer) Lister() busv1alpha1.CommandLister { + return busv1alpha1.NewCommandLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/flow/v1alpha1/jobflow.go b/pkg/client/informers/externalversions/flow/v1alpha1/jobflow.go index c624bfb..67fda46 100644 --- a/pkg/client/informers/externalversions/flow/v1alpha1/jobflow.go +++ b/pkg/client/informers/externalversions/flow/v1alpha1/jobflow.go @@ -18,24 +18,24 @@ limitations under the License. package v1alpha1 import ( - "context" + context "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - flowv1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" + apisflowv1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" versioned "volcano.sh/apis/pkg/client/clientset/versioned" internalinterfaces "volcano.sh/apis/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "volcano.sh/apis/pkg/client/listers/flow/v1alpha1" + flowv1alpha1 "volcano.sh/apis/pkg/client/listers/flow/v1alpha1" ) // JobFlowInformer provides access to a shared informer and lister for // JobFlows. type JobFlowInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.JobFlowLister + Lister() flowv1alpha1.JobFlowLister } type jobFlowInformer struct { @@ -70,7 +70,7 @@ func NewFilteredJobFlowInformer(client versioned.Interface, namespace string, re return client.FlowV1alpha1().JobFlows(namespace).Watch(context.TODO(), options) }, }, - &flowv1alpha1.JobFlow{}, + &apisflowv1alpha1.JobFlow{}, resyncPeriod, indexers, ) @@ -81,9 +81,9 @@ func (f *jobFlowInformer) defaultInformer(client versioned.Interface, resyncPeri } func (f *jobFlowInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&flowv1alpha1.JobFlow{}, f.defaultInformer) + return f.factory.InformerFor(&apisflowv1alpha1.JobFlow{}, f.defaultInformer) } -func (f *jobFlowInformer) Lister() v1alpha1.JobFlowLister { - return v1alpha1.NewJobFlowLister(f.Informer().GetIndexer()) +func (f *jobFlowInformer) Lister() flowv1alpha1.JobFlowLister { + return flowv1alpha1.NewJobFlowLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/flow/v1alpha1/jobtemplate.go b/pkg/client/informers/externalversions/flow/v1alpha1/jobtemplate.go index 0c1bee9..12dd5c7 100644 --- a/pkg/client/informers/externalversions/flow/v1alpha1/jobtemplate.go +++ b/pkg/client/informers/externalversions/flow/v1alpha1/jobtemplate.go @@ -18,24 +18,24 @@ limitations under the License. package v1alpha1 import ( - "context" + context "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - flowv1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" + apisflowv1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" versioned "volcano.sh/apis/pkg/client/clientset/versioned" internalinterfaces "volcano.sh/apis/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "volcano.sh/apis/pkg/client/listers/flow/v1alpha1" + flowv1alpha1 "volcano.sh/apis/pkg/client/listers/flow/v1alpha1" ) // JobTemplateInformer provides access to a shared informer and lister for // JobTemplates. type JobTemplateInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.JobTemplateLister + Lister() flowv1alpha1.JobTemplateLister } type jobTemplateInformer struct { @@ -70,7 +70,7 @@ func NewFilteredJobTemplateInformer(client versioned.Interface, namespace string return client.FlowV1alpha1().JobTemplates(namespace).Watch(context.TODO(), options) }, }, - &flowv1alpha1.JobTemplate{}, + &apisflowv1alpha1.JobTemplate{}, resyncPeriod, indexers, ) @@ -81,9 +81,9 @@ func (f *jobTemplateInformer) defaultInformer(client versioned.Interface, resync } func (f *jobTemplateInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&flowv1alpha1.JobTemplate{}, f.defaultInformer) + return f.factory.InformerFor(&apisflowv1alpha1.JobTemplate{}, f.defaultInformer) } -func (f *jobTemplateInformer) Lister() v1alpha1.JobTemplateLister { - return v1alpha1.NewJobTemplateLister(f.Informer().GetIndexer()) +func (f *jobTemplateInformer) Lister() flowv1alpha1.JobTemplateLister { + return flowv1alpha1.NewJobTemplateLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index b857454..5ccab12 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -18,7 +18,7 @@ limitations under the License. package externalversions import ( - "fmt" + fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" diff --git a/pkg/client/informers/externalversions/nodeinfo/v1alpha1/numatopology.go b/pkg/client/informers/externalversions/nodeinfo/v1alpha1/numatopology.go index dd768ec..b32c14c 100644 --- a/pkg/client/informers/externalversions/nodeinfo/v1alpha1/numatopology.go +++ b/pkg/client/informers/externalversions/nodeinfo/v1alpha1/numatopology.go @@ -18,24 +18,24 @@ limitations under the License. package v1alpha1 import ( - "context" + context "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - nodeinfov1alpha1 "volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" + apisnodeinfov1alpha1 "volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" versioned "volcano.sh/apis/pkg/client/clientset/versioned" internalinterfaces "volcano.sh/apis/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "volcano.sh/apis/pkg/client/listers/nodeinfo/v1alpha1" + nodeinfov1alpha1 "volcano.sh/apis/pkg/client/listers/nodeinfo/v1alpha1" ) // NumatopologyInformer provides access to a shared informer and lister for // Numatopologies. type NumatopologyInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.NumatopologyLister + Lister() nodeinfov1alpha1.NumatopologyLister } type numatopologyInformer struct { @@ -69,7 +69,7 @@ func NewFilteredNumatopologyInformer(client versioned.Interface, resyncPeriod ti return client.NodeinfoV1alpha1().Numatopologies().Watch(context.TODO(), options) }, }, - &nodeinfov1alpha1.Numatopology{}, + &apisnodeinfov1alpha1.Numatopology{}, resyncPeriod, indexers, ) @@ -80,9 +80,9 @@ func (f *numatopologyInformer) defaultInformer(client versioned.Interface, resyn } func (f *numatopologyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&nodeinfov1alpha1.Numatopology{}, f.defaultInformer) + return f.factory.InformerFor(&apisnodeinfov1alpha1.Numatopology{}, f.defaultInformer) } -func (f *numatopologyInformer) Lister() v1alpha1.NumatopologyLister { - return v1alpha1.NewNumatopologyLister(f.Informer().GetIndexer()) +func (f *numatopologyInformer) Lister() nodeinfov1alpha1.NumatopologyLister { + return nodeinfov1alpha1.NewNumatopologyLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/scheduling/v1beta1/podgroup.go b/pkg/client/informers/externalversions/scheduling/v1beta1/podgroup.go index c0fb6d2..a852de2 100644 --- a/pkg/client/informers/externalversions/scheduling/v1beta1/podgroup.go +++ b/pkg/client/informers/externalversions/scheduling/v1beta1/podgroup.go @@ -18,24 +18,24 @@ limitations under the License. package v1beta1 import ( - "context" + context "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - schedulingv1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" + apisschedulingv1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" versioned "volcano.sh/apis/pkg/client/clientset/versioned" internalinterfaces "volcano.sh/apis/pkg/client/informers/externalversions/internalinterfaces" - v1beta1 "volcano.sh/apis/pkg/client/listers/scheduling/v1beta1" + schedulingv1beta1 "volcano.sh/apis/pkg/client/listers/scheduling/v1beta1" ) // PodGroupInformer provides access to a shared informer and lister for // PodGroups. type PodGroupInformer interface { Informer() cache.SharedIndexInformer - Lister() v1beta1.PodGroupLister + Lister() schedulingv1beta1.PodGroupLister } type podGroupInformer struct { @@ -70,7 +70,7 @@ func NewFilteredPodGroupInformer(client versioned.Interface, namespace string, r return client.SchedulingV1beta1().PodGroups(namespace).Watch(context.TODO(), options) }, }, - &schedulingv1beta1.PodGroup{}, + &apisschedulingv1beta1.PodGroup{}, resyncPeriod, indexers, ) @@ -81,9 +81,9 @@ func (f *podGroupInformer) defaultInformer(client versioned.Interface, resyncPer } func (f *podGroupInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&schedulingv1beta1.PodGroup{}, f.defaultInformer) + return f.factory.InformerFor(&apisschedulingv1beta1.PodGroup{}, f.defaultInformer) } -func (f *podGroupInformer) Lister() v1beta1.PodGroupLister { - return v1beta1.NewPodGroupLister(f.Informer().GetIndexer()) +func (f *podGroupInformer) Lister() schedulingv1beta1.PodGroupLister { + return schedulingv1beta1.NewPodGroupLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/scheduling/v1beta1/queue.go b/pkg/client/informers/externalversions/scheduling/v1beta1/queue.go index 67468f6..47261ce 100644 --- a/pkg/client/informers/externalversions/scheduling/v1beta1/queue.go +++ b/pkg/client/informers/externalversions/scheduling/v1beta1/queue.go @@ -18,24 +18,24 @@ limitations under the License. package v1beta1 import ( - "context" + context "context" time "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - schedulingv1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" + apisschedulingv1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" versioned "volcano.sh/apis/pkg/client/clientset/versioned" internalinterfaces "volcano.sh/apis/pkg/client/informers/externalversions/internalinterfaces" - v1beta1 "volcano.sh/apis/pkg/client/listers/scheduling/v1beta1" + schedulingv1beta1 "volcano.sh/apis/pkg/client/listers/scheduling/v1beta1" ) // QueueInformer provides access to a shared informer and lister for // Queues. type QueueInformer interface { Informer() cache.SharedIndexInformer - Lister() v1beta1.QueueLister + Lister() schedulingv1beta1.QueueLister } type queueInformer struct { @@ -69,7 +69,7 @@ func NewFilteredQueueInformer(client versioned.Interface, resyncPeriod time.Dura return client.SchedulingV1beta1().Queues().Watch(context.TODO(), options) }, }, - &schedulingv1beta1.Queue{}, + &apisschedulingv1beta1.Queue{}, resyncPeriod, indexers, ) @@ -80,9 +80,9 @@ func (f *queueInformer) defaultInformer(client versioned.Interface, resyncPeriod } func (f *queueInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&schedulingv1beta1.Queue{}, f.defaultInformer) + return f.factory.InformerFor(&apisschedulingv1beta1.Queue{}, f.defaultInformer) } -func (f *queueInformer) Lister() v1beta1.QueueLister { - return v1beta1.NewQueueLister(f.Informer().GetIndexer()) +func (f *queueInformer) Lister() schedulingv1beta1.QueueLister { + return schedulingv1beta1.NewQueueLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/listers/batch/v1alpha1/job.go b/pkg/client/listers/batch/v1alpha1/job.go index a1da2a3..05691f7 100644 --- a/pkg/client/listers/batch/v1alpha1/job.go +++ b/pkg/client/listers/batch/v1alpha1/job.go @@ -18,10 +18,10 @@ limitations under the License. package v1alpha1 import ( - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" - v1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" + batchv1alpha1 "volcano.sh/apis/pkg/apis/batch/v1alpha1" ) // JobLister helps list Jobs. @@ -29,7 +29,7 @@ import ( type JobLister interface { // List lists all Jobs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.Job, err error) + List(selector labels.Selector) (ret []*batchv1alpha1.Job, err error) // Jobs returns an object that can list and get Jobs. Jobs(namespace string) JobNamespaceLister JobListerExpansion @@ -37,17 +37,17 @@ type JobLister interface { // jobLister implements the JobLister interface. type jobLister struct { - listers.ResourceIndexer[*v1alpha1.Job] + listers.ResourceIndexer[*batchv1alpha1.Job] } // NewJobLister returns a new JobLister. func NewJobLister(indexer cache.Indexer) JobLister { - return &jobLister{listers.New[*v1alpha1.Job](indexer, v1alpha1.Resource("job"))} + return &jobLister{listers.New[*batchv1alpha1.Job](indexer, batchv1alpha1.Resource("job"))} } // Jobs returns an object that can list and get Jobs. func (s *jobLister) Jobs(namespace string) JobNamespaceLister { - return jobNamespaceLister{listers.NewNamespaced[*v1alpha1.Job](s.ResourceIndexer, namespace)} + return jobNamespaceLister{listers.NewNamespaced[*batchv1alpha1.Job](s.ResourceIndexer, namespace)} } // JobNamespaceLister helps list and get Jobs. @@ -55,15 +55,15 @@ func (s *jobLister) Jobs(namespace string) JobNamespaceLister { type JobNamespaceLister interface { // List lists all Jobs in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.Job, err error) + List(selector labels.Selector) (ret []*batchv1alpha1.Job, err error) // Get retrieves the Job from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.Job, error) + Get(name string) (*batchv1alpha1.Job, error) JobNamespaceListerExpansion } // jobNamespaceLister implements the JobNamespaceLister // interface. type jobNamespaceLister struct { - listers.ResourceIndexer[*v1alpha1.Job] + listers.ResourceIndexer[*batchv1alpha1.Job] } diff --git a/pkg/client/listers/bus/v1alpha1/command.go b/pkg/client/listers/bus/v1alpha1/command.go index db05e14..980612a 100644 --- a/pkg/client/listers/bus/v1alpha1/command.go +++ b/pkg/client/listers/bus/v1alpha1/command.go @@ -18,10 +18,10 @@ limitations under the License. package v1alpha1 import ( - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" - v1alpha1 "volcano.sh/apis/pkg/apis/bus/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" + busv1alpha1 "volcano.sh/apis/pkg/apis/bus/v1alpha1" ) // CommandLister helps list Commands. @@ -29,7 +29,7 @@ import ( type CommandLister interface { // List lists all Commands in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.Command, err error) + List(selector labels.Selector) (ret []*busv1alpha1.Command, err error) // Commands returns an object that can list and get Commands. Commands(namespace string) CommandNamespaceLister CommandListerExpansion @@ -37,17 +37,17 @@ type CommandLister interface { // commandLister implements the CommandLister interface. type commandLister struct { - listers.ResourceIndexer[*v1alpha1.Command] + listers.ResourceIndexer[*busv1alpha1.Command] } // NewCommandLister returns a new CommandLister. func NewCommandLister(indexer cache.Indexer) CommandLister { - return &commandLister{listers.New[*v1alpha1.Command](indexer, v1alpha1.Resource("command"))} + return &commandLister{listers.New[*busv1alpha1.Command](indexer, busv1alpha1.Resource("command"))} } // Commands returns an object that can list and get Commands. func (s *commandLister) Commands(namespace string) CommandNamespaceLister { - return commandNamespaceLister{listers.NewNamespaced[*v1alpha1.Command](s.ResourceIndexer, namespace)} + return commandNamespaceLister{listers.NewNamespaced[*busv1alpha1.Command](s.ResourceIndexer, namespace)} } // CommandNamespaceLister helps list and get Commands. @@ -55,15 +55,15 @@ func (s *commandLister) Commands(namespace string) CommandNamespaceLister { type CommandNamespaceLister interface { // List lists all Commands in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.Command, err error) + List(selector labels.Selector) (ret []*busv1alpha1.Command, err error) // Get retrieves the Command from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.Command, error) + Get(name string) (*busv1alpha1.Command, error) CommandNamespaceListerExpansion } // commandNamespaceLister implements the CommandNamespaceLister // interface. type commandNamespaceLister struct { - listers.ResourceIndexer[*v1alpha1.Command] + listers.ResourceIndexer[*busv1alpha1.Command] } diff --git a/pkg/client/listers/flow/v1alpha1/jobflow.go b/pkg/client/listers/flow/v1alpha1/jobflow.go index 1c7e8cc..362ca2b 100644 --- a/pkg/client/listers/flow/v1alpha1/jobflow.go +++ b/pkg/client/listers/flow/v1alpha1/jobflow.go @@ -18,10 +18,10 @@ limitations under the License. package v1alpha1 import ( - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" - v1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" + flowv1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" ) // JobFlowLister helps list JobFlows. @@ -29,7 +29,7 @@ import ( type JobFlowLister interface { // List lists all JobFlows in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.JobFlow, err error) + List(selector labels.Selector) (ret []*flowv1alpha1.JobFlow, err error) // JobFlows returns an object that can list and get JobFlows. JobFlows(namespace string) JobFlowNamespaceLister JobFlowListerExpansion @@ -37,17 +37,17 @@ type JobFlowLister interface { // jobFlowLister implements the JobFlowLister interface. type jobFlowLister struct { - listers.ResourceIndexer[*v1alpha1.JobFlow] + listers.ResourceIndexer[*flowv1alpha1.JobFlow] } // NewJobFlowLister returns a new JobFlowLister. func NewJobFlowLister(indexer cache.Indexer) JobFlowLister { - return &jobFlowLister{listers.New[*v1alpha1.JobFlow](indexer, v1alpha1.Resource("jobflow"))} + return &jobFlowLister{listers.New[*flowv1alpha1.JobFlow](indexer, flowv1alpha1.Resource("jobflow"))} } // JobFlows returns an object that can list and get JobFlows. func (s *jobFlowLister) JobFlows(namespace string) JobFlowNamespaceLister { - return jobFlowNamespaceLister{listers.NewNamespaced[*v1alpha1.JobFlow](s.ResourceIndexer, namespace)} + return jobFlowNamespaceLister{listers.NewNamespaced[*flowv1alpha1.JobFlow](s.ResourceIndexer, namespace)} } // JobFlowNamespaceLister helps list and get JobFlows. @@ -55,15 +55,15 @@ func (s *jobFlowLister) JobFlows(namespace string) JobFlowNamespaceLister { type JobFlowNamespaceLister interface { // List lists all JobFlows in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.JobFlow, err error) + List(selector labels.Selector) (ret []*flowv1alpha1.JobFlow, err error) // Get retrieves the JobFlow from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.JobFlow, error) + Get(name string) (*flowv1alpha1.JobFlow, error) JobFlowNamespaceListerExpansion } // jobFlowNamespaceLister implements the JobFlowNamespaceLister // interface. type jobFlowNamespaceLister struct { - listers.ResourceIndexer[*v1alpha1.JobFlow] + listers.ResourceIndexer[*flowv1alpha1.JobFlow] } diff --git a/pkg/client/listers/flow/v1alpha1/jobtemplate.go b/pkg/client/listers/flow/v1alpha1/jobtemplate.go index 8170e93..e2bbb1e 100644 --- a/pkg/client/listers/flow/v1alpha1/jobtemplate.go +++ b/pkg/client/listers/flow/v1alpha1/jobtemplate.go @@ -18,10 +18,10 @@ limitations under the License. package v1alpha1 import ( - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" - v1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" + flowv1alpha1 "volcano.sh/apis/pkg/apis/flow/v1alpha1" ) // JobTemplateLister helps list JobTemplates. @@ -29,7 +29,7 @@ import ( type JobTemplateLister interface { // List lists all JobTemplates in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.JobTemplate, err error) + List(selector labels.Selector) (ret []*flowv1alpha1.JobTemplate, err error) // JobTemplates returns an object that can list and get JobTemplates. JobTemplates(namespace string) JobTemplateNamespaceLister JobTemplateListerExpansion @@ -37,17 +37,17 @@ type JobTemplateLister interface { // jobTemplateLister implements the JobTemplateLister interface. type jobTemplateLister struct { - listers.ResourceIndexer[*v1alpha1.JobTemplate] + listers.ResourceIndexer[*flowv1alpha1.JobTemplate] } // NewJobTemplateLister returns a new JobTemplateLister. func NewJobTemplateLister(indexer cache.Indexer) JobTemplateLister { - return &jobTemplateLister{listers.New[*v1alpha1.JobTemplate](indexer, v1alpha1.Resource("jobtemplate"))} + return &jobTemplateLister{listers.New[*flowv1alpha1.JobTemplate](indexer, flowv1alpha1.Resource("jobtemplate"))} } // JobTemplates returns an object that can list and get JobTemplates. func (s *jobTemplateLister) JobTemplates(namespace string) JobTemplateNamespaceLister { - return jobTemplateNamespaceLister{listers.NewNamespaced[*v1alpha1.JobTemplate](s.ResourceIndexer, namespace)} + return jobTemplateNamespaceLister{listers.NewNamespaced[*flowv1alpha1.JobTemplate](s.ResourceIndexer, namespace)} } // JobTemplateNamespaceLister helps list and get JobTemplates. @@ -55,15 +55,15 @@ func (s *jobTemplateLister) JobTemplates(namespace string) JobTemplateNamespaceL type JobTemplateNamespaceLister interface { // List lists all JobTemplates in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.JobTemplate, err error) + List(selector labels.Selector) (ret []*flowv1alpha1.JobTemplate, err error) // Get retrieves the JobTemplate from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.JobTemplate, error) + Get(name string) (*flowv1alpha1.JobTemplate, error) JobTemplateNamespaceListerExpansion } // jobTemplateNamespaceLister implements the JobTemplateNamespaceLister // interface. type jobTemplateNamespaceLister struct { - listers.ResourceIndexer[*v1alpha1.JobTemplate] + listers.ResourceIndexer[*flowv1alpha1.JobTemplate] } diff --git a/pkg/client/listers/nodeinfo/v1alpha1/numatopology.go b/pkg/client/listers/nodeinfo/v1alpha1/numatopology.go index a55dc9c..bae5506 100644 --- a/pkg/client/listers/nodeinfo/v1alpha1/numatopology.go +++ b/pkg/client/listers/nodeinfo/v1alpha1/numatopology.go @@ -18,10 +18,10 @@ limitations under the License. package v1alpha1 import ( - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" - v1alpha1 "volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" + nodeinfov1alpha1 "volcano.sh/apis/pkg/apis/nodeinfo/v1alpha1" ) // NumatopologyLister helps list Numatopologies. @@ -29,19 +29,19 @@ import ( type NumatopologyLister interface { // List lists all Numatopologies in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.Numatopology, err error) + List(selector labels.Selector) (ret []*nodeinfov1alpha1.Numatopology, err error) // Get retrieves the Numatopology from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.Numatopology, error) + Get(name string) (*nodeinfov1alpha1.Numatopology, error) NumatopologyListerExpansion } // numatopologyLister implements the NumatopologyLister interface. type numatopologyLister struct { - listers.ResourceIndexer[*v1alpha1.Numatopology] + listers.ResourceIndexer[*nodeinfov1alpha1.Numatopology] } // NewNumatopologyLister returns a new NumatopologyLister. func NewNumatopologyLister(indexer cache.Indexer) NumatopologyLister { - return &numatopologyLister{listers.New[*v1alpha1.Numatopology](indexer, v1alpha1.Resource("numatopology"))} + return &numatopologyLister{listers.New[*nodeinfov1alpha1.Numatopology](indexer, nodeinfov1alpha1.Resource("numatopology"))} } diff --git a/pkg/client/listers/scheduling/v1beta1/podgroup.go b/pkg/client/listers/scheduling/v1beta1/podgroup.go index b37bacd..ad0005a 100644 --- a/pkg/client/listers/scheduling/v1beta1/podgroup.go +++ b/pkg/client/listers/scheduling/v1beta1/podgroup.go @@ -18,10 +18,10 @@ limitations under the License. package v1beta1 import ( - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" - v1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" + schedulingv1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" ) // PodGroupLister helps list PodGroups. @@ -29,7 +29,7 @@ import ( type PodGroupLister interface { // List lists all PodGroups in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.PodGroup, err error) + List(selector labels.Selector) (ret []*schedulingv1beta1.PodGroup, err error) // PodGroups returns an object that can list and get PodGroups. PodGroups(namespace string) PodGroupNamespaceLister PodGroupListerExpansion @@ -37,17 +37,17 @@ type PodGroupLister interface { // podGroupLister implements the PodGroupLister interface. type podGroupLister struct { - listers.ResourceIndexer[*v1beta1.PodGroup] + listers.ResourceIndexer[*schedulingv1beta1.PodGroup] } // NewPodGroupLister returns a new PodGroupLister. func NewPodGroupLister(indexer cache.Indexer) PodGroupLister { - return &podGroupLister{listers.New[*v1beta1.PodGroup](indexer, v1beta1.Resource("podgroup"))} + return &podGroupLister{listers.New[*schedulingv1beta1.PodGroup](indexer, schedulingv1beta1.Resource("podgroup"))} } // PodGroups returns an object that can list and get PodGroups. func (s *podGroupLister) PodGroups(namespace string) PodGroupNamespaceLister { - return podGroupNamespaceLister{listers.NewNamespaced[*v1beta1.PodGroup](s.ResourceIndexer, namespace)} + return podGroupNamespaceLister{listers.NewNamespaced[*schedulingv1beta1.PodGroup](s.ResourceIndexer, namespace)} } // PodGroupNamespaceLister helps list and get PodGroups. @@ -55,15 +55,15 @@ func (s *podGroupLister) PodGroups(namespace string) PodGroupNamespaceLister { type PodGroupNamespaceLister interface { // List lists all PodGroups in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.PodGroup, err error) + List(selector labels.Selector) (ret []*schedulingv1beta1.PodGroup, err error) // Get retrieves the PodGroup from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1beta1.PodGroup, error) + Get(name string) (*schedulingv1beta1.PodGroup, error) PodGroupNamespaceListerExpansion } // podGroupNamespaceLister implements the PodGroupNamespaceLister // interface. type podGroupNamespaceLister struct { - listers.ResourceIndexer[*v1beta1.PodGroup] + listers.ResourceIndexer[*schedulingv1beta1.PodGroup] } diff --git a/pkg/client/listers/scheduling/v1beta1/queue.go b/pkg/client/listers/scheduling/v1beta1/queue.go index 94c8ad4..1508dfc 100644 --- a/pkg/client/listers/scheduling/v1beta1/queue.go +++ b/pkg/client/listers/scheduling/v1beta1/queue.go @@ -18,10 +18,10 @@ limitations under the License. package v1beta1 import ( - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" - v1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" + schedulingv1beta1 "volcano.sh/apis/pkg/apis/scheduling/v1beta1" ) // QueueLister helps list Queues. @@ -29,19 +29,19 @@ import ( type QueueLister interface { // List lists all Queues in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.Queue, err error) + List(selector labels.Selector) (ret []*schedulingv1beta1.Queue, err error) // Get retrieves the Queue from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1beta1.Queue, error) + Get(name string) (*schedulingv1beta1.Queue, error) QueueListerExpansion } // queueLister implements the QueueLister interface. type queueLister struct { - listers.ResourceIndexer[*v1beta1.Queue] + listers.ResourceIndexer[*schedulingv1beta1.Queue] } // NewQueueLister returns a new QueueLister. func NewQueueLister(indexer cache.Indexer) QueueLister { - return &queueLister{listers.New[*v1beta1.Queue](indexer, v1beta1.Resource("queue"))} + return &queueLister{listers.New[*schedulingv1beta1.Queue](indexer, schedulingv1beta1.Resource("queue"))} }