Skip to content

Commit c78950b

Browse files
bobsongplussong
authored andcommitted
Deprecate QueueVisibility for v1beta2
Signed-off-by: song <[email protected]>
1 parent 4b91bd3 commit c78950b

File tree

5 files changed

+49
-142
lines changed

5 files changed

+49
-142
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
Copyright The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1beta1
18+
19+
import (
20+
conversionapi "k8s.io/apimachinery/pkg/conversion"
21+
"sigs.k8s.io/controller-runtime/pkg/conversion"
22+
23+
"sigs.k8s.io/kueue/apis/config/v1beta2"
24+
)
25+
26+
//lint:file-ignore ST1003 "generated Convert_* calls below use underscores"
27+
//revive:disable:var-naming
28+
29+
func (src *Configuration) ConvertTo(dstRaw conversion.Hub) error {
30+
dst := dstRaw.(*v1beta2.Configuration)
31+
return Convert_v1beta1_Configuration_To_v1beta2_Configuration(src, dst, nil)
32+
}
33+
34+
func (dst *Configuration) ConvertFrom(srcRaw conversion.Hub) error {
35+
src := srcRaw.(*v1beta2.Configuration)
36+
return Convert_v1beta2_Configuration_To_v1beta1_Configuration(src, dst, nil)
37+
}
38+
39+
func Convert_v1beta1_Configuration_To_v1beta2_Configuration(in *Configuration, out *v1beta2.Configuration, s conversionapi.Scope) error {
40+
return autoConvert_v1beta1_Configuration_To_v1beta2_Configuration(in, out, s)
41+
}

apis/config/v1beta1/zz_generated.conversion.go

Lines changed: 6 additions & 74 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/config/v1beta2/configuration_types.go

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,6 @@ type Configuration struct {
8282
// integrations (including K8S job).
8383
Integrations *Integrations `json:"integrations,omitempty"`
8484

85-
// QueueVisibility is configuration to expose the information about the top
86-
// pending workloads.
87-
// Deprecated: This field will be removed on v1beta2, use VisibilityOnDemand
88-
// (https://kueue.sigs.k8s.io/docs/tasks/manage/monitor_pending_workloads/pending_workloads_on_demand/)
89-
// instead.
90-
QueueVisibility *QueueVisibility `json:"queueVisibility,omitempty"`
91-
9285
// MultiKueue controls the behaviour of the MultiKueue AdmissionCheck Controller.
9386
MultiKueue *MultiKueue `json:"multiKueue,omitempty"`
9487

@@ -437,27 +430,6 @@ type PodIntegrationOptions struct {
437430
PodSelector *metav1.LabelSelector `json:"podSelector,omitempty"`
438431
}
439432

440-
type QueueVisibility struct {
441-
// ClusterQueues is configuration to expose the information
442-
// about the top pending workloads in the cluster queue.
443-
ClusterQueues *ClusterQueueVisibility `json:"clusterQueues,omitempty"`
444-
445-
// UpdateIntervalSeconds specifies the time interval for updates to the structure
446-
// of the top pending workloads in the queues.
447-
// The minimum value is 1.
448-
// Defaults to 5.
449-
UpdateIntervalSeconds int32 `json:"updateIntervalSeconds,omitempty"`
450-
}
451-
452-
type ClusterQueueVisibility struct {
453-
// MaxCount indicates the maximal number of pending workloads exposed in the
454-
// cluster queue status. When the value is set to 0, then ClusterQueue
455-
// visibility updates are disabled.
456-
// The maximal value is 4000.
457-
// Defaults to 10.
458-
MaxCount int32 `json:"maxCount,omitempty"`
459-
}
460-
461433
type Resources struct {
462434
// ExcludedResourcePrefixes defines which resources should be ignored by Kueue
463435
ExcludeResourcePrefixes []string `json:"excludeResourcePrefixes,omitempty"`

apis/config/v1beta2/groupversion_info.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,5 @@ func init() {
4646
// makes the code compile even when the generated files are missing.
4747
localSchemeBuilder.Register(RegisterDefaults)
4848
}
49+
50+
func (*Configuration) Hub() {}

apis/config/v1beta2/zz_generated.deepcopy.go

Lines changed: 0 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)