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

feature(metricsforwarder): Enable go buildpack for mtar deployment #3154

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions src/autoscaler/.cfignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
8 changes: 1 addition & 7 deletions src/autoscaler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ go-mod-vendor: ${go-vendoring-folder} ${go-vendored-files}
${go-vendoring-folder} ${go-vendored-files} &: ${app-fakes-dir} ${app-fakes-files}
go mod vendor

cf-build-%: generate-fakes
@echo "# building for cf $*"
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/$* $*/cmd/$*/main.go

cf-build: $(addprefix cf-build-,$(binaries))

# CGO_ENABLED := 1 is required to enforce dynamic linking which is a requirement of dynatrace.
build-%: ${openapi-generated-clients-and-servers-dir} ${openapi-generated-clients-and-servers-files}
@echo "# building $*"
Expand Down Expand Up @@ -167,7 +161,7 @@ mta-logs:
vim mta-*

.PHONY: mta-build
mta-build: mta-build-clean cf-build
mta-build: mta-build-clean
mbt build

mta-build-clean:
Expand Down
11 changes: 8 additions & 3 deletions src/autoscaler/mta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ version: 0.0.1

modules:
- name: metricsforwarder
type: binary
path: build
type: go
path: .
properties:
GO_INSTALL_PACKAGE_SPEC: code.cloudfoundry.org/app-autoscaler/src/autoscaler/metricsforwarder/cmd/metricsforwarder
requires:
- name: config
- name: policydb
Expand All @@ -18,8 +20,11 @@ modules:
disk-quota: 1G
instances: 2
stack: cflinuxfs4
command: ./metricsforwarder
routes:
build-parameters:
builder: custom
commands:
- make vendor

resources:
- name: config
Expand Down
Loading