diff --git a/go.mod b/go.mod index 68d51c9e..12d6559e 100644 --- a/go.mod +++ b/go.mod @@ -1,15 +1,15 @@ module volcano.sh/apis -go 1.24.0 +go 1.25.0 require ( - k8s.io/api v0.34.1 - k8s.io/apimachinery v0.34.1 - k8s.io/apiserver v0.34.1 - k8s.io/client-go v0.34.1 - k8s.io/code-generator v0.34.1 + k8s.io/api v0.35.0 + k8s.io/apimachinery v0.35.0 + k8s.io/apiserver v0.35.0 + k8s.io/client-go v0.35.0 + k8s.io/code-generator v0.35.0 k8s.io/klog/v2 v2.130.1 - k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b + k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 sigs.k8s.io/structured-merge-diff/v6 v6.3.0 ) @@ -24,7 +24,6 @@ require ( github.com/go-openapi/jsonpointer v0.21.1 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.1 // indirect - github.com/gogo/protobuf v1.3.2 // indirect github.com/google/gnostic-models v0.7.0 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/uuid v1.6.0 // indirect @@ -34,42 +33,41 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.22.0 // indirect + github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.64.0 // indirect + github.com/prometheus/common v0.66.1 // indirect github.com/prometheus/procfs v0.16.1 // indirect - github.com/spf13/pflag v1.0.6 // indirect + github.com/spf13/pflag v1.0.9 // indirect github.com/x448/float16 v0.8.4 // indirect go.opentelemetry.io/otel v1.36.0 // indirect go.opentelemetry.io/otel/trace v1.36.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/mod v0.24.0 // indirect - golang.org/x/net v0.40.0 // indirect + golang.org/x/mod v0.29.0 // indirect + golang.org/x/net v0.47.0 // indirect golang.org/x/oauth2 v0.30.0 // indirect - golang.org/x/sync v0.14.0 // indirect - golang.org/x/sys v0.33.0 // indirect - golang.org/x/term v0.32.0 // indirect - golang.org/x/text v0.25.0 // indirect + golang.org/x/sync v0.18.0 // indirect + golang.org/x/sys v0.38.0 // indirect + golang.org/x/term v0.37.0 // indirect + golang.org/x/text v0.31.0 // indirect golang.org/x/time v0.11.0 // indirect - golang.org/x/tools v0.33.0 // indirect - google.golang.org/protobuf v1.36.6 // indirect - gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect + golang.org/x/tools v0.38.0 // indirect + google.golang.org/protobuf v1.36.8 // indirect + gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/component-base v0.34.1 // indirect - k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f // indirect - k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect - sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect + k8s.io/component-base v0.35.0 // indirect + k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b // indirect + k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/yaml v1.6.0 // indirect ) replace ( - k8s.io/api => k8s.io/api v0.34.1 - k8s.io/apimachinery => k8s.io/apimachinery v0.34.1 - k8s.io/apiserver => k8s.io/apiserver v0.34.1 - k8s.io/client-go => k8s.io/client-go v0.34.1 + k8s.io/api => k8s.io/api v0.35.0 + k8s.io/apimachinery => k8s.io/apimachinery v0.35.0 + k8s.io/apiserver => k8s.io/apiserver v0.35.0 + k8s.io/client-go => k8s.io/client-go v0.35.0 ) diff --git a/go.sum b/go.sum index 7b83f4a0..4715c791 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= +github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= @@ -22,23 +24,19 @@ github.com/go-openapi/swag v0.23.1 h1:lpsStH0n2ittzTnbaSloVZLuB5+fvSY/+hnagBjSNZ github.com/go-openapi/swag v0.23.1/go.mod h1:STZs8TbRvEQQKUA+JZNAm3EWlgaOBGpyFDqQnDHMef0= 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= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -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/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= 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/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= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -57,122 +55,97 @@ github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFd github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/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.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/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns= +github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= +github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= +github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= -github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= -github.com/prometheus/common v0.64.0 h1:pdZeA+g617P7oGv1CzdTzyeShxAGrTBsolKNOLQPGO4= -github.com/prometheus/common v0.64.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8= +github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs= +github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= -github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= 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.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -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.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= -golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= -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.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= -golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= +golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA= +golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= +golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= +golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= -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.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= -golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -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.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= -golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= -golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= -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.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= -golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= +golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= +golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= +golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= +golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= +golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= +golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= -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.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= -golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= -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.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= +golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= +golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= +golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= 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= -gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= -gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= +gopkg.in/evanphx/json-patch.v4 v4.13.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.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.34.1 h1:jC+153630BMdlFukegoEL8E/yT7aLyQkIVuwhmwDgJM= -k8s.io/api v0.34.1/go.mod h1:SB80FxFtXn5/gwzCoN6QCtPD7Vbu5w2n1S0J5gFfTYk= -k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4= -k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= -k8s.io/apiserver v0.34.1 h1:U3JBGdgANK3dfFcyknWde1G6X1F4bg7PXuvlqt8lITA= -k8s.io/apiserver v0.34.1/go.mod h1:eOOc9nrVqlBI1AFCvVzsob0OxtPZUCPiUJL45JOTBG0= -k8s.io/client-go v0.34.1 h1:ZUPJKgXsnKwVwmKKdPfw4tB58+7/Ik3CrjOEhsiZ7mY= -k8s.io/client-go v0.34.1/go.mod h1:kA8v0FP+tk6sZA0yKLRG67LWjqufAoSHA2xVGKw9Of8= -k8s.io/code-generator v0.34.1 h1:WpphT26E+j7tEgIUfFr5WfbJrktCGzB3JoJH9149xYc= -k8s.io/code-generator v0.34.1/go.mod h1:DeWjekbDnJWRwpw3s0Jat87c+e0TgkxoR4ar608yqvg= -k8s.io/component-base v0.34.1 h1:v7xFgG+ONhytZNFpIz5/kecwD+sUhVE6HU7qQUiRM4A= -k8s.io/component-base v0.34.1/go.mod h1:mknCpLlTSKHzAQJJnnHVKqjxR7gBeHRv0rPXA7gdtQ0= -k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f h1:SLb+kxmzfA87x4E4brQzB33VBbT2+x7Zq9ROIHmGn9Q= -k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/api v0.35.0 h1:iBAU5LTyBI9vw3L5glmat1njFK34srdLmktWwLTprlY= +k8s.io/api v0.35.0/go.mod h1:AQ0SNTzm4ZAczM03QH42c7l3bih1TbAXYo0DkF8ktnA= +k8s.io/apimachinery v0.35.0 h1:Z2L3IHvPVv/MJ7xRxHEtk6GoJElaAqDCCU0S6ncYok8= +k8s.io/apimachinery v0.35.0/go.mod h1:jQCgFZFR1F4Ik7hvr2g84RTJSZegBc8yHgFWKn//hns= +k8s.io/apiserver v0.35.0 h1:CUGo5o+7hW9GcAEF3x3usT3fX4f9r8xmgQeCBDaOgX4= +k8s.io/apiserver v0.35.0/go.mod h1:QUy1U4+PrzbJaM3XGu2tQ7U9A4udRRo5cyxkFX0GEds= +k8s.io/client-go v0.35.0 h1:IAW0ifFbfQQwQmga0UdoH0yvdqrbwMdq9vIFEhRpxBE= +k8s.io/client-go v0.35.0/go.mod h1:q2E5AAyqcbeLGPdoRB+Nxe3KYTfPce1Dnu1myQdqz9o= +k8s.io/code-generator v0.35.0 h1:TvrtfKYZTm9oDF2z+veFKSCcgZE3Igv0svY+ehCmjHQ= +k8s.io/code-generator v0.35.0/go.mod h1:iS1gvVf3c/T71N5DOGYO+Gt3PdJ6B9LYSvIyQ4FHzgc= +k8s.io/component-base v0.35.0 h1:+yBrOhzri2S1BVqyVSvcM3PtPyx5GUxCK2tinZz1G94= +k8s.io/component-base v0.35.0/go.mod h1:85SCX4UCa6SCFt6p3IKAPej7jSnF3L8EbfSyMZayJR0= +k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b h1:gMplByicHV/TJBizHd9aVEsTYoJBnnUAT5MHlTkbjhQ= +k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b/go.mod h1:CgujABENc3KuTrcsdpGmrrASjtQsWCT7R99mEV4U/fM= 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-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= -k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= -k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/cronjob.go b/pkg/client/applyconfiguration/batch/v1alpha1/cronjob.go index eeb66bd5..d61bbbc7 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/cronjob.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/cronjob.go @@ -25,11 +25,19 @@ import ( // CronJobApplyConfiguration represents a declarative configuration of the CronJob type for use // with apply. +// +// CronJob is the Schema for the cronjobs API type CronJobApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *CronJobSpecApplyConfiguration `json:"spec,omitempty"` - Status *CronJobStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of a cron job, including the schedule. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *CronJobSpecApplyConfiguration `json:"spec,omitempty"` + // Current status of a cron job. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Status *CronJobStatusApplyConfiguration `json:"status,omitempty"` } // CronJob constructs a declarative configuration of the CronJob type for use with @@ -42,6 +50,7 @@ func CronJob(name, namespace string) *CronJobApplyConfiguration { b.WithAPIVersion("batch.volcano.sh/v1alpha1") return b } + func (b CronJobApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/cronjobspec.go b/pkg/client/applyconfiguration/batch/v1alpha1/cronjobspec.go index 5a9807fd..4ee669ee 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/cronjobspec.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/cronjobspec.go @@ -23,15 +23,43 @@ import ( // CronJobSpecApplyConfiguration represents a declarative configuration of the CronJobSpec type for use // with apply. +// +// CronJobSpec defines the desired state of Cronjob type CronJobSpecApplyConfiguration struct { - Schedule *string `json:"schedule,omitempty"` - TimeZone *string `json:"timeZone,omitempty"` - StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` - ConcurrencyPolicy *batchv1alpha1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` - Suspend *bool `json:"suspend,omitempty"` - JobTemplate *JobTemplateSpecApplyConfiguration `json:"jobTemplate,omitempty"` - SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"` - FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"` + // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + Schedule *string `json:"schedule,omitempty"` + // The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. + // If not specified, this will default to the time zone of the kube-controller-manager process. + // The set of valid time zone names and the time zone offset is loaded from the system-wide time zone + // database by the API server during CronJob validation and the controller manager during execution. + // If no system-wide time zone database can be found a bundled version of the database is used instead. + // If the time zone name becomes invalid during the lifetime of a CronJob or due to a change in host + // configuration, the controller will stop creating new new Jobs and will create a system event with the + // reason UnknownTimeZone. + // More information can be found in https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones + TimeZone *string `json:"timeZone,omitempty"` + // Optional deadline in seconds for starting the job if it misses scheduled + // time for any reason. Missed jobs executions will be counted as failed ones. + StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` + // Specifies how to treat concurrent executions of a Job. + // Valid values are: + // - "Allow" (default): allows CronJobs to run concurrently; + // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; + // - "Replace": cancels currently running job and replaces it with a new one + ConcurrencyPolicy *batchv1alpha1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` + // This flag tells the controller to suspend subsequent executions, it does + // not apply to already started executions. Defaults to false. + Suspend *bool `json:"suspend,omitempty"` + // Specifies the job that will be created when executing a CronJob. + JobTemplate *JobTemplateSpecApplyConfiguration `json:"jobTemplate,omitempty"` + // The number of successful finished jobs to retain. + // This is a pointer to distinguish between explicit zero and not specified. + // Defaults to 3. + SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"` + // The number of failed finished jobs to retain. + // This is a pointer to distinguish between explicit zero and not specified. + // Defaults to 3. + FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"` } // CronJobSpecApplyConfiguration constructs a declarative configuration of the CronJobSpec type for use with diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/cronjobstatus.go b/pkg/client/applyconfiguration/batch/v1alpha1/cronjobstatus.go index 683a898d..f4798eb3 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/cronjobstatus.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/cronjobstatus.go @@ -24,10 +24,15 @@ import ( // CronJobStatusApplyConfiguration represents a declarative configuration of the CronJobStatus type for use // with apply. +// +// CronJobStatus represents the current state of a cron job. type CronJobStatusApplyConfiguration struct { - Active []v1.ObjectReference `json:"active,omitempty"` - LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"` - LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty"` + // A list of pointers to currently running jobs. + Active []v1.ObjectReference `json:"active,omitempty"` + // Information when was the last time the job was successfully scheduled. + LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"` + // Information when was the last time the job successfully completed. + LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty"` } // CronJobStatusApplyConfiguration constructs a declarative configuration of the CronJobStatus type for use with diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/dependson.go b/pkg/client/applyconfiguration/batch/v1alpha1/dependson.go index c0705bf8..cce82e28 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/dependson.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/dependson.go @@ -23,8 +23,16 @@ import ( // DependsOnApplyConfiguration represents a declarative configuration of the DependsOn type for use // with apply. +// +// DependsOn represents the tasks that this task depends on and their dependencies type DependsOnApplyConfiguration struct { - Name []string `json:"name,omitempty"` + // Indicates the name of the tasks that this task depends on, + // which can depend on multiple tasks + Name []string `json:"name,omitempty"` + // This field specifies that when there are multiple dependent tasks, + // as long as one task becomes the specified state, + // the task scheduling is triggered or + // all tasks must be changed to the specified state to trigger the task scheduling Iteration *batchv1alpha1.Iteration `json:"iteration,omitempty"` } diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/job.go b/pkg/client/applyconfiguration/batch/v1alpha1/job.go index 79397918..c9e178fa 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/job.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/job.go @@ -25,11 +25,15 @@ import ( // JobApplyConfiguration represents a declarative configuration of the Job type for use // with apply. +// +// Job defines the volcano job. type JobApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *JobSpecApplyConfiguration `json:"spec,omitempty"` - Status *JobStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of the volcano job, including the minAvailable + Spec *JobSpecApplyConfiguration `json:"spec,omitempty"` + // Current status of the volcano Job + Status *JobStatusApplyConfiguration `json:"status,omitempty"` } // Job constructs a declarative configuration of the Job type for use with @@ -42,6 +46,7 @@ func Job(name, namespace string) *JobApplyConfiguration { b.WithAPIVersion("batch.volcano.sh/v1alpha1") return b } + func (b JobApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/jobcondition.go b/pkg/client/applyconfiguration/batch/v1alpha1/jobcondition.go index db70e97f..4ad5b494 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/jobcondition.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/jobcondition.go @@ -24,9 +24,13 @@ import ( // JobConditionApplyConfiguration represents a declarative configuration of the JobCondition type for use // with apply. +// +// JobCondition contains details for the current condition of this job. type JobConditionApplyConfiguration struct { - Status *batchv1alpha1.JobPhase `json:"status,omitempty"` - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` + // Status is the new phase of job after performing the state's action. + Status *batchv1alpha1.JobPhase `json:"status,omitempty"` + // Last time the condition transitioned from one phase to another. + LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` } // JobConditionApplyConfiguration constructs a declarative configuration of the JobCondition type for use with diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/jobspec.go b/pkg/client/applyconfiguration/batch/v1alpha1/jobspec.go index 2e2fccde..800af4ef 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/jobspec.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/jobspec.go @@ -23,20 +23,44 @@ import ( // JobSpecApplyConfiguration represents a declarative configuration of the JobSpec type for use // with apply. +// +// JobSpec describes how the job execution will look like and when it will actually run. type JobSpecApplyConfiguration struct { - SchedulerName *string `json:"schedulerName,omitempty"` - MinAvailable *int32 `json:"minAvailable,omitempty"` - Volumes []VolumeSpecApplyConfiguration `json:"volumes,omitempty"` - Tasks []TaskSpecApplyConfiguration `json:"tasks,omitempty"` - Policies []LifecyclePolicyApplyConfiguration `json:"policies,omitempty"` - Plugins map[string][]string `json:"plugins,omitempty"` - RunningEstimate *v1.Duration `json:"runningEstimate,omitempty"` - Queue *string `json:"queue,omitempty"` - MaxRetry *int32 `json:"maxRetry,omitempty"` - TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"` - PriorityClassName *string `json:"priorityClassName,omitempty"` - MinSuccess *int32 `json:"minSuccess,omitempty"` - NetworkTopology *NetworkTopologySpecApplyConfiguration `json:"networkTopology,omitempty"` + // SchedulerName is the default value of `tasks.template.spec.schedulerName`. + SchedulerName *string `json:"schedulerName,omitempty"` + // The minimal available pods to run for this Job + // Defaults to the summary of tasks' replicas + MinAvailable *int32 `json:"minAvailable,omitempty"` + // The volumes mount on Job + Volumes []VolumeSpecApplyConfiguration `json:"volumes,omitempty"` + // Tasks specifies the task specification of Job + Tasks []TaskSpecApplyConfiguration `json:"tasks,omitempty"` + // Specifies the default lifecycle of tasks + Policies []LifecyclePolicyApplyConfiguration `json:"policies,omitempty"` + // Specifies the plugin of job + // Key is plugin name, value is the arguments of the plugin + Plugins map[string][]string `json:"plugins,omitempty"` + // Running Estimate is a user running duration estimate for the job + // Default to nil + RunningEstimate *v1.Duration `json:"runningEstimate,omitempty"` + // Specifies the queue that will be used in the scheduler, "default" queue is used this leaves empty. + Queue *string `json:"queue,omitempty"` + // Specifies the maximum number of retries before marking this Job failed. + // Defaults to 3. + MaxRetry *int32 `json:"maxRetry,omitempty"` + // ttlSecondsAfterFinished limits the lifetime of a Job that has finished + // execution (either Completed or Failed). If this field is set, + // ttlSecondsAfterFinished after the Job finishes, it is eligible to be + // automatically deleted. If this field is unset, + // the Job won't be automatically deleted. If this field is set to zero, + // the Job becomes eligible to be deleted immediately after it finishes. + TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"` + // If specified, indicates the job's priority. + PriorityClassName *string `json:"priorityClassName,omitempty"` + // The minimal success pods to run for this Job + MinSuccess *int32 `json:"minSuccess,omitempty"` + // NetworkTopology defines the NetworkTopology config, this field works in conjunction with network topology feature and hyperNode CRD. + NetworkTopology *NetworkTopologySpecApplyConfiguration `json:"networkTopology,omitempty"` } // JobSpecApplyConfiguration constructs a declarative configuration of the JobSpec type for use with diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/jobstate.go b/pkg/client/applyconfiguration/batch/v1alpha1/jobstate.go index 1140c864..332790f7 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/jobstate.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/jobstate.go @@ -24,11 +24,17 @@ import ( // JobStateApplyConfiguration represents a declarative configuration of the JobState type for use // with apply. +// +// JobState contains details for the current state of the job. type JobStateApplyConfiguration struct { - Phase *batchv1alpha1.JobPhase `json:"phase,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` + // The phase of Job. + Phase *batchv1alpha1.JobPhase `json:"phase,omitempty"` + // Unique, one-word, CamelCase reason for the phase's last transition. + Reason *string `json:"reason,omitempty"` + // Human-readable message indicating details about last transition. + Message *string `json:"message,omitempty"` + // Last time the condition transit from one phase to another. + LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` } // JobStateApplyConfiguration constructs a declarative configuration of the JobState type for use with diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/jobstatus.go b/pkg/client/applyconfiguration/batch/v1alpha1/jobstatus.go index 8468392c..64288d6a 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/jobstatus.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/jobstatus.go @@ -23,21 +23,37 @@ import ( // JobStatusApplyConfiguration represents a declarative configuration of the JobStatus type for use // with apply. +// +// JobStatus represents the current status of a Job. type JobStatusApplyConfiguration struct { - State *JobStateApplyConfiguration `json:"state,omitempty"` - MinAvailable *int32 `json:"minAvailable,omitempty"` - TaskStatusCount map[string]TaskStateApplyConfiguration `json:"taskStatusCount,omitempty"` - Pending *int32 `json:"pending,omitempty"` - Running *int32 `json:"running,omitempty"` - Succeeded *int32 `json:"succeeded,omitempty"` - Failed *int32 `json:"failed,omitempty"` - Terminating *int32 `json:"terminating,omitempty"` - Unknown *int32 `json:"unknown,omitempty"` - Version *int32 `json:"version,omitempty"` - RetryCount *int32 `json:"retryCount,omitempty"` - RunningDuration *v1.Duration `json:"runningDuration,omitempty"` - ControlledResources map[string]string `json:"controlledResources,omitempty"` - Conditions []JobConditionApplyConfiguration `json:"conditions,omitempty"` + // Current state of Job. + State *JobStateApplyConfiguration `json:"state,omitempty"` + // The minimal available pods to run for this Job + MinAvailable *int32 `json:"minAvailable,omitempty"` + // The status of pods for each task + TaskStatusCount map[string]TaskStateApplyConfiguration `json:"taskStatusCount,omitempty"` + // The number of pending pods. + Pending *int32 `json:"pending,omitempty"` + // The number of running pods. + Running *int32 `json:"running,omitempty"` + // The number of pods which reached phase Succeeded. + Succeeded *int32 `json:"succeeded,omitempty"` + // The number of pods which reached phase Failed. + Failed *int32 `json:"failed,omitempty"` + // The number of pods which reached phase Terminating. + Terminating *int32 `json:"terminating,omitempty"` + // The number of pods which reached phase Unknown. + Unknown *int32 `json:"unknown,omitempty"` + // Current version of job + Version *int32 `json:"version,omitempty"` + // The number of Job retries. + RetryCount *int32 `json:"retryCount,omitempty"` + // The job running duration is the length of time from job running to complete. + RunningDuration *v1.Duration `json:"runningDuration,omitempty"` + // The resources that controlled by this job, e.g. Service, ConfigMap + ControlledResources map[string]string `json:"controlledResources,omitempty"` + // Which conditions caused the current job state. + Conditions []JobConditionApplyConfiguration `json:"conditions,omitempty"` } // JobStatusApplyConfiguration constructs a declarative configuration of the JobStatus type for use with diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/jobtemplatespec.go b/pkg/client/applyconfiguration/batch/v1alpha1/jobtemplatespec.go index 4bdd21b4..3799e8d7 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/jobtemplatespec.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/jobtemplatespec.go @@ -25,9 +25,15 @@ import ( // JobTemplateSpecApplyConfiguration represents a declarative configuration of the JobTemplateSpec type for use // with apply. +// +// JobTemplateSpec describes the data a Job should have when created from a template type JobTemplateSpecApplyConfiguration struct { + // Standard object's metadata of the jobs created from this template. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *JobSpecApplyConfiguration `json:"spec,omitempty"` + // Specification of the desired behavior of the job. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *JobSpecApplyConfiguration `json:"spec,omitempty"` } // JobTemplateSpecApplyConfiguration constructs a declarative configuration of the JobTemplateSpec type for use with diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/lifecyclepolicy.go b/pkg/client/applyconfiguration/batch/v1alpha1/lifecyclepolicy.go index fb490b97..4fabc1f6 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/lifecyclepolicy.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/lifecyclepolicy.go @@ -24,12 +24,26 @@ import ( // LifecyclePolicyApplyConfiguration represents a declarative configuration of the LifecyclePolicy type for use // with apply. +// +// LifecyclePolicy specifies the lifecycle and error handling of task and job. type LifecyclePolicyApplyConfiguration struct { - 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"` + // The action that will be taken to the PodGroup according to Event. + // One of "Restart", "None". + // Default to None. + Action *busv1alpha1.Action `json:"action,omitempty"` + // The Event recorded by scheduler; the controller takes actions + // according to this Event. + Event *busv1alpha1.Event `json:"event,omitempty"` + // The Events recorded by scheduler; the controller takes actions + // according to this Events. + Events []busv1alpha1.Event `json:"events,omitempty"` + // The exit code of the pod container, controller will take action + // according to this code. + // Note: only one of `Event` or `ExitCode` can be specified. + ExitCode *int32 `json:"exitCode,omitempty"` + // Timeout is the grace period for controller to take actions. + // Default to nil (take action immediately). + Timeout *v1.Duration `json:"timeout,omitempty"` } // LifecyclePolicyApplyConfiguration constructs a declarative configuration of the LifecyclePolicy type for use with diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/networktopologyspec.go b/pkg/client/applyconfiguration/batch/v1alpha1/networktopologyspec.go index c701421a..f510948f 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/networktopologyspec.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/networktopologyspec.go @@ -24,9 +24,13 @@ import ( // NetworkTopologySpecApplyConfiguration represents a declarative configuration of the NetworkTopologySpec type for use // with apply. type NetworkTopologySpecApplyConfiguration struct { - Mode *batchv1alpha1.NetworkTopologyMode `json:"mode,omitempty"` - HighestTierAllowed *int `json:"highestTierAllowed,omitempty"` - HighestTierName *string `json:"highestTierName,omitempty"` + // Mode specifies the mode of the network topology constrain. + Mode *batchv1alpha1.NetworkTopologyMode `json:"mode,omitempty"` + // HighestTierAllowed specifies the highest tier that a job allowed to cross when scheduling. + HighestTierAllowed *int `json:"highestTierAllowed,omitempty"` + // HighestTierName specifies the highest tier name that a job allowed to cross when scheduling. + // HighestTierName and HighestTierAllowed cannot be set simultaneously. + HighestTierName *string `json:"highestTierName,omitempty"` } // NetworkTopologySpecApplyConfiguration constructs a declarative configuration of the NetworkTopologySpec type for use with diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/partitionpolicyspec.go b/pkg/client/applyconfiguration/batch/v1alpha1/partitionpolicyspec.go index 2585ef0f..72007f8d 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/partitionpolicyspec.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/partitionpolicyspec.go @@ -20,10 +20,15 @@ package v1alpha1 // PartitionPolicySpecApplyConfiguration represents a declarative configuration of the PartitionPolicySpec type for use // with apply. type PartitionPolicySpecApplyConfiguration struct { - TotalPartitions *int32 `json:"totalPartitions,omitempty"` - PartitionSize *int32 `json:"partitionSize,omitempty"` + // TotalPartitions indicates how many groups a set of pods within a task is divided into. + // The product of TotalPartitions and PartitionSize should be equal to Replicas. + TotalPartitions *int32 `json:"totalPartitions,omitempty"` + // PartitionSize is the number of pods included in each group. + PartitionSize *int32 `json:"partitionSize,omitempty"` + // NetworkTopology defines the NetworkTopology config, this field works in conjunction with network topology feature and hyperNode CRD. NetworkTopology *NetworkTopologySpecApplyConfiguration `json:"networkTopology,omitempty"` - MinPartitions *int32 `json:"minPartitions,omitempty"` + // MinPartitions defines the minimum number of sub-affinity groups required. + MinPartitions *int32 `json:"minPartitions,omitempty"` } // PartitionPolicySpecApplyConfiguration constructs a declarative configuration of the PartitionPolicySpec type for use with diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/taskspec.go b/pkg/client/applyconfiguration/batch/v1alpha1/taskspec.go index e092ff8f..df968c92 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/taskspec.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/taskspec.go @@ -24,15 +24,29 @@ import ( // TaskSpecApplyConfiguration represents a declarative configuration of the TaskSpec type for use // with apply. +// +// TaskSpec specifies the task specification of Job. type TaskSpecApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Replicas *int32 `json:"replicas,omitempty"` - MinAvailable *int32 `json:"minAvailable,omitempty"` - Template *v1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` - Policies []LifecyclePolicyApplyConfiguration `json:"policies,omitempty"` - TopologyPolicy *batchv1alpha1.NumaPolicy `json:"topologyPolicy,omitempty"` - MaxRetry *int32 `json:"maxRetry,omitempty"` - DependsOn *DependsOnApplyConfiguration `json:"dependsOn,omitempty"` + // Name specifies the name of tasks + Name *string `json:"name,omitempty"` + // Replicas specifies the replicas of this TaskSpec in Job + Replicas *int32 `json:"replicas,omitempty"` + // The minimal available pods to run for this Task + // Defaults to the task replicas + MinAvailable *int32 `json:"minAvailable,omitempty"` + // Specifies the pod that will be created for this TaskSpec + // when executing a Job + Template *v1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + // Specifies the lifecycle of task + Policies []LifecyclePolicyApplyConfiguration `json:"policies,omitempty"` + // Specifies the topology policy of task + TopologyPolicy *batchv1alpha1.NumaPolicy `json:"topologyPolicy,omitempty"` + // Specifies the maximum number of retries before marking this Task failed. + // Defaults to 3. + MaxRetry *int32 `json:"maxRetry,omitempty"` + // Specifies the tasks that this task depends on. + DependsOn *DependsOnApplyConfiguration `json:"dependsOn,omitempty"` + // PartitionPolicy defines the partition policy of a task. PartitionPolicy *PartitionPolicySpecApplyConfiguration `json:"partitionPolicy,omitempty"` } diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/taskstate.go b/pkg/client/applyconfiguration/batch/v1alpha1/taskstate.go index c07ae57b..5874abc4 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/taskstate.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/taskstate.go @@ -23,7 +23,10 @@ import ( // TaskStateApplyConfiguration represents a declarative configuration of the TaskState type for use // with apply. +// +// TaskState contains details for the current state of the task. type TaskStateApplyConfiguration struct { + // The phase of Task. Phase map[v1.PodPhase]int32 `json:"phase,omitempty"` } diff --git a/pkg/client/applyconfiguration/batch/v1alpha1/volumespec.go b/pkg/client/applyconfiguration/batch/v1alpha1/volumespec.go index 8ca25fd9..549fc490 100644 --- a/pkg/client/applyconfiguration/batch/v1alpha1/volumespec.go +++ b/pkg/client/applyconfiguration/batch/v1alpha1/volumespec.go @@ -23,10 +23,16 @@ import ( // VolumeSpecApplyConfiguration represents a declarative configuration of the VolumeSpec type for use // with apply. +// +// VolumeSpec defines the specification of Volume, e.g. PVC. type VolumeSpecApplyConfiguration struct { - MountPath *string `json:"mountPath,omitempty"` - VolumeClaimName *string `json:"volumeClaimName,omitempty"` - VolumeClaim *v1.PersistentVolumeClaimSpec `json:"volumeClaim,omitempty"` + // Path within the container at which the volume should be mounted. Must + // not contain ':'. + MountPath *string `json:"mountPath,omitempty"` + // defined the PVC name + VolumeClaimName *string `json:"volumeClaimName,omitempty"` + // VolumeClaim defines the PVC used by the VolumeMount. + VolumeClaim *v1.PersistentVolumeClaimSpec `json:"volumeClaim,omitempty"` } // VolumeSpecApplyConfiguration constructs a declarative configuration of the VolumeSpec type for use with diff --git a/pkg/client/applyconfiguration/bus/v1alpha1/command.go b/pkg/client/applyconfiguration/bus/v1alpha1/command.go index 2a292404..d6156b0c 100644 --- a/pkg/client/applyconfiguration/bus/v1alpha1/command.go +++ b/pkg/client/applyconfiguration/bus/v1alpha1/command.go @@ -25,13 +25,19 @@ import ( // CommandApplyConfiguration represents a declarative configuration of the Command type for use // with apply. +// +// Command defines command structure. type CommandApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Action *string `json:"action,omitempty"` - TargetObject *v1.OwnerReferenceApplyConfiguration `json:"target,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + // Action defines the action that will be took to the target object. + Action *string `json:"action,omitempty"` + // TargetObject defines the target object of this command. + TargetObject *v1.OwnerReferenceApplyConfiguration `json:"target,omitempty"` + // Unique, one-word, CamelCase reason for this command. + Reason *string `json:"reason,omitempty"` + // Human-readable message indicating details of this command. + Message *string `json:"message,omitempty"` } // Command constructs a declarative configuration of the Command type for use with @@ -44,6 +50,7 @@ func Command(name, namespace string) *CommandApplyConfiguration { b.WithAPIVersion("bus.volcano.sh/v1alpha1") return b } + func (b CommandApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/pkg/client/applyconfiguration/config/v1alpha1/colocationconfiguration.go b/pkg/client/applyconfiguration/config/v1alpha1/colocationconfiguration.go index 1e92332f..5ee6b0b8 100644 --- a/pkg/client/applyconfiguration/config/v1alpha1/colocationconfiguration.go +++ b/pkg/client/applyconfiguration/config/v1alpha1/colocationconfiguration.go @@ -25,11 +25,16 @@ import ( // ColocationConfigurationApplyConfiguration represents a declarative configuration of the ColocationConfiguration type for use // with apply. +// +// ColocationConfiguration is the Schema for the colocationconfigurations API type ColocationConfigurationApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // metadata is a standard object metadata *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ColocationConfigurationSpecApplyConfiguration `json:"spec,omitempty"` - Status *ColocationConfigurationStatusApplyConfiguration `json:"status,omitempty"` + // spec defines the desired state of ColocationConfiguration + Spec *ColocationConfigurationSpecApplyConfiguration `json:"spec,omitempty"` + // status defines the observed state of ColocationConfiguration + Status *ColocationConfigurationStatusApplyConfiguration `json:"status,omitempty"` } // ColocationConfiguration constructs a declarative configuration of the ColocationConfiguration type for use with @@ -42,6 +47,7 @@ func ColocationConfiguration(name, namespace string) *ColocationConfigurationApp b.WithAPIVersion("config.volcano.sh/v1alpha1") return b } + func (b ColocationConfigurationApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/pkg/client/applyconfiguration/config/v1alpha1/colocationconfigurationspec.go b/pkg/client/applyconfiguration/config/v1alpha1/colocationconfigurationspec.go index 7f0c9c64..48b9a23e 100644 --- a/pkg/client/applyconfiguration/config/v1alpha1/colocationconfigurationspec.go +++ b/pkg/client/applyconfiguration/config/v1alpha1/colocationconfigurationspec.go @@ -23,8 +23,12 @@ import ( // ColocationConfigurationSpecApplyConfiguration represents a declarative configuration of the ColocationConfigurationSpec type for use // with apply. +// +// ColocationConfigurationSpec defines the desired state of ColocationConfiguration type ColocationConfigurationSpecApplyConfiguration struct { - Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // Selector is a label selector to match the target pods + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` + // Configuration defines the colocation configuration for the target pods ConfigurationApplyConfiguration `json:",inline"` } diff --git a/pkg/client/applyconfiguration/config/v1alpha1/colocationconfigurationstatus.go b/pkg/client/applyconfiguration/config/v1alpha1/colocationconfigurationstatus.go index e49adc37..079d1364 100644 --- a/pkg/client/applyconfiguration/config/v1alpha1/colocationconfigurationstatus.go +++ b/pkg/client/applyconfiguration/config/v1alpha1/colocationconfigurationstatus.go @@ -23,7 +23,18 @@ import ( // ColocationConfigurationStatusApplyConfiguration represents a declarative configuration of the ColocationConfigurationStatus type for use // with apply. +// +// ColocationConfigurationStatus defines the observed state of ColocationConfiguration. type ColocationConfigurationStatusApplyConfiguration struct { + // conditions represent the current state of the ColocationConfiguration resource. + // Each condition has a unique type and reflects the status of a specific aspect of the resource. + // + // Standard condition types include: + // - "Available": the resource is fully functional + // - "Progressing": the resource is being created or updated + // - "Degraded": the resource failed to reach or maintain its desired state + // + // The status of each condition is one of True, False, or Unknown. Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` } diff --git a/pkg/client/applyconfiguration/config/v1alpha1/configuration.go b/pkg/client/applyconfiguration/config/v1alpha1/configuration.go index 8f810674..886474ee 100644 --- a/pkg/client/applyconfiguration/config/v1alpha1/configuration.go +++ b/pkg/client/applyconfiguration/config/v1alpha1/configuration.go @@ -20,6 +20,7 @@ package v1alpha1 // ConfigurationApplyConfiguration represents a declarative configuration of the Configuration type for use // with apply. type ConfigurationApplyConfiguration struct { + // MemoryQos defines the memory QoS configuration MemoryQos *MemoryQosApplyConfiguration `json:"memoryQos,omitempty"` } diff --git a/pkg/client/applyconfiguration/config/v1alpha1/memoryqos.go b/pkg/client/applyconfiguration/config/v1alpha1/memoryqos.go index 24cff229..e846bc21 100644 --- a/pkg/client/applyconfiguration/config/v1alpha1/memoryqos.go +++ b/pkg/client/applyconfiguration/config/v1alpha1/memoryqos.go @@ -20,9 +20,12 @@ package v1alpha1 // MemoryQosApplyConfiguration represents a declarative configuration of the MemoryQos type for use // with apply. type MemoryQosApplyConfiguration struct { + // HighRatio is the memory throttling ratio; default=100, range: 0~100 HighRatio *int `json:"highRatio,omitempty"` - LowRatio *int `json:"lowRatio,omitempty"` - MinRatio *int `json:"minRatio,omitempty"` + // LowRatio is the memory priority protection ratio; default=0, range: 0~100 + LowRatio *int `json:"lowRatio,omitempty"` + // MinRatio is the absolute memory protection ratio; default=0, range: 0~100 + MinRatio *int `json:"minRatio,omitempty"` } // MemoryQosApplyConfiguration constructs a declarative configuration of the MemoryQos type for use with diff --git a/pkg/client/applyconfiguration/datadependency/v1alpha1/datasource.go b/pkg/client/applyconfiguration/datadependency/v1alpha1/datasource.go index 91d3c1ed..f90705cb 100644 --- a/pkg/client/applyconfiguration/datadependency/v1alpha1/datasource.go +++ b/pkg/client/applyconfiguration/datadependency/v1alpha1/datasource.go @@ -25,6 +25,9 @@ import ( // DataSourceApplyConfiguration represents a declarative configuration of the DataSource type for use // with apply. +// +// DataSource represents a cached query result for data sources in the federated environment. +// It is a cluster-scoped resource. type DataSourceApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` @@ -41,6 +44,7 @@ func DataSource(name string) *DataSourceApplyConfiguration { b.WithAPIVersion("datadependency.volcano.sh/v1alpha1") return b } + func (b DataSourceApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourceclaim.go b/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourceclaim.go index f3e9ca81..2dde5840 100644 --- a/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourceclaim.go +++ b/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourceclaim.go @@ -25,6 +25,10 @@ import ( // DataSourceClaimApplyConfiguration represents a declarative configuration of the DataSourceClaim type for use // with apply. +// +// ================================== DataSourceClaim ================================== +// DataSourceClaim is a request for a DataSource by a user. +// It is a namespaced resource. type DataSourceClaimApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` @@ -42,6 +46,7 @@ func DataSourceClaim(name, namespace string) *DataSourceClaimApplyConfiguration b.WithAPIVersion("datadependency.volcano.sh/v1alpha1") return b } + func (b DataSourceClaimApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourceclaimspec.go b/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourceclaimspec.go index a60efe59..343b39df 100644 --- a/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourceclaimspec.go +++ b/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourceclaimspec.go @@ -19,12 +19,22 @@ package v1alpha1 // DataSourceClaimSpecApplyConfiguration represents a declarative configuration of the DataSourceClaimSpec type for use // with apply. +// +// DataSourceClaimSpec defines the desired state of DataSourceClaim. type DataSourceClaimSpecApplyConfiguration struct { - System *string `json:"system,omitempty"` - DataSourceType *string `json:"dataSourceType,omitempty"` - DataSourceName *string `json:"dataSourceName,omitempty"` - Workload *WorkloadRefApplyConfiguration `json:"workload,omitempty"` - Attributes map[string]string `json:"attributes,omitempty"` + // System is the required underlying data system of the data source. + System *string `json:"system,omitempty"` + // DataSourceType is the required category of the data source within the system. + DataSourceType *string `json:"dataSourceType,omitempty"` + // DataSourceName specifies the logical name of the cached data source to claim. + // It will be matched against DataSource's spec.name field. + DataSourceName *string `json:"dataSourceName,omitempty"` + // Workload specifies the workload that this claim is associated with. + // This enables the controller to precisely identify and manage the workload + // using Dynamic Client without requiring complex selectors or UIDs. + Workload *WorkloadRefApplyConfiguration `json:"workload,omitempty"` + // Attributes provides extra, non-identifying metadata. + Attributes map[string]string `json:"attributes,omitempty"` } // DataSourceClaimSpecApplyConfiguration constructs a declarative configuration of the DataSourceClaimSpec type for use with diff --git a/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourceclaimstatus.go b/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourceclaimstatus.go index 8a0b742f..b464f421 100644 --- a/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourceclaimstatus.go +++ b/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourceclaimstatus.go @@ -24,10 +24,16 @@ import ( // DataSourceClaimStatusApplyConfiguration represents a declarative configuration of the DataSourceClaimStatus type for use // with apply. +// +// DataSourceClaimStatus defines the observed state of DataSourceClaim. type DataSourceClaimStatusApplyConfiguration struct { - Phase *datadependencyv1alpha1.DSCPhase `json:"phase,omitempty"` - BoundDataSource *string `json:"boundDataSource,omitempty"` - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + // Phase indicates the current lifecycle phase of the claim. + Phase *datadependencyv1alpha1.DSCPhase `json:"phase,omitempty"` + // BoundDataSource specifies the name of the DataSource object + // that is bound to this claim for scheduling. + BoundDataSource *string `json:"boundDataSource,omitempty"` + // Conditions store the available observations of the claim's state. + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` } // DataSourceClaimStatusApplyConfiguration constructs a declarative configuration of the DataSourceClaimStatus type for use with diff --git a/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourcelocality.go b/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourcelocality.go index 57c72c4e..b6c7f625 100644 --- a/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourcelocality.go +++ b/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourcelocality.go @@ -19,7 +19,12 @@ package v1alpha1 // DataSourceLocalityApplyConfiguration represents a declarative configuration of the DataSourceLocality type for use // with apply. +// +// DataSourceLocality specifies the cached location information of the data source. type DataSourceLocalityApplyConfiguration struct { + // ClusterNames is a list of cluster names where the cached data source information indicates availability. + // This provides a simple and direct way to specify cached data source location + // without interfering with user-defined ResourceBinding cluster affinity. ClusterNames []string `json:"clusterNames,omitempty"` } diff --git a/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourcespec.go b/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourcespec.go index 906548e9..d3da7bc2 100644 --- a/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourcespec.go +++ b/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourcespec.go @@ -23,12 +23,26 @@ import ( // DataSourceSpecApplyConfiguration represents a declarative configuration of the DataSourceSpec type for use // with apply. +// +// DataSourceSpec defines the desired state of DataSource. type DataSourceSpecApplyConfiguration struct { - System *string `json:"system,omitempty"` - Type *string `json:"type,omitempty"` - Name *string `json:"name,omitempty"` - Locality *DataSourceLocalityApplyConfiguration `json:"locality,omitempty"` - Attributes map[string]string `json:"attributes,omitempty"` + // System specifies the underlying data system. + // This provides context for the 'name' and 'attributes' fields. + // e.g., "hive", "s3", "hdfs". + System *string `json:"system,omitempty"` + // Type specifies the category of the data source within the system. + // e.g., for system="hive", type could be "table", "view". + // e.g., for system="s3", type could be "bucket", "object", "prefix". + Type *string `json:"type,omitempty"` + // Name is the identifier of the data source, its format is interpreted + // in the context of the 'system' and 'type'. + Name *string `json:"name,omitempty"` + // Locality defines which clusters this data source is available on. + Locality *DataSourceLocalityApplyConfiguration `json:"locality,omitempty"` + // Attributes provides extra, non-identifying metadata. + Attributes map[string]string `json:"attributes,omitempty"` + // ReclaimPolicy defines what happens to this DataSource when its last bound DataSourceClaim is deleted. + // Defaults to "Retain". ReclaimPolicy *datadependencyv1alpha1.DataSourceReclaimPolicy `json:"reclaimPolicy,omitempty"` } diff --git a/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourcestatus.go b/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourcestatus.go index 363e73f2..fe51c8b5 100644 --- a/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourcestatus.go +++ b/pkg/client/applyconfiguration/datadependency/v1alpha1/datasourcestatus.go @@ -24,10 +24,18 @@ import ( // DataSourceStatusApplyConfiguration represents a declarative configuration of the DataSourceStatus type for use // with apply. +// +// DataSourceStatus defines the observed state of DataSource. type DataSourceStatusApplyConfiguration struct { - ClaimRefs []v1.ObjectReference `json:"claimRefs,omitempty"` - BoundClaims *int32 `json:"boundClaims,omitempty"` - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` + // ClaimRefs is a list of references to DataSourceClaims that are bound to this DataSource. + // The presence of items in this list indicates the DataSource is in use. + ClaimRefs []v1.ObjectReference `json:"claimRefs,omitempty"` + // BoundClaims counts the number of DataSourceClaims currently bound to this DataSource. + // This provides a quick summary of its usage. + BoundClaims *int32 `json:"boundClaims,omitempty"` + // Conditions store the available observations of the DataSource's state. + // This is more flexible than a single phase. + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` } // DataSourceStatusApplyConfiguration constructs a declarative configuration of the DataSourceStatus type for use with diff --git a/pkg/client/applyconfiguration/datadependency/v1alpha1/workloadref.go b/pkg/client/applyconfiguration/datadependency/v1alpha1/workloadref.go index 8852846b..60d71746 100644 --- a/pkg/client/applyconfiguration/datadependency/v1alpha1/workloadref.go +++ b/pkg/client/applyconfiguration/datadependency/v1alpha1/workloadref.go @@ -19,11 +19,21 @@ package v1alpha1 // WorkloadRefApplyConfiguration represents a declarative configuration of the WorkloadRef type for use // with apply. +// +// WorkloadRef defines a reference to a workload resource that can be used with Dynamic Client. +// It provides the minimal fields needed to precisely identify and retrieve a workload. type WorkloadRefApplyConfiguration struct { + // APIVersion is the API version of the workload resource. + // e.g., "apps/v1", "batch.volcano.sh/v1alpha1" APIVersion *string `json:"apiVersion,omitempty"` - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` - Namespace *string `json:"namespace,omitempty"` + // Kind is the kind of the workload resource. + // e.g., "Deployment", "Job" + Kind *string `json:"kind,omitempty"` + // Name is the name of the workload resource. + Name *string `json:"name,omitempty"` + // Namespace is the namespace of the workload resource. + // If empty, defaults to the namespace of the DataSourceClaim. + Namespace *string `json:"namespace,omitempty"` } // WorkloadRefApplyConfiguration constructs a declarative configuration of the WorkloadRef type for use with diff --git a/pkg/client/applyconfiguration/flow/v1alpha1/flow.go b/pkg/client/applyconfiguration/flow/v1alpha1/flow.go index 9b018ea6..35abb398 100644 --- a/pkg/client/applyconfiguration/flow/v1alpha1/flow.go +++ b/pkg/client/applyconfiguration/flow/v1alpha1/flow.go @@ -19,6 +19,8 @@ package v1alpha1 // FlowApplyConfiguration represents a declarative configuration of the Flow type for use // with apply. +// +// Flow defines the dependent of jobs type FlowApplyConfiguration struct { Name *string `json:"name,omitempty"` DependsOn *DependsOnApplyConfiguration `json:"dependsOn,omitempty"` diff --git a/pkg/client/applyconfiguration/flow/v1alpha1/jobflow.go b/pkg/client/applyconfiguration/flow/v1alpha1/jobflow.go index 7fb32b46..5b0126c6 100644 --- a/pkg/client/applyconfiguration/flow/v1alpha1/jobflow.go +++ b/pkg/client/applyconfiguration/flow/v1alpha1/jobflow.go @@ -25,6 +25,8 @@ import ( // JobFlowApplyConfiguration represents a declarative configuration of the JobFlow type for use // with apply. +// +// JobFlow is the Schema for the jobflows API type JobFlowApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` @@ -42,6 +44,7 @@ func JobFlow(name, namespace string) *JobFlowApplyConfiguration { b.WithAPIVersion("flow.volcano.sh/v1alpha1") return b } + func (b JobFlowApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/pkg/client/applyconfiguration/flow/v1alpha1/jobflowspec.go b/pkg/client/applyconfiguration/flow/v1alpha1/jobflowspec.go index 362131d6..7471b129 100644 --- a/pkg/client/applyconfiguration/flow/v1alpha1/jobflowspec.go +++ b/pkg/client/applyconfiguration/flow/v1alpha1/jobflowspec.go @@ -23,6 +23,8 @@ import ( // JobFlowSpecApplyConfiguration represents a declarative configuration of the JobFlowSpec type for use // with apply. +// +// JobFlowSpec defines the desired state of JobFlow type JobFlowSpecApplyConfiguration struct { Flows []FlowApplyConfiguration `json:"flows,omitempty"` JobRetainPolicy *flowv1alpha1.RetainPolicy `json:"jobRetainPolicy,omitempty"` diff --git a/pkg/client/applyconfiguration/flow/v1alpha1/jobflowstatus.go b/pkg/client/applyconfiguration/flow/v1alpha1/jobflowstatus.go index 44e85599..86ff3299 100644 --- a/pkg/client/applyconfiguration/flow/v1alpha1/jobflowstatus.go +++ b/pkg/client/applyconfiguration/flow/v1alpha1/jobflowstatus.go @@ -19,6 +19,8 @@ package v1alpha1 // JobFlowStatusApplyConfiguration represents a declarative configuration of the JobFlowStatus type for use // with apply. +// +// JobFlowStatus defines the observed state of JobFlow type JobFlowStatusApplyConfiguration struct { PendingJobs []string `json:"pendingJobs,omitempty"` RunningJobs []string `json:"runningJobs,omitempty"` diff --git a/pkg/client/applyconfiguration/flow/v1alpha1/jobtemplate.go b/pkg/client/applyconfiguration/flow/v1alpha1/jobtemplate.go index f1796688..57857151 100644 --- a/pkg/client/applyconfiguration/flow/v1alpha1/jobtemplate.go +++ b/pkg/client/applyconfiguration/flow/v1alpha1/jobtemplate.go @@ -26,6 +26,8 @@ import ( // JobTemplateApplyConfiguration represents a declarative configuration of the JobTemplate type for use // with apply. +// +// JobTemplate is the Schema for the jobtemplates API type JobTemplateApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` @@ -43,6 +45,7 @@ func JobTemplate(name, namespace string) *JobTemplateApplyConfiguration { b.WithAPIVersion("flow.volcano.sh/v1alpha1") return b } + func (b JobTemplateApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/pkg/client/applyconfiguration/flow/v1alpha1/jobtemplatestatus.go b/pkg/client/applyconfiguration/flow/v1alpha1/jobtemplatestatus.go index c543fe0f..4f1d0819 100644 --- a/pkg/client/applyconfiguration/flow/v1alpha1/jobtemplatestatus.go +++ b/pkg/client/applyconfiguration/flow/v1alpha1/jobtemplatestatus.go @@ -19,7 +19,10 @@ package v1alpha1 // JobTemplateStatusApplyConfiguration represents a declarative configuration of the JobTemplateStatus type for use // with apply. +// +// JobTemplateStatus defines the observed state of JobTemplate type JobTemplateStatusApplyConfiguration struct { + // JobDependsOnList is the list of jobs that this job depends on JobDependsOnList []string `json:"jobDependsOnList,omitempty"` } diff --git a/pkg/client/applyconfiguration/nodeinfo/v1alpha1/cpuinfo.go b/pkg/client/applyconfiguration/nodeinfo/v1alpha1/cpuinfo.go index fd59578e..7b6ff17a 100644 --- a/pkg/client/applyconfiguration/nodeinfo/v1alpha1/cpuinfo.go +++ b/pkg/client/applyconfiguration/nodeinfo/v1alpha1/cpuinfo.go @@ -19,6 +19,8 @@ package v1alpha1 // CPUInfoApplyConfiguration represents a declarative configuration of the CPUInfo type for use // with apply. +// +// CPUInfo is the cpu topology detail type CPUInfoApplyConfiguration struct { NUMANodeID *int `json:"numa,omitempty"` SocketID *int `json:"socket,omitempty"` diff --git a/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopology.go b/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopology.go index 05d03631..549559a0 100644 --- a/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopology.go +++ b/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopology.go @@ -25,10 +25,13 @@ import ( // NumatopologyApplyConfiguration represents a declarative configuration of the Numatopology type for use // with apply. +// +// Numatopology is the Schema for the Numatopologies API type NumatopologyApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NumatopoSpecApplyConfiguration `json:"spec,omitempty"` + // Specification of the numa information of the worker node + Spec *NumatopoSpecApplyConfiguration `json:"spec,omitempty"` } // Numatopology constructs a declarative configuration of the Numatopology type for use with @@ -40,6 +43,7 @@ func Numatopology(name string) *NumatopologyApplyConfiguration { b.WithAPIVersion("nodeinfo.volcano.sh/v1alpha1") return b } + func (b NumatopologyApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopospec.go b/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopospec.go index 8cd4affe..654fc91b 100644 --- a/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopospec.go +++ b/pkg/client/applyconfiguration/nodeinfo/v1alpha1/numatopospec.go @@ -23,11 +23,20 @@ import ( // NumatopoSpecApplyConfiguration represents a declarative configuration of the NumatopoSpec type for use // with apply. +// +// NumatopoSpec defines the desired state of Numatopology type NumatopoSpecApplyConfiguration struct { - 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"` + // Specifies the policy of the manager + Policies map[nodeinfov1alpha1.PolicyName]string `json:"policies,omitempty"` + // Specifies the reserved resource of the node + // Key is resource name + ResReserved map[string]string `json:"resReserved,omitempty"` + // Specifies the numa info for the resource + // Key is resource name + NumaResMap map[string]ResourceInfoApplyConfiguration `json:"numares,omitempty"` + // Specifies the cpu topology info + // Key is cpu id + CPUDetail map[string]CPUInfoApplyConfiguration `json:"cpuDetail,omitempty"` } // NumatopoSpecApplyConfiguration constructs a declarative configuration of the NumatopoSpec type for use with diff --git a/pkg/client/applyconfiguration/nodeinfo/v1alpha1/resourceinfo.go b/pkg/client/applyconfiguration/nodeinfo/v1alpha1/resourceinfo.go index 6f527564..e1907e96 100644 --- a/pkg/client/applyconfiguration/nodeinfo/v1alpha1/resourceinfo.go +++ b/pkg/client/applyconfiguration/nodeinfo/v1alpha1/resourceinfo.go @@ -19,6 +19,10 @@ package v1alpha1 // ResourceInfoApplyConfiguration represents a declarative configuration of the ResourceInfo type for use // with apply. +// +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. +// ResourceInfo is the sets about resource capacity and allocatable type ResourceInfoApplyConfiguration struct { Allocatable *string `json:"allocatable,omitempty"` Capacity *int `json:"capacity,omitempty"` diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/affinity.go b/pkg/client/applyconfiguration/scheduling/v1beta1/affinity.go index 5d141a9e..25cf1810 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/affinity.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/affinity.go @@ -19,8 +19,12 @@ package v1beta1 // AffinityApplyConfiguration represents a declarative configuration of the Affinity type for use // with apply. +// +// Affinity is a group of affinity scheduling rules. type AffinityApplyConfiguration struct { - NodeGroupAffinity *NodeGroupAffinityApplyConfiguration `json:"nodeGroupAffinity,omitempty"` + // Describes nodegroup affinity scheduling rules for the queue(e.g. putting pods of the queue in the nodes of the nodegroup) + NodeGroupAffinity *NodeGroupAffinityApplyConfiguration `json:"nodeGroupAffinity,omitempty"` + // Describes nodegroup anti-affinity scheduling rules for the queue(e.g. avoid putting pods of the queue in the nodes of the nodegroup). NodeGroupAntiAffinity *NodeGroupAntiAffinityApplyConfiguration `json:"nodeGroupAntiAffinity,omitempty"` } diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/cluster.go b/pkg/client/applyconfiguration/scheduling/v1beta1/cluster.go index 1594d0f6..fd9280d7 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/cluster.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/cluster.go @@ -23,6 +23,8 @@ import ( // ClusterApplyConfiguration represents a declarative configuration of the Cluster type for use // with apply. +// +// CluterSpec represents the template of Cluster type ClusterApplyConfiguration struct { Name *string `json:"name,omitempty"` Weight *int32 `json:"weight,omitempty"` diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/guarantee.go b/pkg/client/applyconfiguration/scheduling/v1beta1/guarantee.go index 5efa54ec..f970f76b 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/guarantee.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/guarantee.go @@ -23,7 +23,10 @@ import ( // GuaranteeApplyConfiguration represents a declarative configuration of the Guarantee type for use // with apply. +// +// Guarantee represents configuration of queue resource reservation type GuaranteeApplyConfiguration struct { + // The amount of cluster resource reserved for queue. Just set either `percentage` or `resource` Resource *v1.ResourceList `json:"resource,omitempty"` } diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/networktopologyspec.go b/pkg/client/applyconfiguration/scheduling/v1beta1/networktopologyspec.go index 21ae9b9c..49504110 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/networktopologyspec.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/networktopologyspec.go @@ -24,9 +24,13 @@ import ( // NetworkTopologySpecApplyConfiguration represents a declarative configuration of the NetworkTopologySpec type for use // with apply. type NetworkTopologySpecApplyConfiguration struct { - Mode *schedulingv1beta1.NetworkTopologyMode `json:"mode,omitempty"` - HighestTierAllowed *int `json:"highestTierAllowed,omitempty"` - HighestTierName *string `json:"highestTierName,omitempty"` + // Mode specifies the mode of the network topology constrain. + Mode *schedulingv1beta1.NetworkTopologyMode `json:"mode,omitempty"` + // HighestTierAllowed specifies the highest tier that a job allowed to cross when scheduling. + HighestTierAllowed *int `json:"highestTierAllowed,omitempty"` + // HighestTierName specifies the highest tier name that a job allowed to cross when scheduling. + // HighestTierName and HighestTierAllowed cannot be set simultaneously. + HighestTierName *string `json:"highestTierName,omitempty"` } // NetworkTopologySpecApplyConfiguration constructs a declarative configuration of the NetworkTopologySpec type for use with diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/podgroup.go b/pkg/client/applyconfiguration/scheduling/v1beta1/podgroup.go index 92bc472f..16b5c44b 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/podgroup.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/podgroup.go @@ -25,11 +25,17 @@ import ( // PodGroupApplyConfiguration represents a declarative configuration of the PodGroup type for use // with apply. +// +// PodGroup is a collection of Pod; used for batch workload. type PodGroupApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PodGroupSpecApplyConfiguration `json:"spec,omitempty"` - Status *PodGroupStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of the pod group. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + Spec *PodGroupSpecApplyConfiguration `json:"spec,omitempty"` + // Status represents the current information about a pod group. + // This data may not be up to date. + Status *PodGroupStatusApplyConfiguration `json:"status,omitempty"` } // PodGroup constructs a declarative configuration of the PodGroup type for use with @@ -42,6 +48,7 @@ func PodGroup(name, namespace string) *PodGroupApplyConfiguration { b.WithAPIVersion("scheduling.volcano.sh/v1beta1") return b } + func (b PodGroupApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupcondition.go b/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupcondition.go index 5b2de0a2..00503940 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupcondition.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupcondition.go @@ -25,13 +25,21 @@ import ( // PodGroupConditionApplyConfiguration represents a declarative configuration of the PodGroupCondition type for use // with apply. +// +// PodGroupCondition contains details for the current state of this pod group. type PodGroupConditionApplyConfiguration struct { - 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"` + // Type is the type of the condition + Type *schedulingv1beta1.PodGroupConditionType `json:"type,omitempty"` + // Status is the status of the condition. + Status *v1.ConditionStatus `json:"status,omitempty"` + // The ID of condition transition. + TransitionID *string `json:"transitionID,omitempty"` + // Last time the phase transitioned from another to current phase. + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + // Unique, one-word, CamelCase reason for the phase's last transition. + Reason *string `json:"reason,omitempty"` + // Human-readable message indicating details about last transition. + Message *string `json:"message,omitempty"` } // PodGroupConditionApplyConfiguration constructs a declarative configuration of the PodGroupCondition type for use with diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupspec.go b/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupspec.go index b841888f..c6d7c669 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupspec.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupspec.go @@ -23,14 +23,38 @@ import ( // PodGroupSpecApplyConfiguration represents a declarative configuration of the PodGroupSpec type for use // with apply. +// +// PodGroupSpec represents the template of a pod group. type PodGroupSpecApplyConfiguration struct { - MinMember *int32 `json:"minMember,omitempty"` - MinTaskMember map[string]int32 `json:"minTaskMember,omitempty"` - Queue *string `json:"queue,omitempty"` - PriorityClassName *string `json:"priorityClassName,omitempty"` - MinResources *v1.ResourceList `json:"minResources,omitempty"` - NetworkTopology *NetworkTopologySpecApplyConfiguration `json:"networkTopology,omitempty"` - SubGroupPolicy []SubGroupPolicySpecApplyConfiguration `json:"subGroupPolicy,omitempty"` + // MinMember defines the minimal number of members/tasks to run the pod group; + // if there's not enough resources to start all tasks, the scheduler + // will not start anyone. + MinMember *int32 `json:"minMember,omitempty"` + // MinTaskMember defines the minimal number of pods to run for each task in the pod group; + // if there's not enough resources to start each task, the scheduler + // will not start anyone. + // SubGroupPolicy covers all capabilities of minTaskMember, while providing richer network topology and Gang scheduling management capabilities. + // Recommend using SubGroupPolicy to uniformly manage Gang scheduling for each Task group. + MinTaskMember map[string]int32 `json:"minTaskMember,omitempty"` + // Queue defines the queue to allocate resource for PodGroup; if queue does not exist, + // the PodGroup will not be scheduled. Defaults to `default` Queue with the lowest weight. + Queue *string `json:"queue,omitempty"` + // If specified, indicates the PodGroup's priority. "system-node-critical" and + // "system-cluster-critical" are two special keywords which indicate the + // highest priorities with the former being the highest priority. Any other + // name must be defined by creating a PriorityClass object with that name. + // If not specified, the PodGroup priority will be default or zero if there is no + // default. + PriorityClassName *string `json:"priorityClassName,omitempty"` + // MinResources defines the minimal resource of members/tasks to run the pod group; + // if there's not enough resources to start all tasks, the scheduler + // will not start anyone. + MinResources *v1.ResourceList `json:"minResources,omitempty"` + // NetworkTopology defines the NetworkTopology config, this field works in conjunction with network topology feature and hyperNode CRD. + NetworkTopology *NetworkTopologySpecApplyConfiguration `json:"networkTopology,omitempty"` + // Compared with minTaskMember, it offers more comprehensive topology scheduling and Gang scheduling management capabilities. + // Concurrent use with minTaskMember is not recommended, and SubGroupPolicy is the long-term evolution direction. + SubGroupPolicy []SubGroupPolicySpecApplyConfiguration `json:"subGroupPolicy,omitempty"` } // PodGroupSpecApplyConfiguration constructs a declarative configuration of the PodGroupSpec type for use with diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupstatus.go b/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupstatus.go index acd9c96d..d577eb40 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupstatus.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/podgroupstatus.go @@ -23,12 +23,19 @@ import ( // PodGroupStatusApplyConfiguration represents a declarative configuration of the PodGroupStatus type for use // with apply. +// +// PodGroupStatus represents the current state of a pod group. type PodGroupStatusApplyConfiguration struct { - Phase *schedulingv1beta1.PodGroupPhase `json:"phase,omitempty"` + // Current phase of PodGroup. + Phase *schedulingv1beta1.PodGroupPhase `json:"phase,omitempty"` + // The conditions of PodGroup. Conditions []PodGroupConditionApplyConfiguration `json:"conditions,omitempty"` - Running *int32 `json:"running,omitempty"` - Succeeded *int32 `json:"succeeded,omitempty"` - Failed *int32 `json:"failed,omitempty"` + // The number of actively running pods. + Running *int32 `json:"running,omitempty"` + // The number of pods which reached phase Succeeded. + Succeeded *int32 `json:"succeeded,omitempty"` + // The number of pods which reached phase Failed. + Failed *int32 `json:"failed,omitempty"` } // PodGroupStatusApplyConfiguration constructs a declarative configuration of the PodGroupStatus type for use with diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/queue.go b/pkg/client/applyconfiguration/scheduling/v1beta1/queue.go index 8ef487a2..d5ed48a9 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/queue.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/queue.go @@ -25,11 +25,16 @@ import ( // QueueApplyConfiguration represents a declarative configuration of the Queue type for use // with apply. +// +// Queue is a queue of PodGroup. type QueueApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *QueueSpecApplyConfiguration `json:"spec,omitempty"` - Status *QueueStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of the queue. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + Spec *QueueSpecApplyConfiguration `json:"spec,omitempty"` + // The status of queue. + Status *QueueStatusApplyConfiguration `json:"status,omitempty"` } // Queue constructs a declarative configuration of the Queue type for use with @@ -41,6 +46,7 @@ func Queue(name string) *QueueApplyConfiguration { b.WithAPIVersion("scheduling.volcano.sh/v1beta1") return b } + func (b QueueApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/queuespec.go b/pkg/client/applyconfiguration/scheduling/v1beta1/queuespec.go index 3a2797d6..b9a80c29 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/queuespec.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/queuespec.go @@ -24,17 +24,28 @@ import ( // QueueSpecApplyConfiguration represents a declarative configuration of the QueueSpec type for use // with apply. +// +// QueueSpec represents the template of Queue. type QueueSpecApplyConfiguration struct { - Weight *int32 `json:"weight,omitempty"` - Capability *v1.ResourceList `json:"capability,omitempty"` - Reclaimable *bool `json:"reclaimable,omitempty"` - ExtendClusters []ClusterApplyConfiguration `json:"extendClusters,omitempty"` - Guarantee *GuaranteeApplyConfiguration `json:"guarantee,omitempty"` - Affinity *AffinityApplyConfiguration `json:"affinity,omitempty"` - Type *string `json:"type,omitempty"` - Parent *string `json:"parent,omitempty"` - Deserved *v1.ResourceList `json:"deserved,omitempty"` - Priority *int32 `json:"priority,omitempty"` + Weight *int32 `json:"weight,omitempty"` + Capability *v1.ResourceList `json:"capability,omitempty"` + // Reclaimable indicate whether the queue can be reclaimed by other queue + Reclaimable *bool `json:"reclaimable,omitempty"` + // extendCluster indicate the jobs in this Queue will be dispatched to these clusters. + ExtendClusters []ClusterApplyConfiguration `json:"extendClusters,omitempty"` + // Guarantee indicate configuration about resource reservation + Guarantee *GuaranteeApplyConfiguration `json:"guarantee,omitempty"` + // If specified, the pod owned by the queue will be scheduled with constraint + Affinity *AffinityApplyConfiguration `json:"affinity,omitempty"` + // Type define the type of queue + Type *string `json:"type,omitempty"` + // Parent define the parent of queue + Parent *string `json:"parent,omitempty"` + // The amount of resources configured by the user. This part of resource can be shared with other queues and reclaimed back. + Deserved *v1.ResourceList `json:"deserved,omitempty"` + // Priority define the priority of queue. Higher values are prioritized for scheduling and considered later during reclamation. + Priority *int32 `json:"priority,omitempty"` + // DequeueStrategy defines the dequeue strategy of queue DequeueStrategy *schedulingv1beta1.DequeueStrategy `json:"dequeueStrategy,omitempty"` } diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/queuestatus.go b/pkg/client/applyconfiguration/scheduling/v1beta1/queuestatus.go index 615866de..b61482fe 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/queuestatus.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/queuestatus.go @@ -24,15 +24,25 @@ import ( // QueueStatusApplyConfiguration represents a declarative configuration of the QueueStatus type for use // with apply. +// +// QueueStatus represents the status of Queue. type QueueStatusApplyConfiguration struct { - State *schedulingv1beta1.QueueState `json:"state,omitempty"` - Unknown *int32 `json:"unknown,omitempty"` - Pending *int32 `json:"pending,omitempty"` - Running *int32 `json:"running,omitempty"` - Inqueue *int32 `json:"inqueue,omitempty"` - Completed *int32 `json:"completed,omitempty"` + // State is state of queue + State *schedulingv1beta1.QueueState `json:"state,omitempty"` + // The number of 'Unknown' PodGroup in this queue. + Unknown *int32 `json:"unknown,omitempty"` + // The number of 'Pending' PodGroup in this queue. + Pending *int32 `json:"pending,omitempty"` + // The number of 'Running' PodGroup in this queue. + Running *int32 `json:"running,omitempty"` + // The number of `Inqueue` PodGroup in this queue. + Inqueue *int32 `json:"inqueue,omitempty"` + // The number of `Completed` PodGroup in this queue. + Completed *int32 `json:"completed,omitempty"` + // Reservation is the profile of resource reservation for queue Reservation *ReservationApplyConfiguration `json:"reservation,omitempty"` - Allocated *v1.ResourceList `json:"allocated,omitempty"` + // Allocated is allocated resources in queue + Allocated *v1.ResourceList `json:"allocated,omitempty"` } // QueueStatusApplyConfiguration constructs a declarative configuration of the QueueStatus type for use with diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/reservation.go b/pkg/client/applyconfiguration/scheduling/v1beta1/reservation.go index cf1fc3f9..15c4b135 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/reservation.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/reservation.go @@ -23,8 +23,12 @@ import ( // ReservationApplyConfiguration represents a declarative configuration of the Reservation type for use // with apply. +// +// Reservation represents current condition about resource reservation type ReservationApplyConfiguration struct { - Nodes []string `json:"nodes,omitempty"` + // Nodes are Locked nodes for queue + Nodes []string `json:"nodes,omitempty"` + // Resource is a list of total idle resource in locked nodes. Resource *v1.ResourceList `json:"resource,omitempty"` } diff --git a/pkg/client/applyconfiguration/scheduling/v1beta1/subgrouppolicyspec.go b/pkg/client/applyconfiguration/scheduling/v1beta1/subgrouppolicyspec.go index 1e37cdd6..f477c2f0 100644 --- a/pkg/client/applyconfiguration/scheduling/v1beta1/subgrouppolicyspec.go +++ b/pkg/client/applyconfiguration/scheduling/v1beta1/subgrouppolicyspec.go @@ -24,12 +24,26 @@ import ( // SubGroupPolicySpecApplyConfiguration represents a declarative configuration of the SubGroupPolicySpec type for use // with apply. type SubGroupPolicySpecApplyConfiguration struct { - Name *string `json:"name,omitempty"` + // Name specifies the name of SubGroupPolicy + Name *string `json:"name,omitempty"` + // NetworkTopology defines the NetworkTopology config, this field works in conjunction with network topology feature and hyperNode CRD. NetworkTopology *NetworkTopologySpecApplyConfiguration `json:"networkTopology,omitempty"` - SubGroupSize *int32 `json:"subGroupSize,omitempty"` - MinSubGroups *int32 `json:"minSubGroups,omitempty"` - LabelSelector *v1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"` - MatchLabelKeys []string `json:"matchLabelKeys,omitempty"` + // SubGroupSize defines the number of pods in each sub-affinity group. + // Only when a subGroup of pods, with a size of "subGroupSize", can satisfy the network topology constraint then will the subGroup be scheduled. + SubGroupSize *int32 `json:"subGroupSize,omitempty"` + // MinSubGroups: Minimum number of subgroups required to trigger scheduling. Scheduling is initiated only if cluster resources meet the requirements of at least this number of subgroups. + // Subgroup-level Gang Scheduling + MinSubGroups *int32 `json:"minSubGroups,omitempty"` + // LabelSelector is used to find matching pods. + // Pods that match this label selector are counted to determine the number of pods + // in their corresponding topology domain. + LabelSelector *v1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"` + // MatchLabelKeys: A label-based grouping configuration field for Pods, defining filtering rules for grouping label keys + // Core function: Refine grouping of Pods that meet LabelSelector criteria by label attributes, with the following rules and constraints: + // 1. Scope: Only applies to Pods matching the predefined LabelSelector + // 2. Grouping rule: Specify one or more label keys; Pods containing the target label keys with exactly the same corresponding label values are grouped together + // 3. Policy constraint: Pods in the same group follow a unified NetworkTopology policy to achieve group-level network behavior governance + MatchLabelKeys []string `json:"matchLabelKeys,omitempty"` } // SubGroupPolicySpecApplyConfiguration constructs a declarative configuration of the SubGroupPolicySpec type for use with diff --git a/pkg/client/applyconfiguration/shard/v1alpha1/nodeshard.go b/pkg/client/applyconfiguration/shard/v1alpha1/nodeshard.go index 5b1c7393..1fc5e79a 100644 --- a/pkg/client/applyconfiguration/shard/v1alpha1/nodeshard.go +++ b/pkg/client/applyconfiguration/shard/v1alpha1/nodeshard.go @@ -25,11 +25,17 @@ import ( // NodeShardApplyConfiguration represents a declarative configuration of the NodeShard type for use // with apply. +// +// NodeShard is a collection of nodes dedicated to a specific scheduler type NodeShardApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` + v1.TypeMetaApplyConfiguration `json:",inline"` + // Standard object's metadata. *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NodeShardSpecApplyConfiguration `json:"spec,omitempty"` - Status *NodeShardStatusApplyConfiguration `json:"status,omitempty"` + // Specification of the desired behavior of the NodeShard. + Spec *NodeShardSpecApplyConfiguration `json:"spec,omitempty"` + // Status represents the current information about a NodeShard. + // This data may not be up to date. + Status *NodeShardStatusApplyConfiguration `json:"status,omitempty"` } // NodeShard constructs a declarative configuration of the NodeShard type for use with @@ -41,6 +47,7 @@ func NodeShard(name string) *NodeShardApplyConfiguration { b.WithAPIVersion("shard.volcano.sh/v1alpha1") return b } + func (b NodeShardApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/pkg/client/applyconfiguration/shard/v1alpha1/nodeshardspec.go b/pkg/client/applyconfiguration/shard/v1alpha1/nodeshardspec.go index eacb68d3..824f9389 100644 --- a/pkg/client/applyconfiguration/shard/v1alpha1/nodeshardspec.go +++ b/pkg/client/applyconfiguration/shard/v1alpha1/nodeshardspec.go @@ -19,7 +19,10 @@ package v1alpha1 // NodeShardSpecApplyConfiguration represents a declarative configuration of the NodeShardSpec type for use // with apply. +// +// NodeShardSpec represents the template of a NodeShard. type NodeShardSpecApplyConfiguration struct { + // NodesDesired defines the list of nodes desired to be included in this NodeShard. NodesDesired []string `json:"nodesDesired,omitempty"` } diff --git a/pkg/client/applyconfiguration/shard/v1alpha1/nodeshardstatus.go b/pkg/client/applyconfiguration/shard/v1alpha1/nodeshardstatus.go index cc7097e2..73f84bf6 100644 --- a/pkg/client/applyconfiguration/shard/v1alpha1/nodeshardstatus.go +++ b/pkg/client/applyconfiguration/shard/v1alpha1/nodeshardstatus.go @@ -23,11 +23,17 @@ import ( // NodeShardStatusApplyConfiguration represents a declarative configuration of the NodeShardStatus type for use // with apply. +// +// NodeShardStatus represents the current state of a NodeShard. type NodeShardStatusApplyConfiguration struct { + // LastUpdateTime is the last time the status was updated. LastUpdateTime *v1.Time `json:"lastUpdateTime,omitempty"` - NodesInUse []string `json:"nodesInUse,omitempty"` - NodesToRemove []string `json:"nodesToRemove,omitempty"` - NodesToAdd []string `json:"nodesToAdd,omitempty"` + // NodesInUse is the list of nodes currently in use by the NodeShard. + NodesInUse []string `json:"nodesInUse,omitempty"` + // NodesToRemove is the list of nodes preparing to be removed from the NodeShard. + NodesToRemove []string `json:"nodesToRemove,omitempty"` + // NodesToAdd is the list of nodes preparing to be added to the NodeShard. + NodesToAdd []string `json:"nodesToAdd,omitempty"` } // NodeShardStatusApplyConfiguration constructs a declarative configuration of the NodeShardStatus type for use with diff --git a/pkg/client/applyconfiguration/topology/v1alpha1/exactmatch.go b/pkg/client/applyconfiguration/topology/v1alpha1/exactmatch.go index 2a0d4a32..491015bd 100644 --- a/pkg/client/applyconfiguration/topology/v1alpha1/exactmatch.go +++ b/pkg/client/applyconfiguration/topology/v1alpha1/exactmatch.go @@ -19,7 +19,10 @@ package v1alpha1 // ExactMatchApplyConfiguration represents a declarative configuration of the ExactMatch type for use // with apply. +// +// ExactMatch represents the criteria for exact name matching. type ExactMatchApplyConfiguration struct { + // Name specifies the exact name of the node to match. Name *string `json:"name,omitempty"` } diff --git a/pkg/client/applyconfiguration/topology/v1alpha1/hypernode.go b/pkg/client/applyconfiguration/topology/v1alpha1/hypernode.go index c916bf34..1960dc5a 100644 --- a/pkg/client/applyconfiguration/topology/v1alpha1/hypernode.go +++ b/pkg/client/applyconfiguration/topology/v1alpha1/hypernode.go @@ -25,11 +25,15 @@ import ( // HyperNodeApplyConfiguration represents a declarative configuration of the HyperNode type for use // with apply. +// +// HyperNode represents a collection of nodes sharing similar network topology or performance characteristics. type HyperNodeApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *HyperNodeSpecApplyConfiguration `json:"spec,omitempty"` - Status *HyperNodeStatusApplyConfiguration `json:"status,omitempty"` + // Spec defines the desired configuration of the HyperNode. + Spec *HyperNodeSpecApplyConfiguration `json:"spec,omitempty"` + // Status provides the current state of the HyperNode. + Status *HyperNodeStatusApplyConfiguration `json:"status,omitempty"` } // HyperNode constructs a declarative configuration of the HyperNode type for use with @@ -41,6 +45,7 @@ func HyperNode(name string) *HyperNodeApplyConfiguration { b.WithAPIVersion("topology.volcano.sh/v1alpha1") return b } + func (b HyperNodeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/pkg/client/applyconfiguration/topology/v1alpha1/hypernodespec.go b/pkg/client/applyconfiguration/topology/v1alpha1/hypernodespec.go index a9fef945..8b24d633 100644 --- a/pkg/client/applyconfiguration/topology/v1alpha1/hypernodespec.go +++ b/pkg/client/applyconfiguration/topology/v1alpha1/hypernodespec.go @@ -19,10 +19,15 @@ package v1alpha1 // HyperNodeSpecApplyConfiguration represents a declarative configuration of the HyperNodeSpec type for use // with apply. +// +// HyperNodeSpec defines the desired state of a HyperNode. type HyperNodeSpecApplyConfiguration struct { - Tier *int `json:"tier,omitempty"` - TierName *string `json:"tierName,omitempty"` - Members []MemberSpecApplyConfiguration `json:"members,omitempty"` + // Tier categorizes the performance level of the HyperNode. + Tier *int `json:"tier,omitempty"` + // TierName represents the level name of the HyperNode. + TierName *string `json:"tierName,omitempty"` + // Members defines a list of node groups or individual nodes included in the HyperNode. + Members []MemberSpecApplyConfiguration `json:"members,omitempty"` } // HyperNodeSpecApplyConfiguration constructs a declarative configuration of the HyperNodeSpec type for use with diff --git a/pkg/client/applyconfiguration/topology/v1alpha1/hypernodestatus.go b/pkg/client/applyconfiguration/topology/v1alpha1/hypernodestatus.go index 9d7ecbab..be078a30 100644 --- a/pkg/client/applyconfiguration/topology/v1alpha1/hypernodestatus.go +++ b/pkg/client/applyconfiguration/topology/v1alpha1/hypernodestatus.go @@ -23,9 +23,13 @@ import ( // HyperNodeStatusApplyConfiguration represents a declarative configuration of the HyperNodeStatus type for use // with apply. +// +// HyperNodeStatus represents the observed state of a HyperNode. type HyperNodeStatusApplyConfiguration struct { + // Conditions provide details about the current state of the HyperNode. Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` - NodeCount *int64 `json:"nodeCount,omitempty"` + // NodeCount is the total number of nodes currently in the HyperNode. + NodeCount *int64 `json:"nodeCount,omitempty"` } // HyperNodeStatusApplyConfiguration constructs a declarative configuration of the HyperNodeStatus type for use with diff --git a/pkg/client/applyconfiguration/topology/v1alpha1/memberselector.go b/pkg/client/applyconfiguration/topology/v1alpha1/memberselector.go index 3271e7f6..dbf3f2c0 100644 --- a/pkg/client/applyconfiguration/topology/v1alpha1/memberselector.go +++ b/pkg/client/applyconfiguration/topology/v1alpha1/memberselector.go @@ -23,9 +23,39 @@ import ( // MemberSelectorApplyConfiguration represents a declarative configuration of the MemberSelector type for use // with apply. +// +// MemberSelector defines the criteria for selecting nodes. +// +// Example for Exact match: +// +// members: +// - type: Node +// selector: +// exactMatch: +// name: "node1" +// +// Example for Regex match: +// +// members: +// - type: Node +// selector: +// regexMatch: +// pattern: "^node-[0-9]+$" +// +// Example for Label match: +// +// members: +// - type: Node +// selector: +// labelMatch: +// matchLabels: +// topology-rack: rack1 type MemberSelectorApplyConfiguration struct { - ExactMatch *ExactMatchApplyConfiguration `json:"exactMatch,omitempty"` - RegexMatch *RegexMatchApplyConfiguration `json:"regexMatch,omitempty"` + // ExactMatch defines the exact match criteria. + ExactMatch *ExactMatchApplyConfiguration `json:"exactMatch,omitempty"` + // RegexMatch defines the regex match criteria. + RegexMatch *RegexMatchApplyConfiguration `json:"regexMatch,omitempty"` + // LabelMatch defines the labels match criteria (only take effect when Member Type is "Node"). LabelMatch *v1.LabelSelectorApplyConfiguration `json:"labelMatch,omitempty"` } diff --git a/pkg/client/applyconfiguration/topology/v1alpha1/memberspec.go b/pkg/client/applyconfiguration/topology/v1alpha1/memberspec.go index e3603511..c6b11a3f 100644 --- a/pkg/client/applyconfiguration/topology/v1alpha1/memberspec.go +++ b/pkg/client/applyconfiguration/topology/v1alpha1/memberspec.go @@ -23,8 +23,12 @@ import ( // MemberSpecApplyConfiguration represents a declarative configuration of the MemberSpec type for use // with apply. +// +// MemberSpec represents a specific node or a hyperNodes in the hyperNode. type MemberSpecApplyConfiguration struct { - Type *topologyv1alpha1.MemberType `json:"type,omitempty"` + // Type specifies the member type. + Type *topologyv1alpha1.MemberType `json:"type,omitempty"` + // Selector defines the selection rules for this member. Selector *MemberSelectorApplyConfiguration `json:"selector,omitempty"` } diff --git a/pkg/client/applyconfiguration/topology/v1alpha1/regexmatch.go b/pkg/client/applyconfiguration/topology/v1alpha1/regexmatch.go index 2e0fbbf1..628b68a1 100644 --- a/pkg/client/applyconfiguration/topology/v1alpha1/regexmatch.go +++ b/pkg/client/applyconfiguration/topology/v1alpha1/regexmatch.go @@ -19,7 +19,10 @@ package v1alpha1 // RegexMatchApplyConfiguration represents a declarative configuration of the RegexMatch type for use // with apply. +// +// RegexMatch represents the criteria for regex-based matching. type RegexMatchApplyConfiguration struct { + // Pattern defines the regex pattern to match node names. Pattern *string `json:"pattern,omitempty"` } diff --git a/pkg/client/applyconfiguration/training/v1alpha1/hyperjob.go b/pkg/client/applyconfiguration/training/v1alpha1/hyperjob.go index 91a1d338..468b1007 100644 --- a/pkg/client/applyconfiguration/training/v1alpha1/hyperjob.go +++ b/pkg/client/applyconfiguration/training/v1alpha1/hyperjob.go @@ -42,6 +42,7 @@ func HyperJob(name, namespace string) *HyperJobApplyConfiguration { b.WithAPIVersion("training.volcano.sh/v1alpha1") return b } + func (b HyperJobApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/pkg/client/applyconfiguration/training/v1alpha1/hyperjobspec.go b/pkg/client/applyconfiguration/training/v1alpha1/hyperjobspec.go index cd6ba4a5..74fef224 100644 --- a/pkg/client/applyconfiguration/training/v1alpha1/hyperjobspec.go +++ b/pkg/client/applyconfiguration/training/v1alpha1/hyperjobspec.go @@ -20,10 +20,15 @@ package v1alpha1 // HyperJobSpecApplyConfiguration represents a declarative configuration of the HyperJobSpec type for use // with apply. type HyperJobSpecApplyConfiguration struct { + // ReplicatedJobs is a group of volcano jobs managed by the hyperjob. ReplicatedJobs []ReplicatedJobApplyConfiguration `json:"replicatedJobs,omitempty"` - MinAvailable *int32 `json:"minAvailable,omitempty"` - MaxDomains *int32 `json:"maxDomains,omitempty"` - Plugins map[string][]string `json:"plugins,omitempty"` + // MinAvailable is the minimal available volcano jobs to run the hyperjob. + MinAvailable *int32 `json:"minAvailable,omitempty"` + // MaxDomains is the maximum number of domains to split the hyperjob, used in multi-cluster splitting. + MaxDomains *int32 `json:"maxDomains,omitempty"` + // Plugins specifies the plugins to be enabled for the hyperjob. + // Key is the plugin name, and value is the list of arguments for the plugin. + Plugins map[string][]string `json:"plugins,omitempty"` } // HyperJobSpecApplyConfiguration constructs a declarative configuration of the HyperJobSpec type for use with diff --git a/pkg/client/applyconfiguration/training/v1alpha1/hyperjobstatus.go b/pkg/client/applyconfiguration/training/v1alpha1/hyperjobstatus.go index 1e671fed..1cce69cd 100644 --- a/pkg/client/applyconfiguration/training/v1alpha1/hyperjobstatus.go +++ b/pkg/client/applyconfiguration/training/v1alpha1/hyperjobstatus.go @@ -24,10 +24,13 @@ import ( // HyperJobStatusApplyConfiguration represents a declarative configuration of the HyperJobStatus type for use // with apply. type HyperJobStatusApplyConfiguration struct { - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + // ReplicatedJobsStatus tracks the status of each replicated job. ReplicatedJobsStatus []ReplicatedJobStatusApplyConfiguration `json:"replicatedJobsStatus,omitempty"` - SplitCount *int32 `json:"splitCount,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // SplitCount represents the total number of volcano jobs this hyperjob is split into by the controller. + SplitCount *int32 `json:"splitCount,omitempty"` + // The generation observed by the controller. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` } // HyperJobStatusApplyConfiguration constructs a declarative configuration of the HyperJobStatus type for use with diff --git a/pkg/client/applyconfiguration/training/v1alpha1/replicatedjob.go b/pkg/client/applyconfiguration/training/v1alpha1/replicatedjob.go index 37009d11..bf51a371 100644 --- a/pkg/client/applyconfiguration/training/v1alpha1/replicatedjob.go +++ b/pkg/client/applyconfiguration/training/v1alpha1/replicatedjob.go @@ -24,11 +24,16 @@ import ( // ReplicatedJobApplyConfiguration represents a declarative configuration of the ReplicatedJob type for use // with apply. type ReplicatedJobApplyConfiguration struct { - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` + // TemplateSpec is the spec of the volcano job that will be replicated. TemplateSpec *batchv1alpha1.JobSpecApplyConfiguration `json:"templateSpec,omitempty"` - SplitPolicy *SplitPolicyApplyConfiguration `json:"splitPolicy,omitempty"` - Replicas *int32 `json:"replicas,omitempty"` - ClusterNames []string `json:"clusterNames,omitempty"` + // SplitPolicy is used in multi-cluster splitting to specify the splitting strategy, + // including the number and types of accelerators that need to be split + SplitPolicy *SplitPolicyApplyConfiguration `json:"splitPolicy,omitempty"` + // Replicas is the number of replicated volcano jobs. + Replicas *int32 `json:"replicas,omitempty"` + // ClusterNames is the list of cluster names to which the replicated jobs prefer to be scheduled. + ClusterNames []string `json:"clusterNames,omitempty"` } // ReplicatedJobApplyConfiguration constructs a declarative configuration of the ReplicatedJob type for use with diff --git a/pkg/client/applyconfiguration/training/v1alpha1/replicatedjobstatus.go b/pkg/client/applyconfiguration/training/v1alpha1/replicatedjobstatus.go index 0497e438..d750aab8 100644 --- a/pkg/client/applyconfiguration/training/v1alpha1/replicatedjobstatus.go +++ b/pkg/client/applyconfiguration/training/v1alpha1/replicatedjobstatus.go @@ -24,14 +24,22 @@ import ( // ReplicatedJobStatusApplyConfiguration represents a declarative configuration of the ReplicatedJobStatus type for use // with apply. type ReplicatedJobStatusApplyConfiguration struct { - Name *string `json:"name,omitempty"` - JobStates map[string]batchv1alpha1.JobStateApplyConfiguration `json:"jobStates,omitempty"` - Pending *int32 `json:"pending,omitempty"` - Running *int32 `json:"running,omitempty"` - Succeeded *int32 `json:"succeeded,omitempty"` - Failed *int32 `json:"failed,omitempty"` - Terminating *int32 `json:"terminating,omitempty"` - Unknown *int32 `json:"unknown,omitempty"` + // Name of the replicated job. + Name *string `json:"name,omitempty"` + // JobStates stores the state of each volcano job created by the replicated job. + JobStates map[string]batchv1alpha1.JobStateApplyConfiguration `json:"jobStates,omitempty"` + // Pending is the total number of pods under the replicated job in pending state. + Pending *int32 `json:"pending,omitempty"` + // Running is the total number of pods under the replicated job in running state. + Running *int32 `json:"running,omitempty"` + // Succeeded is the total number of pods under the replicated job in succeeded state. + Succeeded *int32 `json:"succeeded,omitempty"` + // Failed is the total number of pods under the replicated job in failed state. + Failed *int32 `json:"failed,omitempty"` + // Terminating is the total number of pods under the replicated job in terminating state. + Terminating *int32 `json:"terminating,omitempty"` + // Unknown is the total number of pods under the replicated job in unknown state. + Unknown *int32 `json:"unknown,omitempty"` } // ReplicatedJobStatusApplyConfiguration constructs a declarative configuration of the ReplicatedJobStatus type for use with diff --git a/pkg/client/applyconfiguration/training/v1alpha1/splitpolicy.go b/pkg/client/applyconfiguration/training/v1alpha1/splitpolicy.go index 73987675..d14fd944 100644 --- a/pkg/client/applyconfiguration/training/v1alpha1/splitpolicy.go +++ b/pkg/client/applyconfiguration/training/v1alpha1/splitpolicy.go @@ -24,9 +24,12 @@ import ( // SplitPolicyApplyConfiguration represents a declarative configuration of the SplitPolicy type for use // with apply. type SplitPolicyApplyConfiguration struct { - Mode *trainingv1alpha1.SplitMode `json:"mode,omitempty"` - Accelerators *int `json:"accelerators,omitempty"` - AcceleratorType *string `json:"acceleratorType,omitempty"` + // Mode is the mode of the split policy. + Mode *trainingv1alpha1.SplitMode `json:"mode,omitempty"` + // Accelerators is the number of accelerators to split. + Accelerators *int `json:"accelerators,omitempty"` + // AcceleratorType is the type of the accelerator. Such as nvidia.com/gpu, amd.com/gpu, etc. + AcceleratorType *string `json:"acceleratorType,omitempty"` } // SplitPolicyApplyConfiguration constructs a declarative configuration of the SplitPolicy type for use with diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go index 507e24cd..0920d53b 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -53,7 +53,7 @@ import ( // without applying any field management, validations and/or defaults. It shouldn't be considered a replacement // for a real clientset and is mostly useful in simple unit tests. // -// DEPRECATED: NewClientset replaces this with support for field management, which significantly improves +// Deprecated: NewClientset replaces this with support for field management, which significantly improves // server side apply testing. NewClientset is only available when apply configurations are generated (e.g. // via --with-applyconfig). func NewSimpleClientset(objects ...runtime.Object) *Clientset { @@ -69,8 +69,8 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { cs.AddReactor("*", "*", testing.ObjectReaction(o)) cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { var opts metav1.ListOptions - if watchActcion, ok := action.(testing.WatchActionImpl); ok { - opts = watchActcion.ListOptions + if watchAction, ok := action.(testing.WatchActionImpl); ok { + opts = watchAction.ListOptions } gvr := action.GetResource() ns := action.GetNamespace() @@ -101,6 +101,17 @@ func (c *Clientset) Tracker() testing.ObjectTracker { return c.tracker } +// IsWatchListSemanticsSupported informs the reflector that this client +// doesn't support WatchList semantics. +// +// This is a synthetic method whose sole purpose is to satisfy the optional +// interface check performed by the reflector. +// Returning true signals that WatchList can NOT be used. +// No additional logic is implemented here. +func (c *Clientset) IsWatchListSemanticsUnSupported() bool { + return true +} + // NewClientset returns a clientset that will respond with the provided objects. // It's backed by a very simple object tracker that processes creates, updates and deletions as-is, // without applying any validations and/or defaults. It shouldn't be considered a replacement diff --git a/pkg/client/informers/externalversions/batch/v1alpha1/cronjob.go b/pkg/client/informers/externalversions/batch/v1alpha1/cronjob.go index 9fcdf1bd..e6a5728d 100644 --- a/pkg/client/informers/externalversions/batch/v1alpha1/cronjob.go +++ b/pkg/client/informers/externalversions/batch/v1alpha1/cronjob.go @@ -56,7 +56,7 @@ func NewCronJobInformer(client versioned.Interface, namespace string, resyncPeri // one. This reduces memory footprint and number of connections to the server. func NewFilteredCronJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredCronJobInformer(client versioned.Interface, namespace string, re } return client.BatchV1alpha1().CronJobs(namespace).Watch(ctx, options) }, - }, + }, client), &apisbatchv1alpha1.CronJob{}, resyncPeriod, indexers, diff --git a/pkg/client/informers/externalversions/batch/v1alpha1/job.go b/pkg/client/informers/externalversions/batch/v1alpha1/job.go index 813db126..aef52f4d 100644 --- a/pkg/client/informers/externalversions/batch/v1alpha1/job.go +++ b/pkg/client/informers/externalversions/batch/v1alpha1/job.go @@ -56,7 +56,7 @@ func NewJobInformer(client versioned.Interface, namespace string, resyncPeriod t // one. This reduces memory footprint and number of connections to the server. func NewFilteredJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredJobInformer(client versioned.Interface, namespace string, resync } return client.BatchV1alpha1().Jobs(namespace).Watch(ctx, options) }, - }, + }, client), &apisbatchv1alpha1.Job{}, resyncPeriod, indexers, diff --git a/pkg/client/informers/externalversions/bus/v1alpha1/command.go b/pkg/client/informers/externalversions/bus/v1alpha1/command.go index aed516b9..a82b2dab 100644 --- a/pkg/client/informers/externalversions/bus/v1alpha1/command.go +++ b/pkg/client/informers/externalversions/bus/v1alpha1/command.go @@ -56,7 +56,7 @@ func NewCommandInformer(client versioned.Interface, namespace string, resyncPeri // one. This reduces memory footprint and number of connections to the server. func NewFilteredCommandInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredCommandInformer(client versioned.Interface, namespace string, re } return client.BusV1alpha1().Commands(namespace).Watch(ctx, options) }, - }, + }, client), &apisbusv1alpha1.Command{}, resyncPeriod, indexers, diff --git a/pkg/client/informers/externalversions/config/v1alpha1/colocationconfiguration.go b/pkg/client/informers/externalversions/config/v1alpha1/colocationconfiguration.go index 284f39a7..55e80146 100644 --- a/pkg/client/informers/externalversions/config/v1alpha1/colocationconfiguration.go +++ b/pkg/client/informers/externalversions/config/v1alpha1/colocationconfiguration.go @@ -56,7 +56,7 @@ func NewColocationConfigurationInformer(client versioned.Interface, namespace st // one. This reduces memory footprint and number of connections to the server. func NewFilteredColocationConfigurationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredColocationConfigurationInformer(client versioned.Interface, name } return client.ConfigV1alpha1().ColocationConfigurations(namespace).Watch(ctx, options) }, - }, + }, client), &apisconfigv1alpha1.ColocationConfiguration{}, resyncPeriod, indexers, diff --git a/pkg/client/informers/externalversions/datadependency/v1alpha1/datasource.go b/pkg/client/informers/externalversions/datadependency/v1alpha1/datasource.go index c701edd4..2d53a03b 100644 --- a/pkg/client/informers/externalversions/datadependency/v1alpha1/datasource.go +++ b/pkg/client/informers/externalversions/datadependency/v1alpha1/datasource.go @@ -55,7 +55,7 @@ func NewDataSourceInformer(client versioned.Interface, resyncPeriod time.Duratio // one. This reduces memory footprint and number of connections to the server. func NewFilteredDataSourceInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -80,7 +80,7 @@ func NewFilteredDataSourceInformer(client versioned.Interface, resyncPeriod time } return client.DatadependencyV1alpha1().DataSources().Watch(ctx, options) }, - }, + }, client), &apisdatadependencyv1alpha1.DataSource{}, resyncPeriod, indexers, diff --git a/pkg/client/informers/externalversions/datadependency/v1alpha1/datasourceclaim.go b/pkg/client/informers/externalversions/datadependency/v1alpha1/datasourceclaim.go index 3ab7d63a..75b1c0a6 100644 --- a/pkg/client/informers/externalversions/datadependency/v1alpha1/datasourceclaim.go +++ b/pkg/client/informers/externalversions/datadependency/v1alpha1/datasourceclaim.go @@ -56,7 +56,7 @@ func NewDataSourceClaimInformer(client versioned.Interface, namespace string, re // one. This reduces memory footprint and number of connections to the server. func NewFilteredDataSourceClaimInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredDataSourceClaimInformer(client versioned.Interface, namespace st } return client.DatadependencyV1alpha1().DataSourceClaims(namespace).Watch(ctx, options) }, - }, + }, client), &apisdatadependencyv1alpha1.DataSourceClaim{}, resyncPeriod, indexers, diff --git a/pkg/client/informers/externalversions/factory.go b/pkg/client/informers/externalversions/factory.go index 4c6026ef..bdc2f815 100644 --- a/pkg/client/informers/externalversions/factory.go +++ b/pkg/client/informers/externalversions/factory.go @@ -105,6 +105,7 @@ func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Dur // NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. // Listers obtained via this SharedInformerFactory will be subject to the same filters // as specified here. +// // Deprecated: Please use NewSharedInformerFactoryWithOptions instead func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) @@ -212,7 +213,7 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal // // It is typically used like this: // -// ctx, cancel := context.Background() +// ctx, cancel := context.WithCancel(context.Background()) // defer cancel() // factory := NewSharedInformerFactory(client, resyncPeriod) // defer factory.WaitForStop() // Returns immediately if nothing was started. diff --git a/pkg/client/informers/externalversions/flow/v1alpha1/jobflow.go b/pkg/client/informers/externalversions/flow/v1alpha1/jobflow.go index eef05ffb..e5d1589d 100644 --- a/pkg/client/informers/externalversions/flow/v1alpha1/jobflow.go +++ b/pkg/client/informers/externalversions/flow/v1alpha1/jobflow.go @@ -56,7 +56,7 @@ func NewJobFlowInformer(client versioned.Interface, namespace string, resyncPeri // one. This reduces memory footprint and number of connections to the server. func NewFilteredJobFlowInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredJobFlowInformer(client versioned.Interface, namespace string, re } return client.FlowV1alpha1().JobFlows(namespace).Watch(ctx, options) }, - }, + }, client), &apisflowv1alpha1.JobFlow{}, resyncPeriod, indexers, diff --git a/pkg/client/informers/externalversions/flow/v1alpha1/jobtemplate.go b/pkg/client/informers/externalversions/flow/v1alpha1/jobtemplate.go index fcfc2e24..9f348f0e 100644 --- a/pkg/client/informers/externalversions/flow/v1alpha1/jobtemplate.go +++ b/pkg/client/informers/externalversions/flow/v1alpha1/jobtemplate.go @@ -56,7 +56,7 @@ func NewJobTemplateInformer(client versioned.Interface, namespace string, resync // one. This reduces memory footprint and number of connections to the server. func NewFilteredJobTemplateInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredJobTemplateInformer(client versioned.Interface, namespace string } return client.FlowV1alpha1().JobTemplates(namespace).Watch(ctx, options) }, - }, + }, client), &apisflowv1alpha1.JobTemplate{}, resyncPeriod, indexers, diff --git a/pkg/client/informers/externalversions/nodeinfo/v1alpha1/numatopology.go b/pkg/client/informers/externalversions/nodeinfo/v1alpha1/numatopology.go index b1307223..53c00c0e 100644 --- a/pkg/client/informers/externalversions/nodeinfo/v1alpha1/numatopology.go +++ b/pkg/client/informers/externalversions/nodeinfo/v1alpha1/numatopology.go @@ -55,7 +55,7 @@ func NewNumatopologyInformer(client versioned.Interface, resyncPeriod time.Durat // one. This reduces memory footprint and number of connections to the server. func NewFilteredNumatopologyInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -80,7 +80,7 @@ func NewFilteredNumatopologyInformer(client versioned.Interface, resyncPeriod ti } return client.NodeinfoV1alpha1().Numatopologies().Watch(ctx, options) }, - }, + }, client), &apisnodeinfov1alpha1.Numatopology{}, resyncPeriod, indexers, diff --git a/pkg/client/informers/externalversions/scheduling/v1beta1/podgroup.go b/pkg/client/informers/externalversions/scheduling/v1beta1/podgroup.go index f4f17530..b1cbcacd 100644 --- a/pkg/client/informers/externalversions/scheduling/v1beta1/podgroup.go +++ b/pkg/client/informers/externalversions/scheduling/v1beta1/podgroup.go @@ -56,7 +56,7 @@ func NewPodGroupInformer(client versioned.Interface, namespace string, resyncPer // one. This reduces memory footprint and number of connections to the server. func NewFilteredPodGroupInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredPodGroupInformer(client versioned.Interface, namespace string, r } return client.SchedulingV1beta1().PodGroups(namespace).Watch(ctx, options) }, - }, + }, client), &apisschedulingv1beta1.PodGroup{}, resyncPeriod, indexers, diff --git a/pkg/client/informers/externalversions/scheduling/v1beta1/queue.go b/pkg/client/informers/externalversions/scheduling/v1beta1/queue.go index e65cb182..1ebadd3c 100644 --- a/pkg/client/informers/externalversions/scheduling/v1beta1/queue.go +++ b/pkg/client/informers/externalversions/scheduling/v1beta1/queue.go @@ -55,7 +55,7 @@ func NewQueueInformer(client versioned.Interface, resyncPeriod time.Duration, in // one. This reduces memory footprint and number of connections to the server. func NewFilteredQueueInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -80,7 +80,7 @@ func NewFilteredQueueInformer(client versioned.Interface, resyncPeriod time.Dura } return client.SchedulingV1beta1().Queues().Watch(ctx, options) }, - }, + }, client), &apisschedulingv1beta1.Queue{}, resyncPeriod, indexers, diff --git a/pkg/client/informers/externalversions/shard/v1alpha1/nodeshard.go b/pkg/client/informers/externalversions/shard/v1alpha1/nodeshard.go index dd8aa2e2..06322f54 100644 --- a/pkg/client/informers/externalversions/shard/v1alpha1/nodeshard.go +++ b/pkg/client/informers/externalversions/shard/v1alpha1/nodeshard.go @@ -55,7 +55,7 @@ func NewNodeShardInformer(client versioned.Interface, resyncPeriod time.Duration // one. This reduces memory footprint and number of connections to the server. func NewFilteredNodeShardInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -80,7 +80,7 @@ func NewFilteredNodeShardInformer(client versioned.Interface, resyncPeriod time. } return client.ShardV1alpha1().NodeShards().Watch(ctx, options) }, - }, + }, client), &apisshardv1alpha1.NodeShard{}, resyncPeriod, indexers, diff --git a/pkg/client/informers/externalversions/topology/v1alpha1/hypernode.go b/pkg/client/informers/externalversions/topology/v1alpha1/hypernode.go index ee8764d5..ce5f10a3 100644 --- a/pkg/client/informers/externalversions/topology/v1alpha1/hypernode.go +++ b/pkg/client/informers/externalversions/topology/v1alpha1/hypernode.go @@ -55,7 +55,7 @@ func NewHyperNodeInformer(client versioned.Interface, resyncPeriod time.Duration // one. This reduces memory footprint and number of connections to the server. func NewFilteredHyperNodeInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -80,7 +80,7 @@ func NewFilteredHyperNodeInformer(client versioned.Interface, resyncPeriod time. } return client.TopologyV1alpha1().HyperNodes().Watch(ctx, options) }, - }, + }, client), &apistopologyv1alpha1.HyperNode{}, resyncPeriod, indexers, diff --git a/pkg/client/informers/externalversions/training/v1alpha1/hyperjob.go b/pkg/client/informers/externalversions/training/v1alpha1/hyperjob.go index b1205e73..48cb3261 100644 --- a/pkg/client/informers/externalversions/training/v1alpha1/hyperjob.go +++ b/pkg/client/informers/externalversions/training/v1alpha1/hyperjob.go @@ -56,7 +56,7 @@ func NewHyperJobInformer(client versioned.Interface, namespace string, resyncPer // one. This reduces memory footprint and number of connections to the server. func NewFilteredHyperJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredHyperJobInformer(client versioned.Interface, namespace string, r } return client.TrainingV1alpha1().HyperJobs(namespace).Watch(ctx, options) }, - }, + }, client), &apistrainingv1alpha1.HyperJob{}, resyncPeriod, indexers,