Aperture-py

Latest version: v2.26.0

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

Scan your dependencies

Page 22 of 53

2.9.0

Changelog

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

Fixed pre-commit issue (2393)

Release Notes:
- New Feature: Added a new function `providePrometheusConfigOverride` to
provide a Prometheus configuration override based on the value of
`EnableCloudController` in `FluxNinjaExtensionConfig`.
- Refactor: Removed unused import and configuration key.
- New Feature: Added a new struct `ConfigOverride` to control client
creation behavior.

> "A new feature blooms,
> Prometheus config override looms.
> Unused import takes its leave,
> Refactoring brings reprieve.
> ConfigOverride, a fresh creation,
> Enhancing client's creation sensation."

Always unmarshal etcd client tls config (2389)

This will allow configuring etcd client tls settings even if using
fluxninja-extension-injected etcd endpoints.

Resolves 2372

Add initial documentation for ARC Controller configuration (2387)

Fixes 2388

Release Notes:
- Documentation: Added initial documentation for ARC Controller
configuration.
- Documentation: Updated the documentation for ARC Controller
configuration by removing the "required" constraint from two fields.
- New Feature: Added a new template function `agent.fluxninja.endpoint`
to create the endpoint of the FluxNinja ARC for Aperture Agent. It
checks if the `fluxninja.endpoint` value is provided and fails if it's
empty.
- Bug fix: Added validation checks for the presence of etcd endpoints
and Prometheus address in the ARC Controller configuration. Refactored
error handling and added validation checks for certain fields.
- Bug fix: Added a check to ensure that the etcd endpoints are provided
in the configuration. Updated the `Endpoints` field in the `EtcdConfig`
struct to be optional during JSON serialization.
- Bug fix: Modified the `validate` tag for the `Address` field in the
`PrometheusConfig` struct to allow an empty value.
- Bug fix: Added a condition to check if `promClient` is not nil before
adding the Prometheus remote write exporter and updating the pipeline
configuration.
- Documentation: Update the documentation for ARC Controller
configuration, providing instructions for both ARC Controller and
Aperture Controller deployments.
- Documentation: Added a documentation link to the
`EnableCloudController` field in the `FluxNinjaExtensionConfig` struct.
- Chore: Added a temporary fix for an issue with the `Cython` package
version. No other changes were made.
- Chore: Added installation of Python tools and updated PyYAML version.

> "Code changes dance,
> Documentation sings,
> Bugs fixed, harmony rings.
> New features take a chance,
> Celebrating this PR's advance!"

---------

Co-authored-by: Hardik Shingala <hardik.shingalafluxninja.com>

refactor: Split out Session from etcd/client.Client (2386)

There's a logic to shut down the app when etcd session expires. This is
not desired in all usecases of etcd.Client, so Session is now a separate
type.

Also, the withLease flag on etcdwriter was replaced by SessionScopedKV
wrapper, that handles attaching leases to Put requests.

Avoid notifying otel collector of changes multiple times (2380)

Description of change

I'm not sure if we can call WatchFunc multiple times, so let's avoid
doing it.
The changes will be visible at the next retrieve anyway. Perhaps this
will help
otelcollector avoid starting and stopping at the same time.

Also: Revert 2378 as with this change the deadlock which that PR was
fixing
should (hopefully) not happen anymore.

May fix 2356


**Refactor:**
- Modified the code to prevent multiple calls to `WatchFunc` and rerunning of hooks.
- Replaced individual locks (`configLock` and `watchFuncLock`) with a single lock (`lock`).
- Updated methods that access and modify the config and watch function to use the new lock.
- Ensured correct retrieval of expected configuration values.
- Added verification to ensure receiver "ext1" is not already present in the `cfg.Receivers` map before adding it.

> 🎉 With a lock that's singular, we've made our code more regular. 🔄 No more reruns, no more fuss, just efficient code for us! 🚀


Fix OTel ConfiProvider (2378)

**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! 🚀

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.9.0

2.9.0rc.1

Changelog

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

Fixed pre-commit issue (2393)

Release Notes:
- New Feature: Added a new function `providePrometheusConfigOverride` to
provide a Prometheus configuration override based on the value of
`EnableCloudController` in `FluxNinjaExtensionConfig`.
- Refactor: Removed unused import and configuration key.
- New Feature: Added a new struct `ConfigOverride` to control client
creation behavior.

> "A new feature blooms,
> Prometheus config override looms.
> Unused import takes its leave,
> Refactoring brings reprieve.
> ConfigOverride, a fresh creation,
> Enhancing client's creation sensation."

Always unmarshal etcd client tls config (2389)

This will allow configuring etcd client tls settings even if using
fluxninja-extension-injected etcd endpoints.

Resolves 2372

Add initial documentation for ARC Controller configuration (2387)

Fixes 2388

Release Notes:
- Documentation: Added initial documentation for ARC Controller
configuration.
- Documentation: Updated the documentation for ARC Controller
configuration by removing the "required" constraint from two fields.
- New Feature: Added a new template function `agent.fluxninja.endpoint`
to create the endpoint of the FluxNinja ARC for Aperture Agent. It
checks if the `fluxninja.endpoint` value is provided and fails if it's
empty.
- Bug fix: Added validation checks for the presence of etcd endpoints
and Prometheus address in the ARC Controller configuration. Refactored
error handling and added validation checks for certain fields.
- Bug fix: Added a check to ensure that the etcd endpoints are provided
in the configuration. Updated the `Endpoints` field in the `EtcdConfig`
struct to be optional during JSON serialization.
- Bug fix: Modified the `validate` tag for the `Address` field in the
`PrometheusConfig` struct to allow an empty value.
- Bug fix: Added a condition to check if `promClient` is not nil before
adding the Prometheus remote write exporter and updating the pipeline
configuration.
- Documentation: Update the documentation for ARC Controller
configuration, providing instructions for both ARC Controller and
Aperture Controller deployments.
- Documentation: Added a documentation link to the
`EnableCloudController` field in the `FluxNinjaExtensionConfig` struct.
- Chore: Added a temporary fix for an issue with the `Cython` package
version. No other changes were made.
- Chore: Added installation of Python tools and updated PyYAML version.

> "Code changes dance,
> Documentation sings,
> Bugs fixed, harmony rings.
> New features take a chance,
> Celebrating this PR's advance!"

---------

Co-authored-by: Hardik Shingala <hardik.shingalafluxninja.com>

refactor: Split out Session from etcd/client.Client (2386)

There's a logic to shut down the app when etcd session expires. This is
not desired in all usecases of etcd.Client, so Session is now a separate
type.

Also, the withLease flag on etcdwriter was replaced by SessionScopedKV
wrapper, that handles attaching leases to Put requests.

Avoid notifying otel collector of changes multiple times (2380)

Description of change

I'm not sure if we can call WatchFunc multiple times, so let's avoid
doing it.
The changes will be visible at the next retrieve anyway. Perhaps this
will help
otelcollector avoid starting and stopping at the same time.

Also: Revert 2378 as with this change the deadlock which that PR was
fixing
should (hopefully) not happen anymore.

May fix 2356


**Refactor:**
- Modified the code to prevent multiple calls to `WatchFunc` and rerunning of hooks.
- Replaced individual locks (`configLock` and `watchFuncLock`) with a single lock (`lock`).
- Updated methods that access and modify the config and watch function to use the new lock.
- Ensured correct retrieval of expected configuration values.
- Added verification to ensure receiver "ext1" is not already present in the `cfg.Receivers` map before adding it.

> 🎉 With a lock that's singular, we've made our code more regular. 🔄 No more reruns, no more fuss, just efficient code for us! 🚀


Fix OTel ConfiProvider (2378)

**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! 🚀

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.9.0-rc.1

2.8.2

Changelog

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

Avoid notifying otel collector of changes multiple times (2380)

Description of change

I'm not sure if we can call WatchFunc multiple times, so let's avoid
doing it.
The changes will be visible at the next retrieve anyway. Perhaps this
will help
otelcollector avoid starting and stopping at the same time.

Also: Revert 2378 as with this change the deadlock which that PR was
fixing
should (hopefully) not happen anymore.

May fix 2356


**Refactor:**
- Modified the code to prevent multiple calls to `WatchFunc` and rerunning of hooks.
- Replaced individual locks (`configLock` and `watchFuncLock`) with a single lock (`lock`).
- Updated methods that access and modify the config and watch function to use the new lock.
- Ensured correct retrieval of expected configuration values.
- Added verification to ensure receiver "ext1" is not already present in the `cfg.Receivers` map before adding it.

> 🎉 With a lock that's singular, we've made our code more regular. 🔄 No more reruns, no more fuss, just efficient code for us! 🚀


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

2.8.2rc.1

Changelog

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

Avoid notifying otel collector of changes multiple times (2380)

Description of change

I'm not sure if we can call WatchFunc multiple times, so let's avoid
doing it.
The changes will be visible at the next retrieve anyway. Perhaps this
will help
otelcollector avoid starting and stopping at the same time.

Also: Revert 2378 as with this change the deadlock which that PR was
fixing
should (hopefully) not happen anymore.

May fix 2356


**Refactor:**
- Modified the code to prevent multiple calls to `WatchFunc` and rerunning of hooks.
- Replaced individual locks (`configLock` and `watchFuncLock`) with a single lock (`lock`).
- Updated methods that access and modify the config and watch function to use the new lock.
- Ensured correct retrieval of expected configuration values.
- Added verification to ensure receiver "ext1" is not already present in the `cfg.Receivers` map before adding it.

> 🎉 With a lock that's singular, we've made our code more regular. 🔄 No more reruns, no more fuss, just efficient code for us! 🚀


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

2.8.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

2.8.1rc.2

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.2

Page 22 of 53

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.