rebase: update kubernetes in api folder

updating the kubernetes to 1.31.0 in the
api folder.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2024-08-14 09:27:23 +02:00
committed by mergify[bot]
parent 2c0e65b828
commit 63c4c05b35
80 changed files with 16208 additions and 2614 deletions

View File

@ -45,6 +45,19 @@ var (
// Requirements is AND of all requirements.
type Requirements []Requirement
func (r Requirements) String() string {
var sb strings.Builder
for i, requirement := range r {
if i > 0 {
sb.WriteString(", ")
}
sb.WriteString(requirement.String())
}
return sb.String()
}
// Selector represents a label selector.
type Selector interface {
// Matches returns true if this selector matches the given set of labels.
@ -285,6 +298,13 @@ func (r *Requirement) Values() sets.String {
return ret
}
// ValuesUnsorted returns a copy of requirement values as passed to NewRequirement without sorting.
func (r *Requirement) ValuesUnsorted() []string {
ret := make([]string, 0, len(r.strValues))
ret = append(ret, r.strValues...)
return ret
}
// Equal checks the equality of requirement.
func (r Requirement) Equal(x Requirement) bool {
if r.key != x.key {