Skip to content

Commit a1ef093

Browse files
authored
Merge pull request #48241 from sftim/20241007_duration_glossary_tweak
Tweak and use glossary entry for duration
2 parents b043f44 + 2553943 commit a1ef093

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

content/en/docs/concepts/architecture/garbage-collection.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -149,20 +149,15 @@ until disk usage reaches the `LowThresholdPercent` value.
149149
As a beta feature, you can specify the maximum time a local image can be unused for,
150150
regardless of disk usage. This is a kubelet setting that you configure for each node.
151151

152-
To configure the setting, you need to set a value for the `imageMaximumGCAge`
152+
To configure the setting, you need to set a value for the `imageMaximumGCAge`
153153
field in the kubelet configuration file.
154154

155-
The value is specified as a Kubernetes _duration_;
156-
Valid time units for the `imageMaximumGCAge` field in the kubelet configuration file are:
157-
- "ns" for nanoseconds
158-
- "us" or "µs" for microseconds
159-
- "ms" for milliseconds
160-
- "s" for seconds
161-
- "m" for minutes
162-
- "h" for hours
155+
The value is specified as a Kubernetes {{< glossary_tooltip text="duration" term_id="duration" >}}.
156+
See [duration](/docs/reference/glossary/?all=true#term-duration) in the glossary
157+
for more details.
163158

164159
For example, you can set the configuration field to `12h45m`,
165-
which means 12 hours and 45 minutes.
160+
which means 12 hours and 45 minutes.
166161

167162
{{< note >}}
168163
This feature does not track image usage across kubelet restarts. If the kubelet

content/en/docs/reference/glossary/duration.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,21 @@ id: duration
44
date: 2024-10-05
55
full_link:
66
short_description: >
7-
A time interval specified as a string in the format accepted by Go's [time.Duration](https://pkg.go.dev/time), allowing for flexible time specifications using various units like seconds, minutes, and hours.
8-
aka:
7+
A string value representing an amount of time.
98
tags:
109
- fundamental
1110
---
12-
In Kubernetes APIs, a duration must be non-negative and is typically expressed with a suffix.
13-
For example, `5s` for five seconds or `1m30s` for one minute and thirty seconds.
11+
A string value representing an amount of time.
1412

13+
<!--more-->
14+
15+
The format of a (Kubernetes) duration is based on the
16+
[`time.Duration`](https://pkg.go.dev/time#Duration) type from the Go programming language.
17+
18+
In Kubernetes APIs that use durations, the value is expressed as series of a non-negative
19+
integers combined with a time unit suffix. You can have more than one time quantity and
20+
the duration is the sum of those time quantities.
21+
The valid time units are "ns", "µs" (or "us"), "ms", "s", "m", and "h".
22+
23+
For example: `5s` represents a duration of five seconds, and `1m30s` represents a duration
24+
of one minute and thirty seconds.

0 commit comments

Comments
 (0)