forked from vectordotdev/vector
-
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.
chore(dev): Transition local k8s dev to Tilt (vectordotdev#11804)
* feat(dev)!: Use tilt rather than skaffold Signed-off-by: Spencer Gilbert <[email protected]> * polish tiltfile and dockerfile Signed-off-by: Spencer Gilbert <[email protected]> * Add docs and fix style Signed-off-by: Spencer Gilbert <[email protected]>
- Loading branch information
1 parent
4a55953
commit 2fcdff3
Showing
4 changed files
with
76 additions
and
4 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -16,3 +16,6 @@ node_modules | |
tests/data/wasm/*/target | ||
heaptrack.* | ||
massif.* | ||
|
||
# tilt | ||
tilt_modules/ |
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,28 @@ | ||
################### | ||
# VECTOR TILTFILE # | ||
################### | ||
|
||
load('ext://helm_resource', 'helm_resource', 'helm_repo') | ||
|
||
docker_build( | ||
ref='timberio/vector', | ||
context='.', | ||
build_args={'RUST_VERSION': '1.58'}, | ||
dockerfile='tilt/Dockerfile' | ||
) | ||
|
||
helm_repo(name='vectordotdev', url='https://helm.vector.dev') | ||
helm_resource( | ||
name='vector', | ||
chart='vectordotdev/vector', | ||
image_deps=['timberio/vector'], | ||
image_keys=[('image.repository', 'image.tag')], | ||
flags=[ | ||
'--devel', | ||
'--set', 'role=Agent', | ||
# '--set', 'env[0].name=VECTOR_LOG', | ||
# '--set', 'env[0].value=trace' | ||
] | ||
) | ||
|
||
k8s_resource(workload='vector', port_forwards=8686) |
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,35 @@ | ||
ARG RUST_VERSION | ||
ARG DEBIAN_RELEASE=bullseye | ||
# Features required for both Agent and Aggregator Helm chart configurations | ||
ARG FEATURES=api,api-client,sources-datadog_agent,sources-fluent,sources-host_metrics,sources-internal_metrics,sources-kubernetes_logs,sources-logstash,sources-splunk_hec,sources-statsd,sources-syslog,sources-vector,sinks-console,sinks-prometheus,sinks-vector | ||
|
||
# | ||
# VECTOR BUILDER | ||
# | ||
FROM docker.io/rust:${RUST_VERSION}-${DEBIAN_RELEASE} as builder | ||
RUN apt-get update && apt-get -y install build-essential git clang cmake libclang-dev libsasl2-dev libstdc++-10-dev libssl-dev libxxhash-dev zlib1g-dev zlib1g | ||
RUN git clone https://github.com/rui314/mold.git | ||
RUN cd mold && git checkout v1.1.1 && make -j$(nproc) && make install && rm -rf mold | ||
|
||
WORKDIR /vector | ||
COPY . . | ||
ARG FEATURES | ||
RUN --mount=type=cache,target=/vector/target \ | ||
--mount=type=cache,target=/usr/local/cargo/registry \ | ||
--mount=type=cache,target=/usr/local/cargo/git \ | ||
/usr/local/bin/mold -run cargo build --bin vector \ | ||
--no-default-features --features $FEATURES && \ | ||
cp target/debug/vector . | ||
|
||
# | ||
# TARGET | ||
# | ||
FROM debian:${DEBIAN_RELEASE}-slim | ||
RUN apt-get update && apt-get -y install zlib1g | ||
COPY --from=builder /vector/vector /usr/bin/vector | ||
VOLUME /var/lib/vector/ | ||
|
||
# Smoke test | ||
RUN ["vector", "--version"] | ||
|
||
ENTRYPOINT ["/usr/bin/vector"] |