vendor: update buildkit to v0.19.0-rc1

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2025-01-14 14:20:26 -08:00
parent 630066bfc5
commit 44fa243d58
1910 changed files with 95196 additions and 50438 deletions

View File

@ -25,6 +25,7 @@ import (
"strconv"
"strings"
cbor "k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct"
"k8s.io/klog/v2"
)
@ -92,6 +93,20 @@ func (intstr *IntOrString) UnmarshalJSON(value []byte) error {
return json.Unmarshal(value, &intstr.IntVal)
}
func (intstr *IntOrString) UnmarshalCBOR(value []byte) error {
if err := cbor.Unmarshal(value, &intstr.StrVal); err == nil {
intstr.Type = String
return nil
}
if err := cbor.Unmarshal(value, &intstr.IntVal); err != nil {
return err
}
intstr.Type = Int
return nil
}
// String returns the string value, or the Itoa of the int value.
func (intstr *IntOrString) String() string {
if intstr == nil {
@ -126,6 +141,17 @@ func (intstr IntOrString) MarshalJSON() ([]byte, error) {
}
}
func (intstr IntOrString) MarshalCBOR() ([]byte, error) {
switch intstr.Type {
case Int:
return cbor.Marshal(intstr.IntVal)
case String:
return cbor.Marshal(intstr.StrVal)
default:
return nil, fmt.Errorf("impossible IntOrString.Type")
}
}
// OpenAPISchemaType is used by the kube-openapi generator when constructing
// the OpenAPI spec of this type.
//