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 36 of 53

0.25.2rc.3

Changelog

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

Remove synchronous service lookup being done in `updateMappingFromEndpoints` (1507)

Description of change

Checklist

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

<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg"
height="34" align="absmiddle"
alt="Reviewable"/>](https://reviewable.io/reviews/fluxninja/aperture/1507)
<!-- Reviewable:end -->

Replace cenkalti/backoff with cenkalti/backoff/v4 (1498)

Description of change
- Replace cenkalti/backoff with cenkalti/backoff/v4
- Fix operator test

Checklist

- [ ] 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

<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg"
height="34" align="absmiddle"
alt="Reviewable"/>](https://reviewable.io/reviews/fluxninja/aperture/1498)
<!-- Reviewable:end -->

Fixed the issue of aperturectl not re-pulling for main (1501)


Add simple epoch-based expiry to cache.Cache (1504)

Right now, the period is hardcoded to 30s (so effective expiry is 30s–1m).

Add missing `process_uuid` label to custom metrics (1502)

Without this label, there could be duplicate metrics when container restarts.

docs: update concepts (1496)



[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v0.25.1...releases/aperture-controller/v0.25.2-rc.3

0.25.1

Changelog

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

Robust scale actuation (1472)

Description of change
* Wait for previous scale operation to cancel before starting a new one
* Retry scale operation with backoff

Robust scale fetching (1471)

Description of change
* Use Streams from
[`sourcegraph/conc`](https://github.com/sourcegraph/conc) to ensure
ordering of scale fetch operation
* Perform scale fetch under backoff retry
* Fix bug where incorrect context was being used in fetch call

fix signals dashboard generator (1469)


docs: update aperture docs (1466)


Autoscale scenario tuning (1465)

Description of change
* Tune autoscale scenario.
* Fix incorrect defaults for max scale in vs scale out percentage. Also,
renamed these parameters for better readability.

Update YAML Example in Policy API (1423)


Fix config with missing agent_functions.endpoints not applying (1463)

Should fix the following error (introduced by 1418), which occurs when
`agent_functions` is not set in `agents`.

Agent.fluxninja.com "agent" is invalid:
spec.config.agent_functions.endpoints: Invalid value: "null":
spec.config.agent_functions.endpoints in body must be of type array:
"null". Retrying attempt 5 at 1:57PM.


[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v0.25.0...releases/aperture-controller/v0.25.1

0.25.1rc.1

Changelog

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

Robust scale actuation (1472)

Description of change
* Wait for previous scale operation to cancel before starting a new one
* Retry scale operation with backoff

Robust scale fetching (1471)

Description of change
* Use Streams from
[`sourcegraph/conc`](https://github.com/sourcegraph/conc) to ensure
ordering of scale fetch operation
* Perform scale fetch under backoff retry
* Fix bug where incorrect context was being used in fetch call

fix signals dashboard generator (1469)


docs: update aperture docs (1466)


Autoscale scenario tuning (1465)

Description of change
* Tune autoscale scenario.
* Fix incorrect defaults for max scale in vs scale out percentage. Also,
renamed these parameters for better readability.

Update YAML Example in Policy API (1423)

Fix config with missing agent_functions.endpoints not applying (1463)

Should fix the following error (introduced by 1418), which occurs when
`agent_functions` is not set in `agents`.

Agent.fluxninja.com "agent" is invalid:
spec.config.agent_functions.endpoints: Invalid value: "null":
spec.config.agent_functions.endpoints in body must be of type array:
"null". Retrying attempt 5 at 1:57PM.


[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v0.25.0...releases/aperture-controller/v0.25.1-rc.1

0.25.0

Changelog

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

Add aperturectl flow-control subcommand and reverse-rpc framework (1418)

Added a Server-to-client rpc framework (reverse RPC), which allows
controller
to call functions on agents. See
[pkg/rpc/doc.go](https://github.com/fluxninja/aperture/blob/live-preview/pkg/rpc/doc.go)
for details.

Added subcommands:
* `aperturectl agents`
* `aperturectl flow-control control-points`
* `aperturectl flow-control preview [--http] SERVICE CONTROL_POINT`

These subcommands are implemented by `aperturectl` making a request to
controller,
which then makes requests to all agents and aggregates results.

This means that agent connects to controller directly, in addition to
etcd and grpc connections.

`aperturectl` can connect to controller either directly or by
automatically port-forwarding into kubernetes cluster (`--kube`).

Autoscaler (1437)

Description of change
proto
// Autoscaler
message Autoscaler {
// Increasing Gradient defines a controller for scaling out based on Gradient Controller.
message IncreasingGradient {
// This allows subset of parameters with constrained values compared to a regular gradient controller. For full documentation of these parameters, refer to the [GradientControllerParameters](gradient-controller-parameters).
message Parameters {
double slope = 1; // gotags: default:"1.0"

double max_gradient = 3; // gotags: default:"1.79769313486231570814527423731704356798070e+308" validate:"gte=1.0"
}

// Inputs for Gradient.
message Ins {
// The signal to use for scale out.
InPort signal = 1;
// The setpoint to use for scale out.
InPort setpoint = 2;
}

// Input ports for the Gradient.
Ins in_ports = 1;

// Gradient parameters for the controller. Defaults and constraints:
// * slope = 1
// * min_gradient = 1 (cannot be changed)
// * max_gradient = +Inf (must be greater than 1)
Parameters parameters = 2;
}

// Decreasing Gradient defines a controller for scaling in based on Gradient Controller.
message DecreasingGradient {
// This allows subset of parameters with constrained values compared to a regular gradient controller. For full documentation of these parameters, refer to the [GradientControllerParameters](gradient-controller-parameters).
message Parameters {
double slope = 1; // gotags: default:"1.0"

double min_gradient = 2; // gotags: default:"-1.79769313486231570814527423731704356798070e+308" validate:"lte=1.0"
}

// Inputs for Gradient.
message Ins {
// The signal to use for scale in.
InPort signal = 1;
// The setpoint to use for scale in.
InPort setpoint = 2;
}

// Input ports for the Gradient.
Ins in_ports = 1;

// Gradient parameters for the controller. Defaults and constraints:
// * slope = 1
// * min_gradient = -Inf (must be less than 1)
// * max_gradient = 1 (cannot be changed)
Parameters parameters = 2;
}

message ScaleOutController {
message Controller {
oneof controller {
IncreasingGradient gradient = 1;
}
}

// Controller
Controller controller = 1; // gotags: validate:"required"

// Configuration for embedded alerter.
Alerter.Parameters alerter_parameters = 2;
}

message ScaleInController {
message Controller {
oneof controller {
DecreasingGradient gradient = 1;
}
}

// Controller
Controller controller = 1;

// Configuration for embedded alerter.
Alerter.Parameters alerter_parameters = 2;
}

message Scaler {
oneof scaler {
KubernetesReplicas kubernetes_replicas = 1;
}
}

// KubernetesReplicas defines a horizontal pod scaler for Kubernetes.
message KubernetesReplicas {
// The Kubernetes object on which horizontal scaling is applied.
KubernetesObjectSelector kubernetes_object_selector = 1; // gotags: validate:"required"

// Configuration key for DynamicConfig
string dynamic_config_key = 2;

// Default configuration.
PodScaler.ScaleActuator.DynamicConfig default_config = 3;
}

// Outputs for Autoscaler.
message Outs {
OutPort actual_scale = 1;
OutPort configured_scale = 2;
OutPort desired_scale = 3;
}

// Output ports for the Autoscaler.
Outs out_ports = 1;

Scaler scaler = 2; // gotags: validate:"required"

// The minimum scale to which the autoscaler can scale in. E.g. in case of KubernetesReplicas Scaler, this is the minimum number of replicas.
uint64 min_scale = 3; // gotags: default:"0"];
// The maximum scale to which the autoscaler can scale out. E.g. in case of KubernetesReplicas Scaler, this is the maximum number of replicas.
uint64 max_scale = 4; // gotags: default:"4294967295"]

// List of Controllers for scaling out.
repeated ScaleOutController scale_out_controllers = 5;
// List of Controllers for scaling in.
repeated ScaleInController scale_in_controllers = 6;

// The maximum increase of scale (e.g. pods) at one time. Defined as percentage of current scale value. Can never go below one even if percentage computation is less than one. Defaults to 10% of current scale value.
double scale_in_max_percentage = 7; // gotags: default:"10"
// The maximum decrease of scale (e.g. pods) at one time. Defined as percentage of current scale value. Can never go below one even if percentage computation is less than one. Defaults to 1% of current scale value.
double scale_out_max_percentage = 8; // gotags: default:"1"

// The amount of time to wait after a scale out operation for another scale out or scale in operation.
google.protobuf.Duration scale_out_cooldown = 9; // gotags: default:"30s"
// The amount of time to wait after a scale in operation for another scale in operation.
google.protobuf.Duration scale_in_cooldown = 10; // gotags: default:"120s"

// Cooldown override percentage defines a threshold change in scale out beyond which previous cooldown is overridden.
// For example, if the cooldown is 5 minutes and the cooldown override percentage is 10%, then if the
// scale increases by 10% or more, the previous cooldown is cancelled. Defaults to 50%.
double cooldown_override_percentage = 11; // gotags: default:"50"

// Configuration for scale out alerter.
Alerter.Parameters scale_out_alerter_parameters = 12;

// Configuration for scale in alerter.
Alerter.Parameters scale_in_alerter_parameters = 13;
}


Read IP addresses from `source` and `destination` attributes in authz (1383)

Description of change
**Read IP addresses from source and destination attributes in authz**
This change attaches the above attributes as telemetry labels to be sent
to Druid. Later this data can be used to construct service flow sankey
diagrams for a control point.

**Add clusterIP to entity**
In this change,
1. we get the service that the endpoint belongs to
2. extract clusterIP if it is not "" or "None" (for headless services)
3. create entry in entitycache with this IP

aperturectl: Take KUBECONFIG env var into account (1426)

This should make aperturectl use the same config as kubectl

> For configuration, kubectl looks for a file named config in the
> $HOME/.kube directory. You can specify other kubeconfig files by
setting
> the KUBECONFIG environment variable or by setting the --kubeconfig
flag.

translate our go validate required rules to swagger required (1424)

Description of change

Translate our validation (Go validator) constraint (required) to
swagger's required spec. We can translate other constraints over time.

<img width="1275" alt="Screenshot 2023-02-21 at 10 22 32 PM"
src="https://user-images.githubusercontent.com/18579817/220539897-fc883bd6-6fe6-4f2c-91f4-f9fe65555dba.png">
<img width="1252" alt="Screenshot 2023-02-21 at 10 22 39 PM"
src="https://user-images.githubusercontent.com/18579817/220539921-f2b1643e-fa2e-4006-a25b-23712de72e3d.png">

Fixed issue of aperturectl failing on first execution (1415)

Description of change

`aperturectl` was throwing error for `blueprints generate` when the
cache directory is not present due to relPath is getting generated after
executing pull command and we were generating the `blueprintsDir` path
before that.

platform: replace gocron with goquartz (1408)

Description of change

Gocron has several issues such as race conditions (which our team
fixed), rescheduling issues when jobs are delayed and so on. So rather
than keep fixing their codebase, we are switching to
[go-quartz](https://pkg.go.dev/github.com/reugn/go-quartzv0.6.0/quartz)
package.

<img width="1271" alt="Screenshot 2023-02-20 at 11 07 27 PM"
src="https://user-images.githubusercontent.com/18579817/220272526-ba549e55-7adf-433f-bdb2-25cd41d59484.png">

<img width="1268" alt="Screenshot 2023-02-20 at 11 07 37 PM"
src="https://user-images.githubusercontent.com/18579817/220272531-55f719be-a76a-4b30-aa45-d8d1d448d25d.png">

[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v0.24.0...releases/aperture-controller/v0.25.0

0.25.0rc.2

Changelog

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

Add aperturectl flow-control subcommand and reverse-rpc framework (1418)

Added a Server-to-client rpc framework (reverse RPC), which allows
controller
to call functions on agents. See
[pkg/rpc/doc.go](https://github.com/fluxninja/aperture/blob/live-preview/pkg/rpc/doc.go)
for details.

Added subcommands:
* `aperturectl agents`
* `aperturectl flow-control control-points`
* `aperturectl flow-control preview [--http] SERVICE CONTROL_POINT`

These subcommands are implemented by `aperturectl` making a request to
controller,
which then makes requests to all agents and aggregates results.

This means that agent connects to controller directly, in addition to
etcd and grpc connections.

`aperturectl` can connect to controller either directly or by
automatically port-forwarding into kubernetes cluster (`--kube`).

Autoscaler (1437)

Description of change
proto
// Autoscaler
message Autoscaler {
// Increasing Gradient defines a controller for scaling out based on Gradient Controller.
message IncreasingGradient {
// This allows subset of parameters with constrained values compared to a regular gradient controller. For full documentation of these parameters, refer to the [GradientControllerParameters](gradient-controller-parameters).
message Parameters {
double slope = 1; // gotags: default:"1.0"

double max_gradient = 3; // gotags: default:"1.79769313486231570814527423731704356798070e+308" validate:"gte=1.0"
}

// Inputs for Gradient.
message Ins {
// The signal to use for scale out.
InPort signal = 1;
// The setpoint to use for scale out.
InPort setpoint = 2;
}

// Input ports for the Gradient.
Ins in_ports = 1;

// Gradient parameters for the controller. Defaults and constraints:
// * slope = 1
// * min_gradient = 1 (cannot be changed)
// * max_gradient = +Inf (must be greater than 1)
Parameters parameters = 2;
}

// Decreasing Gradient defines a controller for scaling in based on Gradient Controller.
message DecreasingGradient {
// This allows subset of parameters with constrained values compared to a regular gradient controller. For full documentation of these parameters, refer to the [GradientControllerParameters](gradient-controller-parameters).
message Parameters {
double slope = 1; // gotags: default:"1.0"

double min_gradient = 2; // gotags: default:"-1.79769313486231570814527423731704356798070e+308" validate:"lte=1.0"
}

// Inputs for Gradient.
message Ins {
// The signal to use for scale in.
InPort signal = 1;
// The setpoint to use for scale in.
InPort setpoint = 2;
}

// Input ports for the Gradient.
Ins in_ports = 1;

// Gradient parameters for the controller. Defaults and constraints:
// * slope = 1
// * min_gradient = -Inf (must be less than 1)
// * max_gradient = 1 (cannot be changed)
Parameters parameters = 2;
}

message ScaleOutController {
message Controller {
oneof controller {
IncreasingGradient gradient = 1;
}
}

// Controller
Controller controller = 1; // gotags: validate:"required"

// Configuration for embedded alerter.
Alerter.Parameters alerter_parameters = 2;
}

message ScaleInController {
message Controller {
oneof controller {
DecreasingGradient gradient = 1;
}
}

// Controller
Controller controller = 1;

// Configuration for embedded alerter.
Alerter.Parameters alerter_parameters = 2;
}

message Scaler {
oneof scaler {
KubernetesReplicas kubernetes_replicas = 1;
}
}

// KubernetesReplicas defines a horizontal pod scaler for Kubernetes.
message KubernetesReplicas {
// The Kubernetes object on which horizontal scaling is applied.
KubernetesObjectSelector kubernetes_object_selector = 1; // gotags: validate:"required"

// Configuration key for DynamicConfig
string dynamic_config_key = 2;

// Default configuration.
PodScaler.ScaleActuator.DynamicConfig default_config = 3;
}

// Outputs for Autoscaler.
message Outs {
OutPort actual_scale = 1;
OutPort configured_scale = 2;
OutPort desired_scale = 3;
}

// Output ports for the Autoscaler.
Outs out_ports = 1;

Scaler scaler = 2; // gotags: validate:"required"

// The minimum scale to which the autoscaler can scale in. E.g. in case of KubernetesReplicas Scaler, this is the minimum number of replicas.
uint64 min_scale = 3; // gotags: default:"0"];
// The maximum scale to which the autoscaler can scale out. E.g. in case of KubernetesReplicas Scaler, this is the maximum number of replicas.
uint64 max_scale = 4; // gotags: default:"4294967295"]

// List of Controllers for scaling out.
repeated ScaleOutController scale_out_controllers = 5;
// List of Controllers for scaling in.
repeated ScaleInController scale_in_controllers = 6;

// The maximum increase of scale (e.g. pods) at one time. Defined as percentage of current scale value. Can never go below one even if percentage computation is less than one. Defaults to 10% of current scale value.
double scale_in_max_percentage = 7; // gotags: default:"10"
// The maximum decrease of scale (e.g. pods) at one time. Defined as percentage of current scale value. Can never go below one even if percentage computation is less than one. Defaults to 1% of current scale value.
double scale_out_max_percentage = 8; // gotags: default:"1"

// The amount of time to wait after a scale out operation for another scale out or scale in operation.
google.protobuf.Duration scale_out_cooldown = 9; // gotags: default:"30s"
// The amount of time to wait after a scale in operation for another scale in operation.
google.protobuf.Duration scale_in_cooldown = 10; // gotags: default:"120s"

// Cooldown override percentage defines a threshold change in scale out beyond which previous cooldown is overridden.
// For example, if the cooldown is 5 minutes and the cooldown override percentage is 10%, then if the
// scale increases by 10% or more, the previous cooldown is cancelled. Defaults to 50%.
double cooldown_override_percentage = 11; // gotags: default:"50"

// Configuration for scale out alerter.
Alerter.Parameters scale_out_alerter_parameters = 12;

// Configuration for scale in alerter.
Alerter.Parameters scale_in_alerter_parameters = 13;
}


Read IP addresses from `source` and `destination` attributes in authz (1383)

Description of change
**Read IP addresses from source and destination attributes in authz**
This change attaches the above attributes as telemetry labels to be sent
to Druid. Later this data can be used to construct service flow sankey
diagrams for a control point.

**Add clusterIP to entity**
In this change,
1. we get the service that the endpoint belongs to
2. extract clusterIP if it is not "" or "None" (for headless services)
3. create entry in entitycache with this IP

aperturectl: Take KUBECONFIG env var into account (1426)

This should make aperturectl use the same config as kubectl

> For configuration, kubectl looks for a file named config in the
> $HOME/.kube directory. You can specify other kubeconfig files by
setting
> the KUBECONFIG environment variable or by setting the --kubeconfig
flag.

translate our go validate required rules to swagger required (1424)

Description of change

Translate our validation (Go validator) constraint (required) to
swagger's required spec. We can translate other constraints over time.

<img width="1275" alt="Screenshot 2023-02-21 at 10 22 32 PM"
src="https://user-images.githubusercontent.com/18579817/220539897-fc883bd6-6fe6-4f2c-91f4-f9fe65555dba.png">
<img width="1252" alt="Screenshot 2023-02-21 at 10 22 39 PM"
src="https://user-images.githubusercontent.com/18579817/220539921-f2b1643e-fa2e-4006-a25b-23712de72e3d.png">

Fixed issue of aperturectl failing on first execution (1415)

Description of change

`aperturectl` was throwing error for `blueprints generate` when the
cache directory is not present due to relPath is getting generated after
executing pull command and we were generating the `blueprintsDir` path
before that.

platform: replace gocron with goquartz (1408)

Description of change

Gocron has several issues such as race conditions (which our team
fixed), rescheduling issues when jobs are delayed and so on. So rather
than keep fixing their codebase, we are switching to
[go-quartz](https://pkg.go.dev/github.com/reugn/go-quartzv0.6.0/quartz)
package.

<img width="1271" alt="Screenshot 2023-02-20 at 11 07 27 PM"
src="https://user-images.githubusercontent.com/18579817/220272526-ba549e55-7adf-433f-bdb2-25cd41d59484.png">

<img width="1268" alt="Screenshot 2023-02-20 at 11 07 37 PM"
src="https://user-images.githubusercontent.com/18579817/220272531-55f719be-a76a-4b30-aa45-d8d1d448d25d.png">

[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v0.24.0...releases/aperture-controller/v0.25.0-rc.2

0.25.0rc.1

Changelog

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

Read IP addresses from `source` and `destination` attributes in authz (1383)

Description of change
**Read IP addresses from source and destination attributes in authz**
This change attaches the above attributes as telemetry labels to be sent
to Druid. Later this data can be used to construct service flow sankey
diagrams for a control point.

**Add clusterIP to entity**
In this change,
1. we get the service that the endpoint belongs to
2. extract clusterIP if it is not "" or "None" (for headless services)
3. create entry in entitycache with this IP

Fixed issue with sentry processing logs (1438)

Description of change

We observed that Sentry was not getting logs and not showing any crashes
on dashboard.

docs: replace pattern with human readable patterns (1433)


latency aimd blueprint: make alert name optinal parameter (1429)


aperturectl: Take KUBECONFIG env var into account (1426)

This should make aperturectl use the same config as kubectl

> For configuration, kubectl looks for a file named config in the
> $HOME/.kube directory. You can specify other kubeconfig files by
setting
> the KUBECONFIG environment variable or by setting the --kubeconfig
flag.

translate our go validate required rules to swagger required (1424)

Description of change

Translate our validation (Go validator) constraint (required) to
swagger's required spec. We can translate other constraints over time.

<img width="1275" alt="Screenshot 2023-02-21 at 10 22 32 PM"
src="https://user-images.githubusercontent.com/18579817/220539897-fc883bd6-6fe6-4f2c-91f4-f9fe65555dba.png">
<img width="1252" alt="Screenshot 2023-02-21 at 10 22 39 PM"
src="https://user-images.githubusercontent.com/18579817/220539921-f2b1643e-fa2e-4006-a25b-23712de72e3d.png">

Use Tristate bool readings in all components that deal with and/or logic (1356)

Fixed issue of aperturectl failing on first execution (1415)

Description of change

`aperturectl` was throwing error for `blueprints generate` when the
cache directory is not present due to relPath is getting generated after
executing pull command and we were generating the `blueprintsDir` path
before that.

platform: replace gocron with goquartz (1408)

Description of change

Gocron has several issues such as race conditions (which our team
fixed), rescheduling issues when jobs are delayed and so on. So rather
than keep fixing their codebase, we are switching to
[go-quartz](https://pkg.go.dev/github.com/reugn/go-quartzv0.6.0/quartz)
package.

<img width="1271" alt="Screenshot 2023-02-20 at 11 07 27 PM"
src="https://user-images.githubusercontent.com/18579817/220272526-ba549e55-7adf-433f-bdb2-25cd41d59484.png">

<img width="1268" alt="Screenshot 2023-02-20 at 11 07 37 PM"
src="https://user-images.githubusercontent.com/18579817/220272531-55f719be-a76a-4b30-aa45-d8d1d448d25d.png">

[changes]: https://github.com/fluxninja/aperture/compare/releases/aperture-controller/v0.24.0...releases/aperture-controller/v0.25.0-rc.1

Page 36 of 53

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.