-
Notifications
You must be signed in to change notification settings - Fork 52
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
Closed
Go buildpack #3149
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…autoscaler module
- 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
• 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.