-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Dockerfile and initial build config
- Loading branch information
Showing
6 changed files
with
111 additions
and
7 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @Dwolla/platform |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: ['**'] | ||
tags: [v*] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
otel_tag: | ||
- v0.35.0 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Build and Push Docker Image | ||
uses: Dwolla/jenkins-agents-workflow/.github/actions/build@main | ||
with: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
BASE_TAG: ${{ matrix.OTEL_TAG }} | ||
TAG_NAME: OTEL_TAG | ||
IMAGE_NAME: dwolla/otel-collector | ||
build-complete: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "The build completed successfully" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
ARG OTEL_TAG | ||
FROM amazon/aws-otel-collector:${OTEL_TAG} | ||
LABEL maintainer="Dwolla Dev <[email protected]>" | ||
LABEL org.label-schema.vcs-url="https://github.com/Dwolla/dwolla-adot-collector" | ||
|
||
COPY otel-config.yaml /etc/otel-config.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
OTEL_TAG := $(OTEL_TAG) | ||
JOB := core-${OTEL_TAG} | ||
CLEAN_JOB := clean-${OTEL_TAG} | ||
|
||
all: ${JOB} | ||
clean: ${CLEAN_JOB} | ||
.PHONY: all clean ${JOB} ${CLEAN_JOB} | ||
|
||
${JOB}: core-%: Dockerfile | ||
docker buildx build \ | ||
--platform linux/arm64,linux/amd64 \ | ||
--build-arg OTEL_TAG=$* \ | ||
--tag dwolla/otel-collector:$*-SNAPSHOT \ | ||
. | ||
|
||
${CLEAN_JOB}: clean-%: | ||
docker image rm --force dwolla/otel-collector:$*-SNAPSHOT |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
extensions: | ||
health_check: | ||
|
||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
endpoint: 0.0.0.0:4317 | ||
http: | ||
endpoint: 0.0.0.0:55681 | ||
zipkin: | ||
|
||
processors: | ||
memory_limiter: | ||
limit_mib: 100 | ||
check_interval: 5s | ||
batch/traces: | ||
timeout: 10s | ||
send_batch_size: 50 | ||
attributes: | ||
actions: | ||
- key: deployment.environment | ||
value: ${env:DWOLLA_ENV} | ||
action: insert | ||
- key: peer.service | ||
action: extract | ||
pattern: ^consul!(?P<peerservice>.*)$ # AFAICT using "peer.service" would be an illegal capture group name | ||
- key: peer.service | ||
action: update | ||
from_attribute: peerservice | ||
- key: peerservice | ||
action: delete | ||
|
||
exporters: | ||
awsxray: | ||
indexed_attributes: | ||
- otel.resource.service.name | ||
- deployment.environment | ||
|
||
service: | ||
pipelines: | ||
traces: | ||
receivers: | ||
- otlp | ||
- zipkin | ||
processors: | ||
- memory_limiter | ||
- batch/traces | ||
- attributes | ||
exporters: | ||
- awsxray | ||
|
||
extensions: | ||
- health_check |