Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
267 commits
Select commit Hold shift + click to select a range
b41896d
fix tests
bonzofenix Mar 17, 2025
4489e00
Fix tests
bonzofenix Mar 18, 2025
93e4458
Fix lints
bonzofenix Mar 18, 2025
780db5e
Add configutil and new vendor dependencies to eventgenerator spec
bonzofenix Mar 18, 2025
6d0c535
Update environment variable names to uppercase in mta.tpl.yaml for au…
bonzofenix Mar 18, 2025
1b9ab3a
Refactor eventgenerator configuration and tests for CF environment
bonzofenix Mar 19, 2025
cee9c7b
Add eventgenerator health password and logcache-client TLS config
bonzofenix Mar 19, 2025
134e78e
Refactor event generator configuration to use node count instead of n…
bonzofenix Mar 19, 2025
452c90a
Remove metricsforwarder and eventgenerator from instance groups in us…
bonzofenix Mar 19, 2025
5320894
Fix mtar configuration
bonzofenix Mar 19, 2025
df6d870
Add comments to NodeCount and NodeIndex in eventgenerator config
bonzofenix Mar 19, 2025
fc8cf13
Enable parallel deployments in autoscaler MTA configuration
bonzofenix Mar 19, 2025
56ea9f2
Add pool configuration and refactor eventgenerator instance management
bonzofenix Mar 20, 2025
aa373e2
Fix integration
bonzofenix Mar 20, 2025
7767159
Fix linting
bonzofenix Mar 20, 2025
b954213
Refactor eventgenerator tests to use testhelpers for client creation …
bonzofenix Mar 20, 2025
b4339ed
Remove eventgenerator configuration from cf-services
bonzofenix Mar 20, 2025
8560843
Fix metric poller test
bonzofenix Mar 20, 2025
feef271
Fix test
bonzofenix Mar 20, 2025
e532667
Add metric_collector_url configuration to eventgenerator-config in au…
bonzofenix Mar 20, 2025
7744104
Change metric collector URL to use non-HTTPS scheme in default_config…
bonzofenix Mar 20, 2025
2c325fe
Updated metricCollector configuration to include metric_collector_url…
bonzofenix Mar 20, 2025
36980b3
Fix tests
bonzofenix Mar 20, 2025
9b56b74
Potential fix for code scanning alert no. 432: Potentially unsafe quo…
bonzofenix Mar 21, 2025
40f5104
WIP
bonzofenix Mar 21, 2025
d4f6fb3
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix Apr 7, 2025
3a3f7df
Fix eventgenerator deployments
bonzofenix Apr 7, 2025
20d0231
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix Apr 7, 2025
c07cff4
Reduce instance count for publicapiserver module from 2 to 1 in autos…
bonzofenix Apr 7, 2025
2bbff45
Remove syslog-client and logcache-client dependencies from autoscaler…
bonzofenix Apr 7, 2025
5f6e223
Fix build
bonzofenix Apr 7, 2025
e5c9833
Refactor test helper functions for VCAP services in autoscaler
bonzofenix Apr 8, 2025
2a5af08
Refactor EventGenerator config to use map for DB configs in component…
bonzofenix Apr 8, 2025
a8a530d
Fix merge typos
bonzofenix Apr 8, 2025
2be29c2
Add syslog-client dependency to metricsforwarder module and define ne…
bonzofenix Apr 8, 2025
9d0f964
Refactor db structure for eventgenerator config
bonzofenix Apr 8, 2025
204e8e9
Remove empty line from ExpectConfigureDatabasesCalledOnce in testhelp…
bonzofenix Apr 8, 2025
2684032
Update CircuitBreakerConfig YAML tag and add GinkgoHelper to event g…
bonzofenix Apr 8, 2025
758d142
Standardize 'dbUri' parameter to 'dbURI' in autoscaler integration te…
bonzofenix Apr 8, 2025
da8f4ff
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix Apr 8, 2025
9a4ada3
Refactor postgresDB service URI handling in configutil tests
bonzofenix Apr 8, 2025
a06201c
Disable CF server tests and add TODO for log-cache UAA client connect…
bonzofenix Apr 8, 2025
52fb97a
Reduce instances for eventgenerator and metricsforwarder to 1
bonzofenix Apr 8, 2025
fab4fa4
Update event generator host configuration and routes in autoscaler bu…
bonzofenix Apr 9, 2025
f66cef9
Update autoscaling API endpoint in cf-login script to use DEPLOYMENT_…
bonzofenix Apr 9, 2025
9bb2d02
Rename VCAPServer to CFServer in Autoscaler API configuration and ref…
bonzofenix Apr 9, 2025
ce0822d
Refactor health check endpoint constants in broker server and routes
bonzofenix Apr 9, 2025
ea574e7
Refactor event generator routing and disable a test for Postgres con…
bonzofenix Apr 9, 2025
1dcd6b4
Add support for MySQL in autoscaler Makefile and make DB type configu…
bonzofenix Apr 9, 2025
2dfb1e5
Update HttpClientTimeout default value and YAML tag in autoscaler config
bonzofenix Apr 9, 2025
726fd15
Fix test
bonzofenix Apr 9, 2025
b64777c
Remove tests for wrong method on aggregated metrics history endpoint
bonzofenix Apr 10, 2025
7b5a4c9
Remove empty line from CreateMtlsServer function in eventgenerator se…
bonzofenix Apr 10, 2025
4cc5f3f
Improve output for cf loging
bonzofenix Apr 10, 2025
589198c
Refactor deployment naming and add ENABLE_MTAR flag handling in vars…
bonzofenix Apr 10, 2025
b4be696
Refactor Makefile for acceptance tests to use hardcoded config path
bonzofenix Apr 10, 2025
1a0a9df
Remove unnecessary ACCEPTANCE_CONFIG_PATH dependency from acceptance-…
bonzofenix Apr 10, 2025
662f4e1
Update default DEPLOYMENT_NAME in vars.source.sh to use 'autoscaler-m…
bonzofenix Apr 10, 2025
4172ba0
Refactor health endpoint and update server routing in eventgenerator
bonzofenix Apr 11, 2025
18c2494
Adds uaac login command
bonzofenix Apr 14, 2025
ac6d316
Update eventgenerator config to separate CFServer port from Server port
bonzofenix Apr 14, 2025
b7c8047
Update eventgenerator and metricsforwarder UAA client config
bonzofenix Apr 15, 2025
87b92b4
Add environment-based TLS configuration for Scaling Engine in eventge…
bonzofenix Apr 15, 2025
f9de64e
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix Apr 15, 2025
bd25ba7
Refactor GetOrgGuid function to streamline JSON unmarshalling and err…
bonzofenix Apr 15, 2025
6199e53
Replace custom contains function with slices.Contains from the standa…
bonzofenix Apr 15, 2025
a467783
Remove Klauspost compression dependencies from eventgenerator and met…
bonzofenix Apr 15, 2025
c655474
Refactor TLS certificate configuration for autoscaler components
bonzofenix Apr 15, 2025
ef055e2
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix Apr 15, 2025
6b27ad9
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix Apr 15, 2025
5c79d7b
Remove VCAP_SERVICES logcache credentials loading test from eventgene…
bonzofenix Apr 15, 2025
d120586
Add cpuinfo internal package to metricsforwarder autoscaler dependencies
bonzofenix Apr 15, 2025
bfaae81
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix Apr 15, 2025
504c1f4
WIP: Refactor config test
bonzofenix Apr 16, 2025
d4f58ae
Improve logging message for ignored scaling when instance count is co…
bonzofenix Apr 16, 2025
39b5ec0
Add default instance configuration for EVENTGENERATOR and align inst…
bonzofenix Apr 16, 2025
2076c86
Refactor test"
bonzofenix Apr 16, 2025
d5748fb
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix Apr 17, 2025
7042534
Add GinkgoHelper call to RunningInstances function in acceptance tests
bonzofenix Apr 17, 2025
193f648
Set default server port to 0 and enable plain text logging in VCAP c…
bonzofenix Apr 17, 2025
23e15e8
Refactor configureStoredProcedureDb to private method and update tests
bonzofenix Apr 17, 2025
b2331a9
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix Apr 17, 2025
4e9385c
Remove redundant ServerConfig type from eventgenerator config
bonzofenix Apr 17, 2025
872c9af
Remove ConfigureStoredProcedureDb method from VCAPConfigurationReader…
bonzofenix Apr 17, 2025
50136e0
Fix flaky test
bonzofenix Apr 17, 2025
62e720b
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix Apr 21, 2025
76a37ce
Removes unecessary logout
bonzofenix Apr 23, 2025
c96357a
Rename node_count and node_index to total_instances and instance_index
bonzofenix Apr 23, 2025
5885508
Refactor: simplify NewAppManager signature
bonzofenix Apr 23, 2025
f238e1b
Remove unused fixture
bonzofenix Apr 23, 2025
ae13511
Remove instances from mta tpl
bonzofenix Apr 23, 2025
f713090
Remove unused method
bonzofenix Apr 23, 2025
dd6993f
Set BOSH server port to 0 to avoid conflicts and enable plain text lo…
bonzofenix Apr 23, 2025
a208618
Makes ConfigureDb a a private method
bonzofenix Apr 23, 2025
6ae7abd
Fix issue in eventgenerator main cmd
bonzofenix Apr 23, 2025
69d012e
Remove deployment name from github actions to resolve through ENABLE_…
bonzofenix Apr 23, 2025
95e3862
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix Apr 23, 2025
bf4709e
Updated bash shebang in common.sh and modified package versions in de…
bonzofenix Apr 23, 2025
9061f13
Update devbox.lock
bonzofenix Apr 23, 2025
87a7a29
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix Apr 23, 2025
e62e51a
Fix deployment issue with github actions
bonzofenix Apr 23, 2025
085222b
Update acceptance test workflows to conditionally deploy apps and req…
bonzofenix Apr 23, 2025
9724a1e
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix Apr 23, 2025
d32fabf
Adds debugging to github actions
bonzofenix Apr 24, 2025
1cb74a6
Update GitHub Actions to dynamically set deployment names based on P…
bonzofenix Apr 24, 2025
4963f55
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix Apr 24, 2025
8dd9cd1
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix Apr 24, 2025
a16f4f7
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix May 8, 2025
5f3d044
Rename appManager files and refactor test policy string in tests
bonzofenix May 8, 2025
c6befa3
Refactor app_manager_test.go by moving "Save and query metrics" tests
bonzofenix May 8, 2025
037308f
Refactor variable names and improve health check authentication in a…
bonzofenix May 8, 2025
c47b44b
Refactor app_manager_test.go to use Gomega's HaveExactKeys matcher a…
bonzofenix May 9, 2025
2267a64
Merge remote-tracking branch 'origin/main' into 864-enable-eventgener…
bonzofenix May 9, 2025
bd3a829
Remove autoscaling API setup from os-infrastructure-login script
bonzofenix May 9, 2025
9b1cd00
Add deferred clt push osing of response body in health endpoint test …
bonzofenix May 9, 2025
8e88461
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix May 9, 2025
0dca04e
Remove autoscaling-api setup from cf_login in common.sh
bonzofenix May 9, 2025
b78b779
Remove eventgenerator-config and database dependencies from metricsfo…
bonzofenix May 9, 2025
481f02c
Add nixpkgs-unstable source and update plugin versions for mysql and…
bonzofenix May 9, 2025
3ac17b0
Disable shellcheck SC2154 warning in common.sh for autoscaler scripts
bonzofenix May 9, 2025
9ba0b8f
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix May 9, 2025
30d4451
Optimize TLS certificate retrieval in loadVcapConfig function
bonzofenix May 9, 2025
257c136
Bump module instances
bonzofenix May 9, 2025
1518353
Set default instances parameter to 0 in autoscaler module parameters,…
bonzofenix May 12, 2025
8b140b7
Refactor ToJSON function from config to configutil module
bonzofenix May 12, 2025
7f5634b
Refactor eventgenerator config loading and update VCAP_SERVICES struc…
bonzofenix May 12, 2025
1e83848
Removed eventgenerator cmd test when running in CF
bonzofenix May 12, 2025
b3a817c
Ensure proper handling of script arguments by quoting "$@"
bonzofenix May 12, 2025
d800869
Added sourcing of vars.source.sh and updated bosh_login call with BBL…
bonzofenix May 12, 2025
9a86176
Remove unused vcapPort variable from eventgenerator tests
bonzofenix May 12, 2025
dd55f03
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix May 12, 2025
d6dc6bf
Refactor error handling to use shared ErrReadYaml from helpers in eve…
bonzofenix May 12, 2025
842a9fc
Remove unnecessary newline in LoadConfig function of eventgenerator c…
bonzofenix May 12, 2025
093753e
Merge branch 'main' into 864-enable-eventgenerator-via-mtar
bonzofenix May 12, 2025
fa490f5
Wip
bonzofenix Apr 17, 2025
c4b34e0
Wip
bonzofenix May 15, 2025
eb919f8
Add configutil and new vendor dependencies, refactor operator config
bonzofenix May 15, 2025
c5b39a0
Renamed app_metrics_db to appmetrics_db and scaling_engine_db to scal…
bonzofenix May 15, 2025
f7c83d0
Refactor TLS client certificate assignment in autoscaler operator con…
bonzofenix May 16, 2025
fe9d107
Remove exampleconfig/example.yml from autoscaler operator directory
bonzofenix May 16, 2025
ec64188
Fix lint
bonzofenix May 16, 2025
69e111b
Fix rspec
bonzofenix May 16, 2025
6162cab
Remove unused code
bonzofenix May 16, 2025
ffbbec8
Remove username and password from Postgres URLs in config files
bonzofenix May 16, 2025
dd1fdc9
Remove code duplication
bonzofenix May 16, 2025
f258ad2
Refactor tests
bonzofenix May 16, 2025
a4bd568
Remove health server basic auth tests from operator_test.go
bonzofenix May 16, 2025
87315dd
Refactor operator test configuration variable name and update health…
bonzofenix May 16, 2025
8651998
Refactor policy DB initialization and improve error handling in opera…
bonzofenix May 16, 2025
7076009
Refactor test descriptions from Context to When in config_test.go
bonzofenix May 16, 2025
986c5ba
Remove testhelpers dependency and update health check functions in sc…
bonzofenix May 16, 2025
7350455
Fix broken test
bonzofenix May 19, 2025
6ab0a78
WIP
bonzofenix May 21, 2025
5ab1d28
WIP
bonzofenix May 21, 2025
eadd863
WIP
bonzofenix May 28, 2025
5bf8783
Merge branch 'main' into 877-enable-operator-via-mtar
bonzofenix May 29, 2025
d87e77c
Remove unused tlsCert variable from loadVcapConfig function in config.go
bonzofenix May 29, 2025
8e9e6ab
Remove unused AppMetricsDb config and refactor HTTP client variable n…
bonzofenix May 29, 2025
30cbf8e
Refactor databaseNames variable scope in configutil_test
bonzofenix May 29, 2025
a6d20bf
Merge branch '877-enable-operator-via-mtar' into 885-enable-scalingen…
bonzofenix May 29, 2025
b970be8
Merge branch 'main' into 885-enable-scalingengine-via-mtar
bonzofenix May 29, 2025
7289e59
Remove yaml.v3 dependency from operator config and fix LoadConfig fun…
bonzofenix May 29, 2025
f9382d6
Remove redundant validateDb function from autoscaler operator config
bonzofenix May 29, 2025
9df88a4
Moved METRICSFORWARDER_* exports and removed duplicate EVENTGENERATOR…
bonzofenix May 30, 2025
e5810ac
Update Makefile to skip tests during scheduler build and adjust mta.…
bonzofenix Jun 4, 2025
8170afe
Remove duplicate Makefile.mta versions from autoscaler module
bonzofenix Jun 4, 2025
5995ca4
Merge branch 'main' into 887-enable-scheduler-via-mtar
bonzofenix Jun 4, 2025
4aba8b1
Enabled autoscaler scheduler configuration and route registration in …
bonzofenix Jun 4, 2025
edb131f
Add default_config.json for scheduler in autoscaler module
bonzofenix Jun 4, 2025
2c6635a
Fix initialize db with right scheduler path
bonzofenix Jun 4, 2025
1b8a840
Update scheduler host configuration and routes in autoscaler extensi…
bonzofenix Jun 4, 2025
a19c07f
Update google-format-ci script to target java files in src/autoscaler…
bonzofenix Jun 4, 2025
89e302b
Add OpenJDK JRE version 17+ configuration to autoscaler mta.tpl.yaml
bonzofenix Jun 4, 2025
a249af1
Updated initialise_db.sh to use env for bash, set stricter bash optio…
bonzofenix Jun 4, 2025
6f2ddaa
Merge branch 'main' into 887-enable-scheduler-via-mtar
bonzofenix Jun 4, 2025
4792305
Update Checkstyle run path in java-ci-lint workflow to autoscaler sch…
bonzofenix Jun 4, 2025
f4af90e
Update path to checkstyle-result.xml in format_checkstyle.go
bonzofenix Jun 4, 2025
6c43faa
Update checkstyle config path in scheduler pom.xml
bonzofenix Jun 4, 2025
9a971b8
Remove unprotected health endpoints from autoscaler scheduler configu…
bonzofenix Jun 5, 2025
5609c3d
WIP
bonzofenix Jun 5, 2025
1d55654
Refactor HttpAuthFilter and tests for health server authentication
bonzofenix Jun 7, 2025
693ae14
Enables scheduler cf config with VCAP_CONFIG
bonzofenix Jun 9, 2025
ee7bd26
Add SSL configuration options to autoscaler scheduler default config
bonzofenix Jun 10, 2025
97f0009
Add deploy-apps target to autoscaler Makefile for app deployment auto…
bonzofenix Jun 11, 2025
b6a044b
Add database service configuration processing to CloudFoundryConfigur…
bonzofenix Jun 11, 2025
3d74af3
Add sourcing of vars.source.sh in build-extension-file.sh.
bonzofenix Jun 12, 2025
c6aa2c5
Refactor Makefile targets and update .gitignore to speedup mta deploys
bonzofenix Jun 17, 2025
af79edb
Add Makefile_* pattern to autoscaler .gitignore
bonzofenix Jun 17, 2025
fc1e11d
Merge branch 'main' into 887-enable-scheduler-via-mtar
bonzofenix Jun 17, 2025
6f17b52
🤖🦾🛠️ go mod tidy & make package-specs
bonzofenix Jun 17, 2025
3b420bc
Fixed typo in Makefile MODULES variable, changing 'metrisforwarder' t…
bonzofenix Jun 18, 2025
072d430
Add scaling engine URL configuration to autoscaler resources in build…
bonzofenix Jun 19, 2025
83c8279
Enhance SSL configuration and logging for autoscaler scheduler
bonzofenix Jun 19, 2025
11762e2
Remove test-scheduler from .PHONY targets and update test rule in Mak…
bonzofenix Jun 19, 2025
ca70961
Add VCAP_APPLICATION processing to CloudFoundryConfigurationProcessor
bonzofenix Jun 19, 2025
2583b1b
Add scheduler DB scripts to dbtasks and include scheduler changelog a…
bonzofenix Jun 19, 2025
1f9d1da
Add scheduler changelog to autoscaler module command in mta.tpl.yaml
bonzofenix Jun 19, 2025
9d0ae92
Renamed db_test.go to db.go in autoscaler/testhelpers directory.
bonzofenix Jun 19, 2025
8011f84
Fix format issues
bonzofenix Jun 19, 2025
ad74752
Add shellcheck source directive to build-extension-file.sh for vars.s…
bonzofenix Jun 19, 2025
60b6b4a
Remove trailing commas from health configuration in scheduler spec tests
bonzofenix Jun 19, 2025
6bb9748
Update path for scheduler executable in integration tests
bonzofenix Jun 19, 2025
5ba29fb
Merge branch 'main' into 885-enable-scalingengine-via-mtar
bonzofenix Jun 19, 2025
e8e5719
Remove SSL enabled flag and handle SSL context initialization with ex…
bonzofenix Jun 22, 2025
4585870
Add SSL configuration processing for CF instance certificates in Clou…
bonzofenix Jun 22, 2025
44020c6
Update OpenJDK JRE version to 21.+ in autoscaler mta.tpl.yaml
bonzofenix Jun 22, 2025
9e876d8
Default TLS to 1.2 to comunicate to scaling engine through the go router
bonzofenix Jun 22, 2025
2a53630
Add health endpoint configuration to scheduler's default_config.json
bonzofenix Jun 23, 2025
1e43973
Change cf-login target to use autoscaler-dir instead of acceptance-di…
bonzofenix Jun 23, 2025
584b7ad
Enhance HttpAuthFilter logging and bypass filter for non-health requ…
bonzofenix Jun 23, 2025
ed6fce4
Merge branch 'main' into 887-enable-scheduler-via-mtar
bonzofenix Jun 23, 2025
96ffff4
Update HttpAuthFilter to skip filter for missing X-Forwarded-Client-…
bonzofenix Jun 23, 2025
fd402e8
Remove redundant X-Forwarded-Client-Cert check in HttpAuthFilter
bonzofenix Jun 23, 2025
79774a4
Removed tables_postgres.sql and updated quartz_tables_postgres.sql to…
bonzofenix Jun 23, 2025
f95da40
Updated Quartz schema SQL files for MySQL and PostgreSQL to use VARCH…
bonzofenix Jun 23, 2025
2cabf50
Remove unused logging
bonzofenix Jun 23, 2025
8c662bf
Remove TODO comment about PORT env variable in CfHttpConfiguration
bonzofenix Jun 23, 2025
fcb2c54
Remove TODO comments from DatasourceBeanPostProcessor
bonzofenix Jun 23, 2025
060525b
Refactor cloud foundrt configuration processor
bonzofenix Jun 23, 2025
32393bf
Revert "Updated Quartz schema SQL files for MySQL and PostgreSQL to u…
bonzofenix Jun 23, 2025
abc42d0
Fix scheduler broken test
bonzofenix Jun 23, 2025
5c275a7
Updated SonarCloud exclusions to ignore SQL files for copy-paste dete…
bonzofenix Jun 23, 2025
5fd1d9a
Refactor application.yml to use environment variables for database a…
bonzofenix Jun 23, 2025
589e437
Merge branch 'main' into 887-enable-scheduler-via-mtar
bonzofenix Jun 23, 2025
956912d
Fix format
bonzofenix Jun 23, 2025
43165e8
Update CloudFoundryConfigurationProcessorTest to handle different SSL…
bonzofenix Jun 23, 2025
ab16805
Update VCAP services credentials handling in CloudFoundryConfiguratio…
bonzofenix Jun 23, 2025
27099fc
Merge branch 'main' into 887-enable-scheduler-via-mtar
bonzofenix Jun 23, 2025
a4625f4
Update CloudFoundryConfigurationProcessorTest to adjust JSON string a…
bonzofenix Jun 23, 2025
5b51fff
Exclude 'CloudFoundryConfigurationProcessorTest.java' from Java forma…
bonzofenix Jun 23, 2025
8b1367b
Merge branch 'main' into 885-enable-scalingengine-via-mtar
bonzofenix Jun 23, 2025
cb177b1
Merge branch '887-enable-scheduler-via-mtar' into 885-enable-scalinge…
bonzofenix Jun 23, 2025
9351778
Improve database configuration and fix health endpoint test in autosc…
bonzofenix Jun 23, 2025
7f6e444
Merge branch 'main' into 885-enable-scalingengine-via-mtar
bonzofenix Jun 23, 2025
2344714
Merge branch 'main' into 885-enable-scalingengine-via-mtar
bonzofenix Jun 24, 2025
c99921b
Increase memory and disk limits for multiapps-controller and Cloud Fo…
bonzofenix Jun 24, 2025
625f1e0
Add scalingengine module to autoscaler Makefile defaults
bonzofenix Jun 24, 2025
7713ae0
Set dynamic versioning for mta-deploy and specify MTAR_FILENAME in M…
bonzofenix Jun 24, 2025
cfb8b28
Increase memory allocation for multiapps-controller deployment to 4G
bonzofenix Jun 24, 2025
a24bc34
Merge branch 'main' into 885-enable-scalingengine-via-mtar
bonzofenix Jun 26, 2025
15e6f92
Fix shellcheck altert
bonzofenix Jun 26, 2025
65871d3
Remove autoscaler module pom.xml file
bonzofenix Jun 26, 2025
ba5df01
Merge branch 'main' into 885-enable-scalingengine-via-mtar
bonzofenix Jun 30, 2025
7142c4e
fix the sigle quote in setting the password for mysql db
asalan316 Jun 30, 2025
c59458c
Merge branch 'main' into 885-enable-scalingengine-via-mtar
bonzofenix Jun 30, 2025
8661b9c
Refactor config loading to use GenericLoadConfig and implement SetLog…
bonzofenix Jun 30, 2025
ce55011
Fix flaxy test
bonzofenix Jun 30, 2025
0fc5816
Fix lint
bonzofenix Jun 30, 2025
ed8c2fc
Merge branch 'main' into 885-enable-scalingengine-via-mtar
bonzofenix Jun 30, 2025
fb85d79
Merge branch 'main' into 885-enable-scalingengine-via-mtar
asalan316 Jul 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ci/infrastructure/scripts/deploy-multiapps-controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ function deploy_multiapps_controller() {

mv multiapps-controller-web-war/*.war .
pushd multiapps-controller-web-manifest

cf push -f ./*.yml "${app_name}"
# scale up to be able to handle huge (>1GB) .MTARs
cf scale -m 4G -k 2G deploy-service -f

popd
}

Expand Down
10 changes: 10 additions & 0 deletions ci/operations/scale_out_cf_for_app-autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,13 @@
path: /instance_groups/name=diego-cell/vm_extensions
value:
- 500GB_ephemeral_disk


- type: replace
path: /instance_groups/name=cc-worker/jobs/name=cloud_controller_worker/properties/cc/maximum_app_disk_in_mb?
value: 4096

- type: replace
path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/maximum_app_disk_in_mb?
value: 4096

1 change: 0 additions & 1 deletion operations/configure-cf-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,3 @@
component: autoscaler_cf_eventgenerator
uris:
- ((deployment_name))-cf-eventgenerator.((system_domain))

4 changes: 4 additions & 0 deletions operations/use-cf-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
- type: remove
path: /instance_groups/name=operator

## ScalingEngine - remove scalingengine
- type: remove
path: /instance_groups/name=scalingengine

## SCHEDULER - remove scheduler
- type: remove
path: /instance_groups/name=scheduler
3 changes: 3 additions & 0 deletions packages/scalingengine/spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ files:
- autoscaler/vendor/*
- autoscaler/scalingengine/db/*
- autoscaler/cf/* # gosub
- autoscaler/configutil/* # gosub
- autoscaler/db/* # gosub
- autoscaler/db/sqldb/* # gosub
- autoscaler/healthendpoint/* # gosub
Expand All @@ -35,6 +36,7 @@ files:
- autoscaler/vendor/filippo.io/edwards25519/field/* # gosub
- autoscaler/vendor/github.com/beorn7/perks/quantile/* # gosub
- autoscaler/vendor/github.com/cespare/xxhash/v2/* # gosub
- autoscaler/vendor/github.com/cloud-gov/go-cfenv/* # gosub
- autoscaler/vendor/github.com/dlclark/regexp2/* # gosub
- autoscaler/vendor/github.com/dlclark/regexp2/syntax/* # gosub
- autoscaler/vendor/github.com/fatih/color/* # gosub
Expand Down Expand Up @@ -72,6 +74,7 @@ files:
- autoscaler/vendor/github.com/jmoiron/sqlx/reflectx/* # gosub
- autoscaler/vendor/github.com/mattn/go-colorable/* # gosub
- autoscaler/vendor/github.com/mattn/go-isatty/* # gosub
- autoscaler/vendor/github.com/mitchellh/mapstructure/* # gosub
- autoscaler/vendor/github.com/munnerz/goautoneg/* # gosub
- autoscaler/vendor/github.com/ogen-go/ogen/conv/* # gosub
- autoscaler/vendor/github.com/ogen-go/ogen/http/* # gosub
Expand Down
3 changes: 3 additions & 0 deletions scripts/initialise_db.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env bash

set -euo pipefail

set -x
echo "Running $0"

DB_HOST="${DB_HOST:-localhost}"
Expand Down Expand Up @@ -66,6 +68,7 @@ trap 'rm -f "${LOG_FILE}" || echo "no log file"' EXIT
echo "# Applying liquibase change sets to: '${URL}'"
for file in ${files}; do
echo " - applying: '$file'" | tee -a "${LOG_FILE}"
# shellcheck disable=SC2086
java -cp "${class_path}" liquibase.integration.commandline.Main \
--url="${URL}" \
--driver="${DRIVER}" \
Expand Down
1 change: 1 addition & 0 deletions src/autoscaler/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ fakes/*
mta_archives/
api/default_catalog.json
mta.yaml
*.mta
Makefile_*
13 changes: 4 additions & 9 deletions src/autoscaler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ PACKAGE_DIRS = $(shell go list './...' | grep --invert-match --regexp='/vendor/'
| grep --invert-match --regexp='e2e')


MODULES ?= dbtasks,apiserver,eventgenerator,metricsforwarder,operator,scheduler
MODULES ?= dbtasks,apiserver,eventgenerator,metricsforwarder,operator,scheduler,scalingengine

db_type ?= postgres
DB_HOST ?= localhost
DBURL := $(shell case "${db_type}" in\
Expand All @@ -33,7 +34,7 @@ binaries=$(shell find . -name "main.go" -exec dirname {} \; | cut -d/ -f2 | sor
test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq)
export GO111MODULE=on

.PHONY: clean-dbtasks package-dbtasks vendor-changelogs clean-scheduler package-scheduler
.PHONY: clean-dbtasks package-dbtasks vendor-changelogs clean-scheduler package-scheduler clean mta-deploy mta-undeploy mta-build mta-logs

GINKGO_OPTS = -r --race --require-suite --randomize-all --cover ${OPTS}

Expand Down Expand Up @@ -91,7 +92,6 @@ go-mod-tidy: ./go.mod ./go.sum ${go_deps_without_generated_sources}
go mod tidy



go-vendoring-folder := ./vendor
go-vendored-files = $(shell find '${go-vendoring-folder}' -type f -name '*.go' 2> '/dev/null')
## This does not work: go-vendored-files = $(wildcard ${go-vendoring-folder}/**/*.go)
Expand Down Expand Up @@ -176,14 +176,13 @@ clean-scheduler:
build-scheduler:
pushd scheduler; mvn package -Dmaven.test.skip=true; popd


vendor-changelogs:
cp $(MAKEFILE_DIR)/api/db/* $(MAKEFILE_DIR)/dbtasks/src/main/resources/.
cp $(MAKEFILE_DIR)/eventgenerator/db/* $(MAKEFILE_DIR)/dbtasks/src/main/resources/.
cp $(MAKEFILE_DIR)/operator/db/* $(MAKEFILE_DIR)/dbtasks/src/main/resources/.
cp $(MAKEFILE_DIR)/scalingengine/db/* $(MAKEFILE_DIR)/dbtasks/src/main/resources/.
cp $(MAKEFILE_DIR)/scheduler/db/* $(MAKEFILE_DIR)/dbtasks/src/main/resources/.

.PHONY: clean
clean:
@echo "# cleaning autoscaler"
@go clean -cache -testcache
Expand All @@ -193,13 +192,11 @@ clean:
@rm --force --recursive "${openapi-generated-clients-and-servers-api-dir}"
@rm --force --recursive "${openapi-generated-clients-and-servers-scalingengine-dir}"

.PHONY: mta-deploy
mta-deploy: mta-build build-extension-file
$(MAKE) -f metricsforwarder/Makefile set-security-group
@echo "Deploying with extension file: $(EXTENSION_FILE)"
@cf deploy $(DEST)/$(MTAR_FILENAME) --version-rule ALL -f --delete-services -e $(EXTENSION_FILE) -m $(MODULES)

.PHONY: mta-deploy
mta-undeploy:
@cf undeploy com.github.cloudfoundry.app-autoscaler-release -f

Expand All @@ -212,7 +209,6 @@ mta-logs:
cf dmol --mta com.github.cloudfoundry.app-autoscaler-release --last 1
vim mta-*

.PHONY: mta-build
mta-build: mta-build-clean
@echo "building mtar file for version: $(VERSION)"
cp mta.tpl.yaml mta.yaml
Expand All @@ -225,7 +221,6 @@ mta-build: mta-build-clean
mta-build-clean:
rm -rf mta_archives


.PHONY: cf-login
cf-login:
@echo '⚠️ Please note that this login only works for cf and concourse,' \
Expand Down
3 changes: 2 additions & 1 deletion src/autoscaler/api/broker/broker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"encoding/json"
"os"

"code.cloudfoundry.org/app-autoscaler/src/autoscaler/fakes"

"code.cloudfoundry.org/app-autoscaler/src/autoscaler/api/broker"
"code.cloudfoundry.org/app-autoscaler/src/autoscaler/db"
"code.cloudfoundry.org/app-autoscaler/src/autoscaler/fakes"
"code.cloudfoundry.org/app-autoscaler/src/autoscaler/models"

"context"
Expand Down
29 changes: 7 additions & 22 deletions src/autoscaler/api/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"golang.org/x/crypto/bcrypt"

"github.com/xeipuuv/gojsonschema"
"gopkg.in/yaml.v3"

"code.cloudfoundry.org/app-autoscaler/src/autoscaler/db"
"code.cloudfoundry.org/app-autoscaler/src/autoscaler/helpers"
Expand Down Expand Up @@ -124,6 +123,10 @@ type Config struct {
DefaultCustomMetricsCredentialType string `yaml:"default_credential_type" json:"default_credential_type"`
}

func (c *Config) SetLoggingLevel() {
c.Logging.Level = strings.ToLower(c.Logging.Level)
}

type PlanCheckConfig struct {
PlanDefinitions map[string]PlanDefinition `yaml:"plan_definitions" json:"plan_definitions"`
}
Expand Down Expand Up @@ -163,15 +166,8 @@ func defaultConfig() Config {
},
}
}
func loadPublicApiServerConfig(conf *Config, vcapReader configutil.VCAPConfigurationReader) error {
data, err := vcapReader.GetServiceCredentialContent("apiserver-config", "apiserver-config")
if err != nil {
return fmt.Errorf("%w: %v", ErrPublicApiServerConfigNotFound, err)
}
return yaml.Unmarshal(data, conf)
}

func loadVcapConfig(conf *Config, vcapReader configutil.VCAPConfigurationReader) error {
func LoadVcapConfig(conf *Config, vcapReader configutil.VCAPConfigurationReader) error {
if !vcapReader.IsRunningOnCF() {
return nil
}
Expand All @@ -185,7 +181,7 @@ func loadVcapConfig(conf *Config, vcapReader configutil.VCAPConfigurationReader)
conf.CFServer.Port = vcapReader.GetPort()
conf.Server.Port = 0

if err := loadPublicApiServerConfig(conf, vcapReader); err != nil {
if err := configutil.LoadConfig(&conf, vcapReader, "apiserver-config"); err != nil {
return err
}

Expand Down Expand Up @@ -221,18 +217,7 @@ func configureCatalog(conf *Config, vcapReader configutil.VCAPConfigurationReade
}

func LoadConfig(filepath string, vcapReader configutil.VCAPConfigurationReader) (*Config, error) {
conf := defaultConfig()

if err := helpers.LoadYamlFile(filepath, &conf); err != nil {
return nil, err
}

if err := loadVcapConfig(&conf, vcapReader); err != nil {
return nil, err
}

conf.Logging.Level = strings.ToLower(conf.Logging.Level)
return &conf, nil
return configutil.GenericLoadConfig(filepath, vcapReader, defaultConfig, configutil.VCAPConfigurableFunc[Config](LoadVcapConfig))
}

func FromJSON(data []byte) (*Config, error) {
Expand Down
59 changes: 43 additions & 16 deletions src/autoscaler/build-extension-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -e

script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# shellcheck source=../../ci/autoscaler/scripts/vars.source.sh
# shellcheck disable=SC1091
source "${script_dir}/../../ci/autoscaler/scripts/vars.source.sh"

if [ -z "$1" ]; then
Expand All @@ -22,7 +23,6 @@ fi
export SYSTEM_DOMAIN="autoscaler.app-runtime-interfaces.ci.cloudfoundry.org"
export POSTGRES_EXTERNAL_PORT="${PR_NUMBER:-5432}"


export CPU_LOWER_THRESHOLD="${CPU_LOWER_THRESHOLD:-"100"}"

cat << EOF > /tmp/extension-file-secrets.yml.tpl
Expand All @@ -36,7 +36,7 @@ eventgenerator_health_password: ((/bosh-autoscaler/${DEPLOYMENT_NAME}/autoscaler
eventgenerator_log_cache_uaa_client_id: eventgenerator_log_cache
eventgenerator_log_cache_uaa_client_secret: ((/bosh-autoscaler/cf/uaa_clients_eventgenerator_log_cache_secret))


scalingengine_health_password: ((/bosh-autoscaler/${DEPLOYMENT_NAME}/autoscaler_scalingengine_health_password))

policy_db_password: ((/bosh-autoscaler/${DEPLOYMENT_NAME}/database_password))
policy_db_server_ca: ((/bosh-autoscaler/${DEPLOYMENT_NAME}/postgres_server.ca))
Expand All @@ -51,15 +51,9 @@ EOF

credhub interpolate -f "/tmp/extension-file-secrets.yml.tpl" > /tmp/mtar-secrets.yml

export METRICSFORWARDER_UAA_SKIP_SSL_VALIDATION="$(yq ".metricsforwarder_uaa_skip_ssl_validation" /tmp/mtar-secrets.yml)"
export METRICSFORWARDER_APPNAME="${METRICSFORWARDER_APPNAME:-"${DEPLOYMENT_NAME}-metricsforwarder"}"
export METRICSFORWARDER_HEALTH_PASSWORD="$(yq ".metricsforwarder_health_password" /tmp/mtar-secrets.yml)"
export METRICSFORWARDER_HOST="${METRICSFORWARDER_HOST:-"${DEPLOYMENT_NAME}-metricsforwarder"}"
export METRICSFORWARDER_MTLS_HOST="${METRICSFORWARDER_MTLS_HOST:-"${DEPLOYMENT_NAME}-metricsforwarder-mtls"}"
export METRICSFORWARDER_INSTANCES="${METRICSFORWARDER_INSTANCES:-2}"

export APISERVER_HOST="${APISERVER_HOST:-"${DEPLOYMENT_NAME}"}"
export APISERVER_INSTANCES="${APISERVER_INSTANCES:-2}"
export SERVICEBROKER_HOST="${SERVICEBROKER_HOST:-"${DEPLOYMENT_NAME}servicebroker"}"

export EVENTGENERATOR_HEALTH_PASSWORD="$(yq ".eventgenerator_health_password" /tmp/mtar-secrets.yml)"
export EVENTGENERATOR_LOG_CACHE_UAA_CLIENT_ID="$(yq ".eventgenerator_log_cache_uaa_client_id" /tmp/mtar-secrets.yml)"
Expand All @@ -68,14 +62,25 @@ export EVENTGENERATOR_CF_HOST="${EVENTGENERATOR_CF_HOST:-"${DEPLOYMENT_NAME}-cf-
export EVENTGENERATOR_HOST="${EVENTGENERATOR_HOST:-"${DEPLOYMENT_NAME}-eventgenerator"}"
export EVENTGENERATOR_INSTANCES="${EVENTGENERATOR_INSTANCES:-2}"

export METRICSFORWARDER_UAA_SKIP_SSL_VALIDATION="$(yq ".metricsforwarder_uaa_skip_ssl_validation" /tmp/mtar-secrets.yml)"
export METRICSFORWARDER_APPNAME="${METRICSFORWARDER_APPNAME:-"${DEPLOYMENT_NAME}-metricsforwarder"}"
export METRICSFORWARDER_HEALTH_PASSWORD="$(yq ".metricsforwarder_health_password" /tmp/mtar-secrets.yml)"
export METRICSFORWARDER_HOST="${METRICSFORWARDER_HOST:-"${DEPLOYMENT_NAME}-metricsforwarder"}"
export METRICSFORWARDER_MTLS_HOST="${METRICSFORWARDER_MTLS_HOST:-"${DEPLOYMENT_NAME}-metricsforwarder-mtls"}"
export METRICSFORWARDER_INSTANCES="${METRICSFORWARDER_INSTANCES:-2}"

export SCALINGENGINE_CF_CLIENT_ID="autoscaler_client_id"
export SCALINGENGINE_CF_CLIENT_SECRET="autoscaler_client_secret"
export SCALINGENGINE_HEALTH_PASSWORD="$(yq ".scalingengine_health_password" /tmp/mtar-secrets.yml)"
export SCALINGENGINE_CF_HOST="${SCALINGENGINE_CF_HOST:-"${DEPLOYMENT_NAME}-cf-scalingengine"}"
export SCALINGENGINE_HOST="${SCALINGENGINE_HOST:-"${DEPLOYMENT_NAME}-scalingengine"}"
export SCALINGENGINE_INSTANCES="${SCALINGENGINE_INSTANCES:-2}"

export SCHEDULER_HOST="${SCHEDULER_HOST:-"${DEPLOYMENT_NAME}-scheduler"}"
export SCHEDULER_CF_HOST="${SCHEDULER_CF_HOST:-"${DEPLOYMENT_NAME}-cf-scheduler"}"
export SCHEDULER_INSTANCES="${SCHEDULER_INSTANCES:-2}"

export SERVICEBROKER_HOST="${SERVICEBROKER_HOST:-"${DEPLOYMENT_NAME}servicebroker"}"

export SCALINGENGINE_HOST="${SCALINGENGINE_HOST:-"${DEPLOYMENT_NAME}-cf-scalingengine"}"
export SCHEDULER_CF_HOST="${SCHEDULER_CF_HOST:-"${DEPLOYMENT_NAME}-cf-scheduler"}"

export OPERATOR_CF_CLIENT_ID="autoscaler_client_id"
export OPERATOR_CF_CLIENT_SECRET="autoscaler_client_secret"
Expand Down Expand Up @@ -130,6 +135,15 @@ modules:
routes:
- route: ${EVENTGENERATOR_CF_HOST}.\${default-domain}
- route: ${EVENTGENERATOR_HOST}.\${default-domain}
- name: scalingengine
requires:
- name: scalingengine-config
- name: database
parameters:
instances: ${SCALINGENGINE_INSTANCES}
routes:
- route: ${SCALINGENGINE_CF_HOST}.\${default-domain}
- route: ${SCALINGENGINE_HOST}.\${default-domain}
- name: metricsforwarder
requires:
- name: metricsforwarder-config
Expand Down Expand Up @@ -162,7 +176,7 @@ resources:
- name: metricsforwarder-config
parameters:
config:
metricsforwarder:
metricsforwarder-config:
health:
basic_auth:
password: "${METRICSFORWARDER_HEALTH_PASSWORD}"
Expand All @@ -185,7 +199,7 @@ resources:
basic_auth:
password: "${EVENTGENERATOR_HEALTH_PASSWORD}"
scalingEngine:
scaling_engine_url: https://${SCALINGENGINE_HOST}.\${default-domain}
scaling_engine_url: https://${SCALINGENGINE_CF_HOST}.\${default-domain}

- name: apiserver-config
parameters:
Expand All @@ -205,7 +219,7 @@ resources:
metrics_forwarder_url: https://${METRICSFORWARDER_HOST}.\${default-domain}
metrics_forwarder_mtls_url: https://${METRICSFORWARDER_MTLS_HOST}.\${default-domain}
scaling_engine:
scaling_engine_url: https://${SCALINGENGINE_HOST}.\${default-domain}
scaling_engine_url: https://${SCALINGENGINE_CF_HOST}.\${default-domain}
event_generator:
event_generator_url: https://${EVENTGENERATOR_CF_HOST}.\${default-domain}
broker_credentials:
Expand Down Expand Up @@ -236,9 +250,20 @@ resources:
client_id: ${OPERATOR_CF_CLIENT_ID}
secret: ${OPERATOR_CF_CLIENT_SECRET}
scaling_engine:
scaling_engine_url: https://${SCALINGENGINE_HOST}.\${default-domain}
scaling_engine_url: https://${SCALINGENGINE_CF_HOST}.\${default-domain}
scheduler:
scheduler_url: https://${SCHEDULER_CF_HOST}.\${default-domain}
- name: scalingengine-config
parameters:
config:
scalingengine-config:
health:
basic_auth:
password: "${SCALINGENGINE_HEALTH_PASSWORD}"
cf:
api: https://api.\${default-domain}
client_id: ${SCALINGENGINE_CF_CLIENT_ID}
secret: ${SCALINGENGINE_CF_CLIENT_SECRET}

- name: database
parameters:
Expand All @@ -247,12 +272,14 @@ resources:
client_cert: "${POLICY_DB_CLIENT_CERT//$'\n'/\\n}"
client_key: "${POLICY_DB_CLIENT_KEY//$'\n'/\\n}"
server_ca: "${POLICY_DB_SERVER_CA//$'\n'/\\n}"

- name: syslog-client
parameters:
config:
client_cert: "${SYSLOG_CLIENT_CERT//$'\n'/\\n}"
client_key: "${SYSLOG_CLIENT_KEY//$'\n'/\\n}"
server_ca: "${SYSLOG_CLIENT_CA//$'\n'/\\n}"

- name: broker-catalog
parameters:
config:
Expand Down
Loading
Loading