Changelog
List of aperture PRs merged since 2.3.0 release. For the full list of changes, see [list of changes][changes]
Add diagrams for each use case (2090)
- Add mermaid for each use case with explanation below
- Add overview sessions to give high level explanation of use-case
- Add high-level real-world use-case scenario for each use-case
- rename basic service protection to protection
- rename workload-prioritization to prioritization
- fix broken links
**Documentation:**
- Updated and improved use case documentation
- Added diagrams, explanations, and real-world scenarios
- Fixed broken links and renamed files
> 🎉 A new dawn for docs, we've made them shine,
> With diagrams and use cases, they're now so fine.
> Broken links are fixed, and files renamed,
> Our users' understanding will never be the same! 🚀
---------
Co-authored-by: Tanveer Gill <tanveer.gillfluxninja.com>
docs: fix controller API docs (2114)
Description of change
Fix API docs generation
Move service protection escalations into base to enable arbitrary combinations (2061)
**New Feature:**
- Enable arbitrary combinations of service protection escalations and
auto-scaling
- Refactor service protection escalations into the base
- Update documentation for `policy.auto_scaling` section
**Refactor:**
- Remove unused functions in `dashboard.libsonnet` and
`policy.libsonnet`
**Documentation:**
- Add link to auto-scaling base documentation in `README.md`
**Style:**
- Improve rendering of boolean values in `parameterComponents.js`
> 🎉 A new era dawns, with scaling refined, 🚀
> Service protection and auto-scaling combined! 🤝
> Docs updated, code refactored too, 📚
> Celebrate these changes, they're here for you! 🥳
Fixed the API generate issue (2103)
Support policies metadata for policies created by api (2098)
**New Feature:**
- Added support for policy metadata in API-created policies
- Modified `UpsertPolicy` and `DeletePolicy` functions in
policy-service.go to handle policy metadata in etcd
- Updated provider.go to retrieve policy metadata from etcd if not
present in the policy message
> 🎉 A new feature's here, so grand,
> Policy metadata now at hand! 📜
> Upsert, delete, and provide,
> With etcd by our side. 🌟
Do not get stats in ProvideDistCache (2096)
![screencapture-localhost-3000-d-1271a5153713edf320f070459528f54dee4fcd78-aperture-quota-scheduler-2023-06-01-12_10_17](https://github.com/fluxninja/aperture/assets/1553055/4722537e-1dc9-4085-997d-1f23b347a469)
Bug fix:
- Removed unnecessary call to `dc.client.Stats` in `ProvideDistCache` function
- Added deferred call to `utils.Shutdown` for proper Olric instance shutdown
> 🎉 A bug we found, a fix we made,
> In the cache provider, improvements laid.
> Stats call removed, shutdown ensured,
> Our code's performance and health secured. 🚀
Fix DistCache timeout error (2095)
- Added timeout to DistCache client status check
- Introduced configurable service name for ServiceDiscovery
global token bucket: remove key lock (2091)
Update olric to fluxninja-0.5 (2068)
![screencapture-localhost-3000-d-1271a5153713edf320f070459528f54dee4fcd78-aperture-quota-scheduler-2023-05-31-15_39_22](https://github.com/fluxninja/aperture/assets/1553055/94eaee68-a399-4dbd-bbcf-50b76865b061)
**New Feature:**
- Updated DistCache to use an embedded client and improved GetStats
response
- Added context parameter to rate-limiter and flowcontrol functions
- Upgraded Olric library to fluxninja-0.5 in global-token-bucket
**Refactor:**
- Removed unnecessary arguments from newRateLimiterOptions function
- Modified WFQScheduler struct and updated test cases
> 🎉 A leap forward, with changes so grand,
> Contexts and clients, go hand in hand.
> Olric upgraded, token buckets refined,
> Performance and logic, now well-aligned. 🚀
Fixed typo in aperturectl log (2065)
Bug fix:
- Fixed a minor typo in the log message of cmd/aperturectl/cmd/utils/controller.go
> 🎉 A tiny typo fixed, our code now shines,
> With every letter in its place, it gracefully aligns.
> A small change indeed, but worth the cheer,
> For clarity and precision, we hold so dear. 🌟
Use custom PolicyMessage for passing policies to be wrapped (2064)
**New Feature:**
- Introduced `PolicyMessage` type with custom JSON marshaling and
unmarshaling
- Replaced `syncv1.PolicyWrapper` with `iface.PolicyMessage` for
improved policy handling
> 🎉 A new dawn for policies, we cheer,
> With `PolicyMessage`, the path is clear.
> Farewell to `syncv1.PolicyWrapper`, old friend,
> Embrace the change, as new features ascend! 🚀
global token bucket: decide based on deadline (2063)
![Screenshot 2023-05-30 at 10 35 15
PM](https://github.com/fluxninja/aperture/assets/18579817/5023d125-0c62-4f77-b202-99ebee3de07e)
**New Feature:**
- Added `Deadline` field to `takeNRequest` struct in global-token-bucket
- Implemented deadline-based rejection for token requests exceeding wait
time
> 🎉 A deadline we set, to keep things fair,
> ⏰ No more waiting, when tokens are rare.
> 🚀 With global token bucket's new might,
> ✨ Our rate limiter shines ever so bright!
wfq: refactor locking (2062)
Description of change
Now that we have global token buckets, we need to release locks before
accessing the token bucket in order to unblock parallel requests.
![Screenshot 2023-05-30 at 9 53 45
PM](https://github.com/fluxninja/aperture/assets/18579817/550fed37-6b78-42d6-a2b6-e8f5ec45eb71)
![Screenshot 2023-05-30 at 10 11 03
PM](https://github.com/fluxninja/aperture/assets/18579817/cc7fdaad-f964-4d46-878e-0d628bd7b985)
**Refactor:**
- Updated locking mechanisms in various flow control actuators and
schedulers to unblock parallel requests
- Added `context.Context` parameter to `Limiter`, `RateLimiter`, and
`Scheduler` interfaces for better lock handling
**Test:**
- Modified `MockLimiter`, `MockRateLimiter`, and `MockScheduler` methods
to include a `context.Context` parameter
> 🎉 Parallel requests now fly, 🚀
> Unblocked, soaring through the sky. 🌌
> Locks released with context's grace, 🔓
> Our code performs at a swifter pace! 💨
Allow extensions to modify also dynamic parts of collector config (2041)
Allow extensions to modify also dynamic parts of collector config.
In previous approach, extensions were able to provide their own part of
collector config only based on base config, with no ability to depend on
dynamic parts of config. This was preventing eg. fluxninja extesion to
add fluxninja exporters to custom metric pipelines (infra meters).
This commit reverts the idea of multiple config providers. Extension
now provide their config by "hooks" instead. Hooks are executed on every
config udpate, so now extensions can modify also the dynamically
injected parts of config.
Drive-by:
* Actually wait for collector's shutdown in its stop hook.
* Rename structs in otelcollector/config package to avoid stutter.
* Add some logging to fluxninja extension.
Resolves 2001
Fixed issue of incorrect value of setpoint constant variable (2054)
Ref 2052
Optimization
- Improved performance in `pkg/policies/controlplane/components/variable.go` by adding an early return statement to avoid unnecessary computation.
> 🎉 A leap in code, swift and wise,
> 🚀 With early returns, performance flies!
> 🌟 Optimized, our code now gleams,
> 😄 For better software, we all dream!
[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v2.3.0...releases/aperture-controller/v2.4.0