Changelog
List of aperture PRs merged since 2.21.0 release. For the full list of changes, see [list of changes][changes]
Add API Key support in SDKs (2858)
- New Feature: Introduced the ability to configure the Aperture SDK
using an API key, enhancing security and flexibility. This change
affects all SDKs (Go, Python, JavaScript, and Java).
- New Feature: Added the option to use insecure connections to the
Aperture Agent, providing more flexibility in testing and development
environments.
- Improvement: Updated the Aperture SDK to use a single
`APERTURE_AGENT_ADDRESS` environment variable for the agent's address,
simplifying configuration.
- Improvement: Updated the Aperture SDK to use a longer default timeout
value for HTTP middleware, enhancing reliability.
- Improvement: Updated the library version to "2.22.0" across all SDKs.
- Documentation: Updated README and example code to reflect the new
configuration options.
etcd fixes (2859)
- Refactor: Enhanced the flexibility and reliability of our backend
services by making certain fields optional and improving data handling
in the `Client` struct.
- Bug Fix: Improved the cleanup process in the `PeerDiscovery` struct to
ensure more reliable deregistration.
- New Feature: Introduced thread-safe access to the `controllerInfo`
field in the `Heartbeats` struct, enhancing the stability of our
services.
- Test: Updated tests to reflect changes in the `Heartbeats` struct,
ensuring our tests remain accurate and reliable.
- Refactor: Updated logic in the `provide.go` file to use the new getter
method for `controllerInfo`, improving code readability and
maintainability.
Fix missing actuators in children components (2673)
- Refactor: Simplified the logic in
`pkg/policies/controlplane/circuitfactory/tree.go` for collecting
actuators in the `TreeGraph` function. Actuators are now directly
appended to the `treeMsg.Actuators` slice during tree traversal,
eliminating the need for a separate recursive function. This change
improves code readability and maintainability, ensuring all actuators
are correctly included in the final tree message.
---------
Co-authored-by: Hasit Mistry <hasitfluxninja.com>
Co-authored-by: Tanveer Gill <tanveer.gillfluxninja.com>
Upgrade Go to 1.21.3 (2856)
Make the policy hash stable (2790)
Policy hashing logic was changed to not depend on aperture version. The policy spec is
now hashed directly – as stored as JSON in etcd. This ensures that after
applying policy, its hash will never change.
The sha256 was chosen so that it's easy to compute manually, in case of
debugging.
Note: Because of change in hashing logic, all policies will now report new
hashes, so it's a breaking change wrt. policy hashes. Hopefully, a last one.
Fix missing controllerInfo in Heartbeats (2855)
- Refactor: Simplified the `Heartbeats` setup process in FluxNinja
extension, enhancing the reliability of the system by removing potential
error sources.
- New Feature: Enhanced logging in FluxNinja extension, providing more
visibility into the system's operations.
- Bug Fix: Updated the FluxNinja and OTel extensions to handle cases
where `ControllerInfo` is not set, improving system stability.
- New Feature: Updated the Playground configuration to optionally
include `personal_api_key` and `project_name`, providing more
flexibility in setup.
- Security Improvement: Updated the Aperture-Go SDK to use custom TLS
configuration, enhancing the security of the system.
- New Feature: Added a new unary interceptor function in Aperture-Go SDK
that logs the invoked method and adds an "apikey" metadata, improving
traceability and security.
Etcd robustness (2851)
- New Feature: Enhanced the software's reliability by making certain
fields required in the `Sampler` and `LoadRamp` messages.
- New Feature: Added a "valid_till_timestamp" field to the
"LoadDecision" message, improving the scheduling of background jobs.
- Refactor: Updated the `provideAgent` and `provideController` functions
to use a `configProvider` for configuration updates, enhancing the
software's flexibility.
- Refactor: Replaced the usage of `etcdwriter.Writer` with
`etcdclient.Client` across multiple packages, simplifying the code and
improving interaction with etcd.
- Refactor: Updated several functions in the `Agents` and `Handler`
structs to take a `context.Context` parameter, allowing for better
control and cancellation of operations.
- Refactor: Removed unused constants related to Kubernetes metrics,
simplifying the codebase.
- Test: Updated the `Provider` struct and its associated methods in the
`otelconfig` package, improving the configuration handling in tests.
- Chore: Removed the dependency on the deprecated `clientv3` package,
replacing it with the `etcdclient` package.
Use proto representation of token bucket state and related structs (2846)
Description of change
- Add proto messages for token bucket State, TakeNRequest, TakeNResponse
- Stop using gob marshal and unmarshal, instead use proto marshal and
unmarshal
![screencapture-localhost-3000-d-f5fafd6dbdc3fef42960b4d75615afd5463b2564-aperture-dashboard-service1-demo-app-2023-10-24-13_52_03](https://github.com/fluxninja/aperture/assets/1553055/9cb86215-dc5a-44d2-88a7-ee56e4482033)
- New Feature: Introduced a new protocol buffer file for improved data
exchange between the client and server, enhancing the software's
intuitiveness and reliability.
- Refactor: Updated the rate-limiter and dist-cache modules for better
performance and code maintainability.
- New Feature: Added a new configuration option `agent.minReadySeconds`
to the Aperture Agent, allowing users to specify the minimum readiness
time for a newly created Agent pod.
- Bug Fix: Fixed missing package imports in the `agent_types.go` file,
improving the software's reliability.
- New Feature: Added a `MinReadySeconds` field to the `CommonSpec`
struct, providing users with more control over deployment or daemonset
readiness.
- Documentation: Updated the Grafana dashboard blueprint to replace
placeholders with actual values, making the documentation more accurate
and user-friendly.
Reserve 'aperture-cloud' agent group for cloud agent (2847)
- New Feature: Introduced a new `CLOUD_AGENT` option for
`heartbeat_interval` and `heartbeat_mode` parameters, providing more
flexibility for different deployment scenarios.
- Update: Changed the default agent group for the peer-to-peer cluster
from "default" to "aperture-cloud".
- Update: Added validation checks to prevent the use of reserved group
names and ensure certain conditions for FluxNinja Cloud Agents.
- Update: Modified the behavior of agent grouping, now set to a fixed
value of 'aperture-cloud'.
- Refactor: Improved code readability by replacing string literals with
constant variables in several places.
- Test: Updated test cases to reflect the changes in the codebase.
- Documentation: Updated documentation to reflect the new changes and
options available.
Dashboards fix (2839)
Description of change
<img width="1624" alt="Screenshot 2023-10-23 at 2 31 21 PM"
src="https://github.com/fluxninja/aperture/assets/1553055/b4563f3e-0ac9-4038-b312-d8116226b22e">
- Refactor: Adjusted the import order of `RangeDrivenLoadScheduler` in
the Grafana actuator library. This change is part of our ongoing efforts
to improve code organization and maintainability, but it doesn't affect
the functionality or user experience.
- New Feature: Enhanced the `processPolicy` function in the Aperture
Control Command. It now accepts an additional parameter, `policyName`,
ensuring accurate policy name transmission during the policy compilation
process. This update enhances the reliability of policy management,
providing a more seamless user experience.
Update load scheduler docs (2837)
- New Feature: Introduced three new load schedulers - AIMD, AIAD, and
Range-Driven. These enhance the system's ability to adjust the token
rate based on different strategies, improving the service's resilience
during high-traffic periods.
- Documentation: Made minor text edits for clarity, changing "overtime"
to "over time" in two documents. These changes do not affect
functionality but improve readability.
Move GradientController to top-level components (2838)
Description of change
- Remove controller interface and related files
- Migrate GradientController to be a top-level component
![screencapture-localhost-3000-d-f5fafd6dbdc3fef42960b4d75615afd5463b2564-aperture-dashboard-service1-demo-app-2023-10-23-10_30_53](https://github.com/fluxninja/aperture/assets/1553055/20e8a7d4-ebc0-4052-ac43-4e99ac9b3d9b)
- Refactor: Simplified and reorganized the codebase for better
maintainability. This includes changes in the import statements and
function calls in the `component-factory.go` and
`component-factory_test.go` files.
- New Feature: Introduced a new `GradientController` component. This
component enhances the software's ability to handle dynamic
configuration updates and compute outputs based on input readings.
- Style: Made cosmetic changes to the `PIDController` struct and its
associated functions for improved readability and consistency.
- Chore: Removed unused import statements in the
`dashboard_group.libsonnet` and `main.libsonnet` files, indicating a
cleaner and more efficient codebase.
[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v2.21.0...releases/aperture-controller/v2.22.0