kyma-project / api-gateway

Apache License 2.0
4 stars 26 forks source link

chore: Update maxAge documentation and placeholder #1001

Closed barchw closed 4 months ago

barchw commented 4 months ago

Description

Changes proposed in this pull request:

Related issues

barchw commented 4 months ago

I wasn't aware that this is a duration. It might be a better UX to not have this as a duration but as a number in seconds, since the actually refers to seconds. Should we discuss this for v1beta2?

I think with that we can also easily improve validation in CRD, since right now it's possible to add a negative duration and this doesn't make sense at all, e.g. -300s.

Besides this if we don't want to change the type of maxAge, we can think about setting an input info to have a better UX, e.g. A duration string consist of decimal numbers, each with optional fraction and a unit suffix, such as "300ms" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h", "d", "w", "y".

What do you think?

I basically fully agree :D