Aperture-py

Latest version: v2.26.0

Safety actively analyzes 688674 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 23 of 53

2.8.1rc.1

Changelog

List of aperture PRs merged since 2.8.0 release. For the full list of changes, see [list of changes][changes]

Fix OTel ConfiProvider (2378)

Description of change

Checklist

- [x] Tested in playground or other setup
- [ ] Screenshot (Grafana) from playground added to PR for 15+ minute
run
- [ ] Documentation is changed or added
- [ ] Tests and/or benchmarks are included
- [ ] Breaking changes

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
Summary by CodeRabbit

**Release Notes:**

- **Refactor**: Introduced new locks in `Provider` struct for concurrent
access protection to `config`, `watchFunc`, and `hooks` fields.
- **New Feature**: Added a new route handler for `/goroutine` in the
`setupProfilers` function for goroutine profiling.
- **Test**: Updated `otel_test.go` to use `GetConfig` method instead of
`MustGetConfig` from `configProvider` object, improving error handling.

> πŸŽ‰ With locks that guard and routes anew,
>
> Tests refined, their purpose true.
>
> In code we trust, in change we thrive,
>
> To the future of our codebase, we high-five! πŸš€
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Added support to get the policy status in the API calls (2377)

Fixes 2368

![image](https://github.com/fluxninja/aperture/assets/34568645/37b674ed-269d-4384-8f52-fa63bad8987b)

**New Feature:**
- Added a `Status` field to `GetPolicyResponse` to indicate the status
of the policy.
- Introduced a `reason` field in `GetPolicyResponse` for additional
information on policy status.
- Enhanced `GetPolicies` function to support retrieval and validation of
policy status.
- Updated logic to handle `INVALID` policy status and print reasons for
invalidity.

**Documentation:**
- Deprecated `TelemetryCollector` in favor of `InfraMeter`, updated
deprecation version from 2.8.0 to 3.0.0.

> πŸŽ‰ With every line of code, we strive,
> To make our software come alive.
> Policies now tell their tale,
> When they're valid, when they fail. πŸš€
> Farewell to the old collector, so static,
> Hello InfraMeter, you're truly fantastic! 🌟

Added job to upload policy to latest and Added support to load policy CR in apply and flags to force apply (2374)

Fixes 2352

**New Features:**
- Added a new CI/CD job `upload-policy-to-latest` that applies
playground policies to a controller endpoint when updated.
- Introduced `force` and `select-all` flags in the `generateCmd` command
for policy application. The `force` flag allows applying a policy even
if it already exists, while the `select-all` flag applies all generated
policies.

**Documentation:**
- Updated documentation to reflect the new features in the `generateCmd`
command.

> πŸŽ‰ Here's to the code that keeps evolving, πŸ”„
> To the flags that keep revolving! 🚩
> With every push, we're problem-solving, πŸ’‘
> In the realm of automation, we're revolving! 🌐🎊

[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v2.8.0...releases/aperture-controller/v2.8.1-rc.1

2.8.0

Changelog

List of aperture PRs merged since 2.7.0 release. For the full list of changes, see [list of changes][changes]

De-duplicated receivers and processors of the infra meter OTEL Pipelines (2355)

![image](https://github.com/fluxninja/aperture/assets/34568645/e123fb4d-4ef0-4b13-8789-8f584403a97e)

Note: Brings in multi-selectors in k8s attribute processor
https://github.com/fluxninja/opentelemetry-collector-contrib/commit/6f18e2a71b530ed62447dd84310392d44d65889a

**Refactor:**
- Modified the `kubeletstats_infra_meter` function to replace the
`filters` parameter with `selectors`, and added a check to ensure that
`selectors` is an array.
- Updated the value of `ProcessorK8sAttributes` from
`"k8sattributes/kubeletstats"` to `"k8sattributes"`.
- Introduced a new constant `ProcessorK8sAttributesSelectors` with the
value `"selectors"`.

**New Feature:**
- Enhanced the `addInfraMeter` function to handle duplication of
receivers and processors in the infra meter OTEL pipelines using SHA-256
hashing for unique identification.
- Added logic to de-duplicate receivers and processors in the infra
meter OpenTelemetry pipelines, handling per-agent-group conditions, and
updating Kubernetes attribute processors with new selectors.

**Bug fix:**
- Improved error message in the `otelState` function to include the
current state of the otel-collector when it's not running.

> πŸŽ‰ Here's to the code that's now more robust, πŸ₯‚
> With selectors in place, and filters lost. πŸ—‘οΈ
> Duplication handled, no more fuss, πŸš€
> And better error messages, at no extra cost! πŸ’ͺ

Docs: fixes to type of fields and links (2351)

Description of change
* Better link for workload_latency_based_tokens.
* Fix type of priority and tokens in generated docs.

Disable local pipelines on the agent if connecting to the cloud (2299)

**Refactor:**
- Modified the logic in `extensions/fluxninja/otel/provide.go` to
conditionally delete local metrics pipelines based on the
`DisableLocalOTelPipeline` configuration and `EnableCloudController`.
- Introduced a parameter to the `deleteLocalMetricsPipeline` function to
specify which pipeline to delete.
- Updated the condition for disabling local pipelines in an
OpenTelemetry configuration.

> πŸŽ‰ With configurations so fine, we refine, πŸ› οΈ
> Deleting pipelines, one at a time. πŸ“Š
> Cloud or local, choose your prime, 🌩️
> FluxNinja's update, truly sublime! πŸ‡

Add EnableCloudController flag to the fluxninja plugin (2339)

The flag disables local otel pipelines and overrides etcd connection.

Resolves https://github.com/fluxninja/aperture/issues/2308

---------

Co-authored-by: MichaΕ‚ Krasnoborski <michal.krasnoborskifluxninja.com>

Fix timout behavior when client dealine is not provided (2336)

**Bug fix:**
- Modified the timeout handling logic in the `Decide` function of
`scheduler.go`. This change ensures that a context timeout is set based
on the workload timeout even if no client deadline is given.

**Documentation:**
- Added comments to the `queue_timeout` field in the `Scheduler` message
in `flowcontrol.proto`, clarifying its behavior when no client deadline
is provided and when its value is 0.
- Updated the documentation for a timeout field in a workload flow in
`spec.md`, explaining the implication of a 0 timeout value and the
behavior when no override is provided.

> πŸŽ‰ Here's to the code that now runs with grace,
> With timeouts handled, no matter the case.
> No client deadline? Don't show a frown,
> The workload timeout won't let you down! πŸ₯³

Added client-go auth module in aperturectl (2334)

Fixes 2331

markdown
New Feature:
- Added `client-go` authentication plugin import in various parts of the Kubernetes-related project. This change enhances the way our application interacts with and authenticates with the Kubernetes API, improving overall functionality.

> πŸŽ‰ With a new plugin in sight,
> Our app takes a powerful flight.
> To Kubernetes, it now speaks right,
> In the realm of APIs, a knight! πŸ›‘οΈπŸš€


Fix `nil` pointer when adding `retry-after` header (2335)


Add ability to define queue timeout in scheduler workload (2326)

![screencapture-localhost-3000-d-1cafa24eadc87e0eeb9217b9179e31473bcfa21d-aperture-service-protection-2023-07-06-14_37_41](https://github.com/fluxninja/aperture/assets/1553055/7e9a5bb8-d47c-46c5-a706-c27684c5bdae)

markdown
**New Feature**
- Added a new field `queue_timeout` to the `Scheduler` message in protobuf definition, allowing users to set a timeout for the flow in the workload. The minimum of the client's timeout and the defined workload timeout is used.

**Refactor**
- Simplified function signatures of `ProcessRequest` in the `Engine` struct and `CheckRequest` in the `Handler` struct by writing parameters on one line.


> πŸŽ‰ With timeouts now in control, our flows are on a roll! πŸš€
> No more waiting in despair, your requests are handled with care. πŸ’»
> Function signatures sleek and neat, making our codebase petite! πŸ“š

Add `policies` command to `aperturectl` (2310)

New command allows to list all the applied policies.

Read controller ID from config (2298)

**Refactor:**
- Added a new configuration parameter `controller_id` to the
FluxNinjaExtensionConfig.
- Modified the `setupControllerInfo` function in the `Heartbeats`
package to accept controller ID as an argument.
- Changed the names of Kubernetes Secret objects and removed
`OwnerReferences` and `Annotations` fields from several Kubernetes
objects.
- Adjusted the secret key name and modified how controller names are
generated.
- Changed the `ControllerServiceName` constant and added a boolean
argument to the `ControllerVolumes` function.

> πŸŽ‰ With every line of code, we stride,
> Refactoring with pride, no place to hide.
> Secrets renamed, constants re-framed,
> Controller IDs tamed, our goals aimed. πŸš€
> In the heart of the beats, where the controller meets,
> A new tale repeats, as the old one retreats. πŸ”„

Make controller interactions with etcd and prometheus multi-tenant aware (2204)

**New Features:**
- Introduced multi-tenancy support for etcd and Prometheus
configurations.
- Added a new `namespace` field for etcd configuration.
- Implemented OAuth2 token source for Google Cloud Platform (GCP).
- Added new configuration options for etcd, fluxninja, otel, server, and
token_source.

> πŸŽ‰ With namespaces wide and broad,
> And configs in accord,
> We stride towards the cloud so high,
> With OAuth as our guide. πŸš€
> Multi-tenancy now in sight,
> In etcd and Prometheus' light,
> A new dawn of features bright,
> In this release takes flight! 🌟

---------

Co-authored-by: Filip Chmielewski <filip.chmielewskifluxninja.com>

Upgrade OTEL to v0.80.0 (2269)

![image](https://github.com/fluxninja/aperture/assets/34568645/21f5ebc0-60c1-42de-958e-4e25d71e7c4e)

Raised 2270 for test failures.

**Chore:**
- Updated GoLeakDetector to ignore a specific function known for holding resources in an expected manner.



> Here's to the code that's lean and neat, πŸ₯‚
> With every leak that we defeat. πŸš€
> Ignoring functions, oh so wise, 🧠
> For better software is the prize. πŸ†

restructure concept docs (2055)


- New Feature: Added Control Point concept documentation
- New Feature: Introduced Auto Scaler and Pod Scaler components in auto-scale documentation
- Documentation: Restructured and updated various concept documents and links
- Documentation: Updated service protection policy and load-based auto-scaling documentation


> πŸŽ‰ A new dawn for our docs, so clear and bright,
> With Control Points and Auto-Scalers taking flight.
> Links updated, concepts refined, a better way to see,
> Embrace the changes, dear users, and code in harmony. 🌟

---------

Co-authored-by: Karanbir Sohi <karanbir.sohifluxninja.com>
Co-authored-by: Tanveer Gill <tanveer.gillfluxninja.com>

Allow previewing decisions via aperturectl (2264)

**New Feature**
- Introduced a new feature to the `aperturectl` command-line tool: the
`decisions` command. This command fetches and displays decisions made by
different system components from an etcd database.
- Added a new RPC method `GetDecisions` to the `Controller` service and
`PolicyService` service in protobuf definitions.
- Updated documentation with details and usage examples of the new
`aperturectl decisions` command.

> πŸŽ‰ A new command takes flight, `aperturectl decisions` in sight! πŸš€
> Fetching data, clear and bright, making our system's choices light! πŸ’‘
> With every decision in view, understanding grows anew. 🌱
> Celebrate this feature debut, for it's a step towards something huge!
🎊

Add missing labels to label whitelist (2265)

**New Feature:**
- Added four new labels to the metrics processor whitelist in the
OpenTelemetry Collector package. The new labels are
`ApertureQuotaSchedulersLabel`, `ApertureDroppingQuotaSchedulersLabel`,
`ApertureSamplersLabel`, and `ApertureDroppingSamplersLabel`.

> Four new labels, oh what a sight! πŸŽ‰
> In our metrics, they ignite πŸ”₯
> Quota schedulers, samplers too,
> With more data, insights accrue. πŸ“ˆ
> Celebrate this code's flight, πŸš€
> For it brings us greater light. πŸ’‘

[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v2.7.0...releases/aperture-controller/v2.8.0

2.8.0rc.2

Changelog

List of aperture PRs merged since 2.7.0 release. For the full list of changes, see [list of changes][changes]

De-duplicated receivers and processors of the infra meter OTEL Pipelines (2355)

![image](https://github.com/fluxninja/aperture/assets/34568645/e123fb4d-4ef0-4b13-8789-8f584403a97e)

Note: Brings in multi-selectors in k8s attribute processor
https://github.com/fluxninja/opentelemetry-collector-contrib/commit/6f18e2a71b530ed62447dd84310392d44d65889a

**Refactor:**
- Modified the `kubeletstats_infra_meter` function to replace the
`filters` parameter with `selectors`, and added a check to ensure that
`selectors` is an array.
- Updated the value of `ProcessorK8sAttributes` from
`"k8sattributes/kubeletstats"` to `"k8sattributes"`.
- Introduced a new constant `ProcessorK8sAttributesSelectors` with the
value `"selectors"`.

**New Feature:**
- Enhanced the `addInfraMeter` function to handle duplication of
receivers and processors in the infra meter OTEL pipelines using SHA-256
hashing for unique identification.
- Added logic to de-duplicate receivers and processors in the infra
meter OpenTelemetry pipelines, handling per-agent-group conditions, and
updating Kubernetes attribute processors with new selectors.

**Bug fix:**
- Improved error message in the `otelState` function to include the
current state of the otel-collector when it's not running.

> πŸŽ‰ Here's to the code that's now more robust, πŸ₯‚
> With selectors in place, and filters lost. πŸ—‘οΈ
> Duplication handled, no more fuss, πŸš€
> And better error messages, at no extra cost! πŸ’ͺ

Docs: fixes to type of fields and links (2351)

Description of change
* Better link for workload_latency_based_tokens.
* Fix type of priority and tokens in generated docs.

Disable local pipelines on the agent if connecting to the cloud (2299)

**Refactor:**
- Modified the logic in `extensions/fluxninja/otel/provide.go` to
conditionally delete local metrics pipelines based on the
`DisableLocalOTelPipeline` configuration and `EnableCloudController`.
- Introduced a parameter to the `deleteLocalMetricsPipeline` function to
specify which pipeline to delete.
- Updated the condition for disabling local pipelines in an
OpenTelemetry configuration.

> πŸŽ‰ With configurations so fine, we refine, πŸ› οΈ
> Deleting pipelines, one at a time. πŸ“Š
> Cloud or local, choose your prime, 🌩️
> FluxNinja's update, truly sublime! πŸ‡

Add EnableCloudController flag to the fluxninja plugin (2339)

The flag disables local otel pipelines and overrides etcd connection.

Resolves https://github.com/fluxninja/aperture/issues/2308

---------

Co-authored-by: MichaΕ‚ Krasnoborski <michal.krasnoborskifluxninja.com>

Fix timout behavior when client dealine is not provided (2336)

**Bug fix:**
- Modified the timeout handling logic in the `Decide` function of
`scheduler.go`. This change ensures that a context timeout is set based
on the workload timeout even if no client deadline is given.

**Documentation:**
- Added comments to the `queue_timeout` field in the `Scheduler` message
in `flowcontrol.proto`, clarifying its behavior when no client deadline
is provided and when its value is 0.
- Updated the documentation for a timeout field in a workload flow in
`spec.md`, explaining the implication of a 0 timeout value and the
behavior when no override is provided.

> πŸŽ‰ Here's to the code that now runs with grace,
> With timeouts handled, no matter the case.
> No client deadline? Don't show a frown,
> The workload timeout won't let you down! πŸ₯³

Added client-go auth module in aperturectl (2334)

Fixes 2331

markdown
New Feature:
- Added `client-go` authentication plugin import in various parts of the Kubernetes-related project. This change enhances the way our application interacts with and authenticates with the Kubernetes API, improving overall functionality.

> πŸŽ‰ With a new plugin in sight,
> Our app takes a powerful flight.
> To Kubernetes, it now speaks right,
> In the realm of APIs, a knight! πŸ›‘οΈπŸš€


Fix `nil` pointer when adding `retry-after` header (2335)


Add ability to define queue timeout in scheduler workload (2326)

![screencapture-localhost-3000-d-1cafa24eadc87e0eeb9217b9179e31473bcfa21d-aperture-service-protection-2023-07-06-14_37_41](https://github.com/fluxninja/aperture/assets/1553055/7e9a5bb8-d47c-46c5-a706-c27684c5bdae)

markdown
**New Feature**
- Added a new field `queue_timeout` to the `Scheduler` message in protobuf definition, allowing users to set a timeout for the flow in the workload. The minimum of the client's timeout and the defined workload timeout is used.

**Refactor**
- Simplified function signatures of `ProcessRequest` in the `Engine` struct and `CheckRequest` in the `Handler` struct by writing parameters on one line.


> πŸŽ‰ With timeouts now in control, our flows are on a roll! πŸš€
> No more waiting in despair, your requests are handled with care. πŸ’»
> Function signatures sleek and neat, making our codebase petite! πŸ“š

Add `policies` command to `aperturectl` (2310)

New command allows to list all the applied policies.

Read controller ID from config (2298)

**Refactor:**
- Added a new configuration parameter `controller_id` to the
FluxNinjaExtensionConfig.
- Modified the `setupControllerInfo` function in the `Heartbeats`
package to accept controller ID as an argument.
- Changed the names of Kubernetes Secret objects and removed
`OwnerReferences` and `Annotations` fields from several Kubernetes
objects.
- Adjusted the secret key name and modified how controller names are
generated.
- Changed the `ControllerServiceName` constant and added a boolean
argument to the `ControllerVolumes` function.

> πŸŽ‰ With every line of code, we stride,
> Refactoring with pride, no place to hide.
> Secrets renamed, constants re-framed,
> Controller IDs tamed, our goals aimed. πŸš€
> In the heart of the beats, where the controller meets,
> A new tale repeats, as the old one retreats. πŸ”„

Make controller interactions with etcd and prometheus multi-tenant aware (2204)

**New Features:**
- Introduced multi-tenancy support for etcd and Prometheus
configurations.
- Added a new `namespace` field for etcd configuration.
- Implemented OAuth2 token source for Google Cloud Platform (GCP).
- Added new configuration options for etcd, fluxninja, otel, server, and
token_source.

> πŸŽ‰ With namespaces wide and broad,
> And configs in accord,
> We stride towards the cloud so high,
> With OAuth as our guide. πŸš€
> Multi-tenancy now in sight,
> In etcd and Prometheus' light,
> A new dawn of features bright,
> In this release takes flight! 🌟

---------

Co-authored-by: Filip Chmielewski <filip.chmielewskifluxninja.com>

Upgrade OTEL to v0.80.0 (2269)

![image](https://github.com/fluxninja/aperture/assets/34568645/21f5ebc0-60c1-42de-958e-4e25d71e7c4e)

Raised 2270 for test failures.

**Chore:**
- Updated GoLeakDetector to ignore a specific function known for holding resources in an expected manner.



> Here's to the code that's lean and neat, πŸ₯‚
> With every leak that we defeat. πŸš€
> Ignoring functions, oh so wise, 🧠
> For better software is the prize. πŸ†

restructure concept docs (2055)


- New Feature: Added Control Point concept documentation
- New Feature: Introduced Auto Scaler and Pod Scaler components in auto-scale documentation
- Documentation: Restructured and updated various concept documents and links
- Documentation: Updated service protection policy and load-based auto-scaling documentation


> πŸŽ‰ A new dawn for our docs, so clear and bright,
> With Control Points and Auto-Scalers taking flight.
> Links updated, concepts refined, a better way to see,
> Embrace the changes, dear users, and code in harmony. 🌟

---------

Co-authored-by: Karanbir Sohi <karanbir.sohifluxninja.com>
Co-authored-by: Tanveer Gill <tanveer.gillfluxninja.com>

Allow previewing decisions via aperturectl (2264)

**New Feature**
- Introduced a new feature to the `aperturectl` command-line tool: the
`decisions` command. This command fetches and displays decisions made by
different system components from an etcd database.
- Added a new RPC method `GetDecisions` to the `Controller` service and
`PolicyService` service in protobuf definitions.
- Updated documentation with details and usage examples of the new
`aperturectl decisions` command.

> πŸŽ‰ A new command takes flight, `aperturectl decisions` in sight! πŸš€
> Fetching data, clear and bright, making our system's choices light! πŸ’‘
> With every decision in view, understanding grows anew. 🌱
> Celebrate this feature debut, for it's a step towards something huge!
🎊

Add missing labels to label whitelist (2265)

**New Feature:**
- Added four new labels to the metrics processor whitelist in the
OpenTelemetry Collector package. The new labels are
`ApertureQuotaSchedulersLabel`, `ApertureDroppingQuotaSchedulersLabel`,
`ApertureSamplersLabel`, and `ApertureDroppingSamplersLabel`.

> Four new labels, oh what a sight! πŸŽ‰
> In our metrics, they ignite πŸ”₯
> Quota schedulers, samplers too,
> With more data, insights accrue. πŸ“ˆ
> Celebrate this code's flight, πŸš€
> For it brings us greater light. πŸ’‘

[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v2.7.0...releases/aperture-controller/v2.8.0-rc.2

2.8.0rc.1

Changelog

List of aperture PRs merged since 2.7.0 release. For the full list of changes, see [list of changes][changes]

Update aperturectl docs (2327)

**Documentation:**
- Updated the `aperturectl` command usage examples in both the source
code and documentation. The `--name` parameter value has been changed
from `policies/rate-limiting` to `rate-limiting/base`.

> πŸŽ‰ With a tweak here, and a tweak there, πŸ› οΈ
> Our docs now have a brand new flair! 🌟
> No more confusion, no more despair, 🚫🀯
> Just clear commands floating in the air. πŸ’»πŸŒˆ

Add ability to define queue timeout in scheduler workload (2326)

![screencapture-localhost-3000-d-1cafa24eadc87e0eeb9217b9179e31473bcfa21d-aperture-service-protection-2023-07-06-14_37_41](https://github.com/fluxninja/aperture/assets/1553055/7e9a5bb8-d47c-46c5-a706-c27684c5bdae)

markdown
**New Feature**
- Added a new field `queue_timeout` to the `Scheduler` message in protobuf definition, allowing users to set a timeout for the flow in the workload. The minimum of the client's timeout and the defined workload timeout is used.

**Refactor**
- Simplified function signatures of `ProcessRequest` in the `Engine` struct and `CheckRequest` in the `Handler` struct by writing parameters on one line.


> πŸŽ‰ With timeouts now in control, our flows are on a roll! πŸš€
> No more waiting in despair, your requests are handled with care. πŸ’»
> Function signatures sleek and neat, making our codebase petite! πŸ“š

Docs: consistent casing of Aperture Controller & Agent (2316)


Document duration and other minor fixes (2312)


Add `policies` command to `aperturectl` (2310)

New command allows to list all the applied policies.

Add `api-key` flag to `aperturectl` (2307)

This allows to interact with Cloud Controller using `aperturectl`.

Make oauth in Prom client optional (2305)


Read controller ID from config (2298)

**Refactor:**
- Added a new configuration parameter `controller_id` to the
FluxNinjaExtensionConfig.
- Modified the `setupControllerInfo` function in the `Heartbeats`
package to accept controller ID as an argument.
- Changed the names of Kubernetes Secret objects and removed
`OwnerReferences` and `Annotations` fields from several Kubernetes
objects.
- Adjusted the secret key name and modified how controller names are
generated.
- Changed the `ControllerServiceName` constant and added a boolean
argument to the `ControllerVolumes` function.

> πŸŽ‰ With every line of code, we stride,
> Refactoring with pride, no place to hide.
> Secrets renamed, constants re-framed,
> Controller IDs tamed, our goals aimed. πŸš€
> In the heart of the beats, where the controller meets,
> A new tale repeats, as the old one retreats. πŸ”„

Make controller interactions with etcd and prometheus multi-tenant aware (2204)

**New Features:**
- Introduced multi-tenancy support for etcd and Prometheus
configurations.
- Added a new `namespace` field for etcd configuration.
- Implemented OAuth2 token source for Google Cloud Platform (GCP).
- Added new configuration options for etcd, fluxninja, otel, server, and
token_source.

> πŸŽ‰ With namespaces wide and broad,
> And configs in accord,
> We stride towards the cloud so high,
> With OAuth as our guide. πŸš€
> Multi-tenancy now in sight,
> In etcd and Prometheus' light,
> A new dawn of features bright,
> In this release takes flight! 🌟

---------

Co-authored-by: Filip Chmielewski <filip.chmielewskifluxninja.com>

Upgrade OTEL to v0.80.0 (2269)

![image](https://github.com/fluxninja/aperture/assets/34568645/21f5ebc0-60c1-42de-958e-4e25d71e7c4e)

Raised 2270 for test failures.

**Chore:**
- Updated GoLeakDetector to ignore a specific function known for holding resources in an expected manner.



> Here's to the code that's lean and neat, πŸ₯‚
> With every leak that we defeat. πŸš€
> Ignoring functions, oh so wise, 🧠
> For better software is the prize. πŸ†

restructure concept docs (2055)

**Release Notes**

- **Documentation**: Updated various URLs and links in the
documentation, introduced new features such as Control Point concept
documentation, Auto Scaler, and Pod Scaler components. Renamed "Aperture
Agent" to "Aperture agent" for consistency.
- **Refactor**: Added a new label `InfraMeterNameLabel` for infra meter
name in resources, and updated comments for `PolicyNameLabel` and
`PolicyHashLabel`. The key used for labeling an infrastructure meter is
now using a constant instead of a hardcoded string.

> πŸŽ‰ With every link that's been fixed,
> Our docs are now perfectly mixed.
> New labels shine bright,
> In the codebase's night,
> And hardcoding is finally nixed! πŸŽ‰

---------

Co-authored-by: Karanbir Sohi <karanbir.sohifluxninja.com>
Co-authored-by: Tanveer Gill <tanveer.gillfluxninja.com>

Allow previewing decisions via aperturectl (2264)

Description of change


$ ./cmd/aperturectl/aperturectl decisions --decision-type="load_scheduler" --kube
agent_group-default-policy-service1-demo-app-component_id-root.0.10:
{
"commonAttributes": {
"policyName": "service1-demo-app",
"policyHash": "97VtZtWDlxuaXEaIBJnHB5BA8C2hVXkKPh7BBZOYF2k=",
"componentId": "root.0.10"
},
"loadDecision": {
"tickInfo": {
"timestamp": "2023-07-03T21:57:04.769116592Z",
"tick": "110",
"interval": "10s"
},
"loadMultiplier": 1.8500000000000005,
"tokensByWorkloadIndex": {
"default": "152",
"guest": "101",
"subscriber": "89"
}
}
}

$ ./cmd/aperturectl/aperturectl decisions --all --kube
rate_limiter/agent_group-default-policy-service1-demo-app-component_id-root.3:
{
"commonAttributes": {
"policyName": "service1-demo-app",
"policyHash": "97VtZtWDlxuaXEaIBJnHB5BA8C2hVXkKPh7BBZOYF2k=",
"componentId": "root.3"
},
"rateLimiterDecision": {
"bucketCapacity": 10,
"fillAmount": 10
}
}

load_scheduler/agent_group-default-policy-service1-demo-app-component_id-root.0.10:
{
"commonAttributes": {
"policyName": "service1-demo-app",
"policyHash": "97VtZtWDlxuaXEaIBJnHB5BA8C2hVXkKPh7BBZOYF2k=",
"componentId": "root.0.10"
},
"loadDecision": {
"tickInfo": {
"timestamp": "2023-07-03T21:57:24.770293754Z",
"tick": "112",
"interval": "10s"
},
"loadMultiplier": 1.9000000000000004,
"tokensByWorkloadIndex": {
"default": "152",
"guest": "101",
"subscriber": "89"
}
}
}


**New Feature**
- Introduced a new feature to the `aperturectl` command-line tool: the
`decisions` command. This command fetches and displays decisions made by
different system components from an etcd database.
- Added a new RPC method `GetDecisions` to the `Controller` service and
`PolicyService` service in protobuf definitions.
- Updated documentation with details and usage examples of the new
`aperturectl decisions` command.

> πŸŽ‰ A new command takes flight, `aperturectl decisions` in sight! πŸš€
> Fetching data, clear and bright, making our system's choices light! πŸ’‘
> With every decision in view, understanding grows anew. 🌱
> Celebrate this feature debut, for it's a step towards something huge!
🎊

Add missing labels to label whitelist (2265)

**New Feature:**
- Added four new labels to the metrics processor whitelist in the
OpenTelemetry Collector package. The new labels are
`ApertureQuotaSchedulersLabel`, `ApertureDroppingQuotaSchedulersLabel`,
`ApertureSamplersLabel`, and `ApertureDroppingSamplersLabel`.

> Four new labels, oh what a sight! πŸŽ‰
> In our metrics, they ignite πŸ”₯
> Quota schedulers, samplers too,
> With more data, insights accrue. πŸ“ˆ
> Celebrate this code's flight, πŸš€
> For it brings us greater light. πŸ’‘

[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v2.7.0...releases/aperture-controller/v2.8.0-rc.1

2.7.0

Changelog

List of aperture PRs merged since 2.6.0 release. For the full list of changes, see [list of changes][changes]

Fix error logs in agent and controller (2237)


Refactor:
- Improved error handling in the main functions of `agent.go` and `controller.go`.
- Enhanced clarity by renaming variables.
- Added return statement post error logging for better control flow.
- Adjusted error messages for platform creation and initialization failures.
- Refined error visualization and logging, including more descriptive final error messages.

> πŸŽ‰ With errors caught and clearly logged,
> Our code now stands robust and un-clogged.
> Variables named with thoughtful care,
> Make our intentions clear and fair.
> On this journey, we've come far,
> Here's to the refactor, raising the bar! πŸ₯‚


Better FX error handling (2233)

This adds better error handling for platform FX errors. Before that, some errors were not logged properly.

Stop sending label values when Telemetry: false (2222)

* Values for Classifier-created labels which have Telemetry: false are
now hidden from OLAP telemetry.
* Values of HTTP Headers are also hidden now.

Drive-by: Use interface for labels map to avoid copying.

Resolves: 2183

Update use case docs (2230)

Release Notes:
- Documentation: Updated terminology and descriptions related to load
ramping, replacing "rollout" with "load ramp" for clarity.
- Documentation: Improved documentation for integrating CollectD's
`write_http` plugin JSON metrics with the OpenTelemetry Collector.
- Documentation: Updated section titles and URLs for load management
features, replacing "load ramp" with "percentage rollouts".
- Documentation: Updated links in the documentation for adaptive service
protection and workload prioritization tutorials.
- Documentation: Updated wording in the configuration documentation,
replacing "via dynamic configuration" with "through dynamic
configuration".
- Refactor: Renamed variables and fields related to a rollout policy to
reflect a load ramp policy.
- Refactor: Renamed user control components and corresponding signal
names in a code block.

> "Load ramps and metrics galore,
> With clarity, we explore.
> Terminology refined and bright,
> Integration made just right.
> Adaptive protection, workload's might,
> Release notes shine, a delightful sight!"

---------

Co-authored-by: Harjot Gill <harjot.gillfluxninja.com>

Remove policy metadata from annotations (2228)

![screencapture-localhost-3000-d-1cafa24eadc87e0eeb9217b9179e31473bcfa21d-aperture-service-protection-2023-06-29-12_50_23](https://github.com/fluxninja/aperture/assets/1553055/441cc95e-9c15-4f10-8f01-bec0216dce43)

Release Notes:
- Refactor: Removed `PolicyMetadata` message from `policy.proto` in
`api/aperture/policy/language/v1`.
- Refactor: Removed `policy_metadata` field from `PolicyWrapper` message
in `api/aperture/policy/sync/v1`.
- Refactor: Modified logic and functionality to remove policy metadata
from annotations in various `policy.libsonnet` files.
- Refactor: Simplified code by removing unnecessary operations on policy
metadata in `cmd/aperturectl/cmd/apply/policy.go`.
- Refactor: Removed `BlueprintName` field and its usage from `metadata`
struct in `cmd/aperturectl/cmd/blueprints/generate.go`.
- Refactor: Updated paths and blueprint names in various shell scripts
and JSONnet files.
- Refactor: Modified logic in `docs/tools/aperturectl/validate_all.sh`
to correctly execute the `validate.sh` script in each directory.
- Refactor: Removed usage of policy metadata from
`pkg/policies/controlplane/crwatcher/watcher.go`.
- Refactor: Removed `PolicyMetadata` field and its handling from
`pkg/policies/controlplane/iface/policy.go`.
- Refactor: Removed storage and retrieval of policy metadata from
annotations in `pkg/policies/controlplane/policy-service.go`.

> "Code refactored, metadata removed,
> Logic simplified, improvements bestowed.
> Bugs exterminated, changes embraced,
> A cleaner codebase, with elegance laced."

Allow additional unary/streaming server interceptors (2223)

This allows injecting additional interceptors into GRPC Server.

perf: Speed up proto unmarshaling using vtprotobuf plugin (2213)

Speed up marshaling / unmarshaling of check(http) requests & responses by using
optimized methods generated by vtprotobuf plugin and some use of pooling.

Results: ~6% speedup (total (un)marshaling: ~15% β†’Β ~8%), 10% reduction in
allocs.

Drive-by: Expose heap profiler endpoint.

Resolves 2212

Updated version of tools (2220)

**Chore:**
- Updated ASDF cache version from v9 to v10 in CircleCI configuration
files.
- Upgraded versions of Python, gcloud, Golang, and golangci-lint in
.tool-versions file.
- Updated Golang version from 1.20.4 to 1.20.5 in various Dockerfiles.

> πŸŽ‰ Here's to the code that never rests,
> With updates and upgrades, we're giving our best.
> From Python to Golang, all shiny and new,
> For bugs and vulnerabilities, it's a firm adieu! πŸŽ‰

blueprints: use imports to get the common config annotations (2210)

**New Features:**
- Introduced recursive parsing of imported config files in
`blueprint-assets-generator.py`.
- Added schema annotations for various controller and dashboard
parameters in multiple `.libsonnet` files.
- Refactored logic and functionality, including changes to import
statements, introduction of new annotations, merging configurations,
generating policies and dashboards based on provided parameters,
performing validation on parameter objects, and refactoring to use
imports for common config annotations.

**Bug Fixes:**
- Corrected a typo from `allwaysForward` to `alwaysForward`.

**Documentation:**
- Updated import paths and reference links in documentation files.

> πŸŽ‰ Here's to the code that we've refined, πŸ₯‚
> To bugs squashed and typos left behind. πŸ›πŸ”¨
> With each PR, our software shines more bright, πŸ’‘
> Oh, what a joy, this coder's delight! 🎈🎊

---------

Co-authored-by: Harjot Gill <harjot.gillfluxninja.com>
Co-authored-by: Hasit Mistry <hasitfluxninja.com>

[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v2.6.0...releases/aperture-controller/v2.7.0

2.7.0rc.2

Changelog

List of aperture PRs merged since 2.6.0 release. For the full list of changes, see [list of changes][changes]

Fix error logs in agent and controller (2237)


Refactor:
- Improved error handling in the main functions of `agent.go` and `controller.go`.
- Enhanced clarity by renaming variables.
- Added return statement post error logging for better control flow.
- Adjusted error messages for platform creation and initialization failures.
- Refined error visualization and logging, including more descriptive final error messages.

> πŸŽ‰ With errors caught and clearly logged,
> Our code now stands robust and un-clogged.
> Variables named with thoughtful care,
> Make our intentions clear and fair.
> On this journey, we've come far,
> Here's to the refactor, raising the bar! πŸ₯‚


Better FX error handling (2233)

This adds better error handling for platform FX errors. Before that, some errors were not logged properly.

Stop sending label values when Telemetry: false (2222)

* Values for Classifier-created labels which have Telemetry: false are
now hidden from OLAP telemetry.
* Values of HTTP Headers are also hidden now.

Drive-by: Use interface for labels map to avoid copying.

Resolves: 2183

Update use case docs (2230)

Release Notes:
- Documentation: Updated terminology and descriptions related to load
ramping, replacing "rollout" with "load ramp" for clarity.
- Documentation: Improved documentation for integrating CollectD's
`write_http` plugin JSON metrics with the OpenTelemetry Collector.
- Documentation: Updated section titles and URLs for load management
features, replacing "load ramp" with "percentage rollouts".
- Documentation: Updated links in the documentation for adaptive service
protection and workload prioritization tutorials.
- Documentation: Updated wording in the configuration documentation,
replacing "via dynamic configuration" with "through dynamic
configuration".
- Refactor: Renamed variables and fields related to a rollout policy to
reflect a load ramp policy.
- Refactor: Renamed user control components and corresponding signal
names in a code block.

> "Load ramps and metrics galore,
> With clarity, we explore.
> Terminology refined and bright,
> Integration made just right.
> Adaptive protection, workload's might,
> Release notes shine, a delightful sight!"

---------

Co-authored-by: Harjot Gill <harjot.gillfluxninja.com>

Remove policy metadata from annotations (2228)

![screencapture-localhost-3000-d-1cafa24eadc87e0eeb9217b9179e31473bcfa21d-aperture-service-protection-2023-06-29-12_50_23](https://github.com/fluxninja/aperture/assets/1553055/441cc95e-9c15-4f10-8f01-bec0216dce43)

Release Notes:
- Refactor: Removed `PolicyMetadata` message from `policy.proto` in
`api/aperture/policy/language/v1`.
- Refactor: Removed `policy_metadata` field from `PolicyWrapper` message
in `api/aperture/policy/sync/v1`.
- Refactor: Modified logic and functionality to remove policy metadata
from annotations in various `policy.libsonnet` files.
- Refactor: Simplified code by removing unnecessary operations on policy
metadata in `cmd/aperturectl/cmd/apply/policy.go`.
- Refactor: Removed `BlueprintName` field and its usage from `metadata`
struct in `cmd/aperturectl/cmd/blueprints/generate.go`.
- Refactor: Updated paths and blueprint names in various shell scripts
and JSONnet files.
- Refactor: Modified logic in `docs/tools/aperturectl/validate_all.sh`
to correctly execute the `validate.sh` script in each directory.
- Refactor: Removed usage of policy metadata from
`pkg/policies/controlplane/crwatcher/watcher.go`.
- Refactor: Removed `PolicyMetadata` field and its handling from
`pkg/policies/controlplane/iface/policy.go`.
- Refactor: Removed storage and retrieval of policy metadata from
annotations in `pkg/policies/controlplane/policy-service.go`.

> "Code refactored, metadata removed,
> Logic simplified, improvements bestowed.
> Bugs exterminated, changes embraced,
> A cleaner codebase, with elegance laced."

Allow additional unary/streaming server interceptors (2223)

This allows injecting additional interceptors into GRPC Server.

perf: Speed up proto unmarshaling using vtprotobuf plugin (2213)

Speed up marshaling / unmarshaling of check(http) requests & responses by using
optimized methods generated by vtprotobuf plugin and some use of pooling.

Results: ~6% speedup (total (un)marshaling: ~15% β†’Β ~8%), 10% reduction in
allocs.

Drive-by: Expose heap profiler endpoint.

Resolves 2212

Updated version of tools (2220)

**Chore:**
- Updated ASDF cache version from v9 to v10 in CircleCI configuration
files.
- Upgraded versions of Python, gcloud, Golang, and golangci-lint in
.tool-versions file.
- Updated Golang version from 1.20.4 to 1.20.5 in various Dockerfiles.

> πŸŽ‰ Here's to the code that never rests,
> With updates and upgrades, we're giving our best.
> From Python to Golang, all shiny and new,
> For bugs and vulnerabilities, it's a firm adieu! πŸŽ‰

blueprints: use imports to get the common config annotations (2210)

**New Features:**
- Introduced recursive parsing of imported config files in
`blueprint-assets-generator.py`.
- Added schema annotations for various controller and dashboard
parameters in multiple `.libsonnet` files.
- Refactored logic and functionality, including changes to import
statements, introduction of new annotations, merging configurations,
generating policies and dashboards based on provided parameters,
performing validation on parameter objects, and refactoring to use
imports for common config annotations.

**Bug Fixes:**
- Corrected a typo from `allwaysForward` to `alwaysForward`.

**Documentation:**
- Updated import paths and reference links in documentation files.

> πŸŽ‰ Here's to the code that we've refined, πŸ₯‚
> To bugs squashed and typos left behind. πŸ›πŸ”¨
> With each PR, our software shines more bright, πŸ’‘
> Oh, what a joy, this coder's delight! 🎈🎊

---------

Co-authored-by: Harjot Gill <harjot.gillfluxninja.com>
Co-authored-by: Hasit Mistry <hasitfluxninja.com>

[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v2.6.0...releases/aperture-controller/v2.7.0-rc.2

Page 23 of 53

Links

Releases

Has known vulnerabilities

Β© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.