14 Commits

Author SHA1 Message Date
Mikkel Oscar Lyderik Larsen
ca9031228b
Adjust HPA when schedule scaling change is below tolerance (#765)
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2024-12-10 16:48:34 +01:00
Alexander Yastrebov
16ec43c361 all: fix typos discovered by codespell
```
codespell --skip .git | less
```

See https://github.com/codespell-project/codespell

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
2023-06-12 11:48:39 +02:00
Mikkel Oscar Lyderik Larsen
0794873fcb Add scaling schedule controller to updating status
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2023-04-06 17:53:35 +02:00
zlawrence
8ba4d19c35
Add end date support for Repeating schedule. Added tests 2022-12-13 12:53:05 +01:00
zlawrence
37bf73c7fe
Add end date support for OneTime schedule 2022-12-12 20:02:15 +01:00
Jonathan Juares Beber
0f06db7cdf
Upgrade Kubernetes and its friends to 1.21
This commit upgrades all the Kubernetes dependencies to 1.21.5. It
includes regenerated clients and specs.

Signed-off-by: Jonathan Juares Beber <jonathanbeber@gmail.com>
2021-10-27 20:58:18 +02:00
Alexey Ermakov
c5411c74b7 Scheduled scaling: add an optional scaling window
Signed-off-by: Alexey Ermakov <alexey.ermakov@zalando.de>
2021-09-24 15:33:49 +02:00
Alexey Ermakov
0dbe769e1b Fix the type for ClusterScalingScheduleList
Signed-off-by: Alexey Ermakov <alexey.ermakov@zalando.de>
2021-09-17 11:29:52 +02:00
Mikkel Oscar Lyderik Larsen
9722e38f62
Re-generate for go 1.17
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2021-08-19 18:28:57 +02:00
Jonathan Juares Beber
0ad7296d56
Switch Schedule optional fields to pointers
The `Date` and `Period` fields inside the `Schedule` type of the
`[Cluster]ScalingSchedule` CRDs are optional, but in its current
configuration the generated clients can't update or create these
resources since the empty fields do not pass the validation.

This commit updates the `[Cluster]ScalingSchedule.Schedule[*]` `Date`
and `Period` field to pointers, this way a null value is not validated
and the clients are able to update and create resources. It also updates
the collector code and tests to reflect the change.

Signed-off-by: Jonathan Juares Beber <jonathanbeber@gmail.com>
2021-06-30 17:09:48 +02:00
Sandor Szücs
64a6b85c73
fix typo Saturday
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
2021-05-26 12:03:07 +02:00
Jonathan Juares Beber
60b1dc097a
Remove ClusterScalingSchedule clients namespace
During #284 we set the ClusterScalingSchedule scope as `Cluster` but
just for kubebuilder. This flag has no effect in the generated clients.
It means the generated clients expect a namespace argument when handling
ClusterScalingSchedule resources. It works fine to list all of the
resources but makes it impossible to request a specific resource
defining its name.

This commit sets the `+genclient:nonNamespaced` flag for the CRD and
adds the regenerated clients. It does not affect any of the usage of the
clients in this codebase so far.

Signed-off-by: Jonathan Juares Beber <jonathanbeber@gmail.com>
2021-05-21 17:16:57 +02:00
Mikkel Oscar Lyderik Larsen
816661f7fd
Don't deepcopy-gen on string types
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2021-04-13 13:11:40 +02:00
Jonathan Juares Beber
3d450ad2c2
Create first version of ScalingSchedule CRDs
Some cases and users actually know when their applications will have a
high workload and, therefore, autoscaling support for time based scaling
is a desired feature.

This commit creates the first version of two CRDs called
`ScalingSchedule` and `ClusterScalingSchedule`.
The CRDs describe one or multiples schedules inside them. The schedules
contains the information of when the time based scaling starts, if it
happens once or multiple times, its duration and, a configurable value
that later can be used by HPAs to scale applications.

The only difference between the two CRDs is their scope.
`ClusterScalingSchedule` aims to attend cluster wide schedules, to
multiple applications, while `ScalingSchedule` has to be deployed with
each application into the same namespace.

This commit does not creates any metric, it's a noop change that creates
just the CRD and import tools required to generate the CRD and others
required code, as `deepCopy` functions and clients.

Signed-off-by: Jonathan Juares Beber <jonathanbeber@gmail.com>
2021-03-23 11:07:56 +01:00