You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: 'Container name: required for volumes,
459
+
optional for env vars'
460
+
type: string
461
+
divisor:
462
+
description: |-
463
+
Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and Int64() accessors.
464
+
465
+
The serialization format is:
466
+
467
+
<quantity> ::= <signedNumber><suffix>
468
+
(Note that <suffix> may be empty, from the "" case in <decimalSI>.)
469
+
<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= "+" | "-" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei
470
+
(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)
471
+
<decimalSI> ::= m | "" | k | M | G | T | P | E
472
+
(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)
No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.
476
+
477
+
When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.
478
+
479
+
Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:
480
+
a. No precision is lost
481
+
b. No fractional digits will be emitted
482
+
c. The exponent (or suffix) is as large as possible.
483
+
The sign will be omitted unless the number is negative.
484
+
485
+
Examples:
486
+
1.5 will be serialized as "1500m"
487
+
1.5Gi will be serialized as "1536Mi"
488
+
489
+
Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.
490
+
491
+
Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)
492
+
493
+
This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.
494
+
type: string
495
+
resource:
496
+
description: 'Required: resource to select'
497
+
type: string
498
+
required:
499
+
- resource
500
+
type: object
501
+
secretKeyRef:
502
+
description: SecretKeySelector selects a key of a
503
+
Secret.
504
+
properties:
505
+
key:
506
+
description: The key of the secret to select from. Must
0 commit comments