cloudfoundry / app-autoscaler-release

Automated scaling for apps running on Cloud Foundry
Apache License 2.0
26 stars 51 forks source link

feat(healthendpoint): Refactor health endpoint in all services to run on same port as main service #3028

Open bonzofenix opened 3 months ago

bonzofenix commented 3 months ago

Overview

MTLS verification is performed server-side for communication in between App Autoscaler components. To prepare components to run as Cloud Foundry (CF) apps on SAP BTP, we need to merge the health and service ports for each service, as there is no [TCP routing]() enabled. The /health endpoints in each CF Autoscaler component are monitored by our Cloud Engineering Team and must remain available without MTLS requirements. When migrating apps from BOSH VMs to CF, apps can only listen on a single port in the container. Therefore, the health endpoint and / health metrics must be available on the same service of the server.

Whats new

• Basic Authentication Implementation: Introduced basic authentication for multiple components, including scaling engine, event generator, and operator. • OpenAPI Specification Enhancements: Added new API endpoints for scaling history and improved existing API structures. • Prometheus Integration: Enhanced health monitoring with Prometheus metrics collection for various services. • Refactoring and Code Cleanup: Streamlined code by removing unused dependencies and consolidating authentication logic. • Testing Improvements: Expanded test coverage for new authentication mechanisms and API endpoints. • Configuration Management: Updated configuration files to reflect new authentication parameters and removed deprecated settings.

Why should we merge this PR in one go

Why we would not want to merge this PR

Out of scope

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
1.4% Duplication on New Code

See analysis details on SonarCloud

sonarcloud[bot] commented 2 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
4.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

sonarcloud[bot] commented 1 month ago

Quality Gate Failed Quality Gate failed

Failed conditions
4.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud