aboutsummaryrefslogtreecommitdiff
path: root/vendor/k8s.io/apimachinery/pkg/api
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/k8s.io/apimachinery/pkg/api')
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go2
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/math.go8
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go5
3 files changed, 8 insertions, 7 deletions
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go
index 9fca2e165..2e09f4fac 100644
--- a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go
@@ -36,7 +36,7 @@ var _ = math.Inf
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func (m *Quantity) Reset() { *m = Quantity{} }
func (*Quantity) ProtoMessage() {}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/math.go b/vendor/k8s.io/apimachinery/pkg/api/resource/math.go
index 7f63175d3..8ffcb9f09 100644
--- a/vendor/k8s.io/apimachinery/pkg/api/resource/math.go
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/math.go
@@ -37,12 +37,8 @@ var (
big1024 = big.NewInt(1024)
// Commonly needed inf.Dec values-- treat as read only!
- decZero = inf.NewDec(0, 0)
- decOne = inf.NewDec(1, 0)
- decMinusOne = inf.NewDec(-1, 0)
- decThousand = inf.NewDec(1000, 0)
- dec1024 = inf.NewDec(1024, 0)
- decMinus1024 = inf.NewDec(-1024, 0)
+ decZero = inf.NewDec(0, 0)
+ decOne = inf.NewDec(1, 0)
// Largest (in magnitude) number allowed.
maxAllowed = infDecAmount{inf.NewDec((1<<63)-1, 0)} // == max int64
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go
index 516d041da..d95e03aa9 100644
--- a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go
@@ -634,6 +634,11 @@ func (q Quantity) MarshalJSON() ([]byte, error) {
return result, nil
}
+// ToUnstructured implements the value.UnstructuredConverter interface.
+func (q Quantity) ToUnstructured() interface{} {
+ return q.String()
+}
+
// UnmarshalJSON implements the json.Unmarshaller interface.
// TODO: Remove support for leading/trailing whitespace
func (q *Quantity) UnmarshalJSON(value []byte) error {