Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go buildpack #3149

Closed
wants to merge 47 commits into from
Closed

Go buildpack #3149

wants to merge 47 commits into from

Conversation

bonzofenix
Copy link
Contributor

No description provided.

bonzofenix and others added 30 commits June 27, 2024 16:28
 - Update deploy function to change into the autoscaler directory instead of metricsforwarder
 - Replace `make cf-push` with `make mta-deploy` for deploying autoscaler apps
 - Mark `mta-deploy` as .PHONY in Makefile, replacing `cf-push`
…rder

 • Extract YAML file decoding into DecodeYamlFile function for cleaner LoadConfig.
 • Implement readDbFromVCAP and readConfigFromVCAP to load database and other configurations from VCAP_SERVICES.
 • Update loadVCAPEnvs to use the new VCAP reading functions.
 • Modify tests to handle new environment variable-based configuration loading and add checks for VCAP_SERVICES parsing.
 • Fix error handling in readDbFromVCAP to return an error when multiple DB services are tagged as relational.
 - Add JSON decoding support for VCAP_SERVICES
 - Replace DecodeYamlFile with decodeYamlFile for consistency
 - Remove unused readConfigFromVCAP function
 - Update config_test.go to test VCAP_SERVICES JSON loading
 - Replace `mta-deploy` target with `deploy-apps` in Makefile
 - Add `bbl print-env` setup in `deploy-apps.sh`
 - Remove `deploy-multiapps-controller.sh` script's redundant newline
 - Remove metricsforwarder route port configuration in `use-cf-services.yml`
 - Remove instance group `metricsforwarder` from `use-cf-services.yml`
 - Update `autoscaler/Makefile` to use `build-extension-file.sh` for extension file generation
 - Add `build-extension-file.sh` script for dynamic extension file creation
 - Introduce `configutil` package with `cf.go` for VCAP service configuration parsing
 - Add `configutil_suite_test.go` and `configutil_test.go` for the new `configutil` package
 - Remove `example.mtaext` as extension file generation is now dynamic
 - Update `generate-fakes.go` to include fake VCAP configuration reader
 - Remove `helpers/cf.go` as its functionality is replaced by `configutil`
 - Update `metricsforwarder/Makefile` to remove obsolete targets and variables
 - Refactor `metricsforwarder` main and config to use `configutil` for VCAP services
 - Add `default_config.json` for `metricsforwarder` default configuration
 - Update `mta.yaml` to define `metricsforwarder` module with new resources and parameters
 • Consolidate error variable declarations into a var block
 • Add new error type for missing credentials
 • Streamline NewVCAPConfigurationReader function
 • Refactor TLS and DB materialization methods for clarity
 • Introduce helper functions for service retrieval and TLS cert file creation
 • Improve error messages with more context
 • Implement new methods in VCAPConfiguration for port retrieval, CF environment check, and service credential access.
 • Remove direct cfenv and JSON handling from metricsforwarder/config, using VCAPConfigurationReader interface instead.
 • Consolidate error variables in metricsforwarder/config.
 • Update tests to mock new VCAPConfigurationReader methods and adjust for refactored config loading logic.
…urity issue in config_test.go with #nosec G101
bonzofenix and others added 17 commits August 27, 2024 18:25
 • Remove ErrReadEnvironment variable from cf.go
 • Change error handling to print a message instead of returning an error when failing to read VCAP_APPLICATION
 • Add tests for IsRunningOnCF when VCAP_APPLICATION is not set
 • Remove unused unsetEnvVars function and related test scenarios in cmd metricsforwarder_test.go
 - Change import path from cloudfoundry-community to cloud-gov for go-cfenv
 - Upgrade go-cfenv to v1.19.1
 - Update mapstructure package to v1.5.0
@bonzofenix bonzofenix marked this pull request as draft August 28, 2024 16:27
@bonzofenix bonzofenix closed this Aug 28, 2024
@bonzofenix bonzofenix deleted the go-buildpack branch August 28, 2024 19:04
@bonzofenix bonzofenix restored the go-buildpack branch August 28, 2024 19:05
@bonzofenix bonzofenix deleted the go-buildpack branch August 29, 2024 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant