-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(new source): Initial kubernetes_logs implementation
#2653
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
Merged
Changes from all commits
Commits
Show all changes
118 commits
Select commit
Hold shift + click to select a range
1356830
Add kubernetes-integration-tests feature
MOZGIII 264128e
Enable kubernetes tests
MOZGIII 18a0e55
Add skaffold for quick development iterations
MOZGIII 4bc782a
Add kubernetes mod and cargo feature
MOZGIII ebc5663
Add an HTTP client tailored for k8s API in an in-cluster environment
MOZGIII 6709988
Add a decoder for chained k8s responses
MOZGIII 15a7297
Add block_on_std to test_util
MOZGIII bc7a275
Add tools for processing HTTP bodies as streams of k8s responses
MOZGIII e8127b2
Add Watcher trait
MOZGIII c45dbd5
Add ApiWatcher implementation
MOZGIII f02bcb9
Add MockWatcher implementation
MOZGIII 0fd88b7
Add a reflector implementation
MOZGIII 1b472f9
Add a placeholder for kubernetes logs source
MOZGIII f4f23f9
Add paths provider implementation based on pods state driven by refle…
MOZGIII d0fbebb
Add parser for k8s log formats
MOZGIII 0eabab2
Add partial events merger
MOZGIII 66bcd79
Add pod metadata annotator
MOZGIII e46acdf
Add kubernetes logs source implementation
MOZGIII 9c49908
Change reflector errors to be less restrictive
MOZGIII cccb735
Better error handling
MOZGIII bb81580
Improve error handling
MOZGIII ad8f2f8
Better error handling for event pipeline
MOZGIII 34f7731
Abstract API watcher around watch request builder
MOZGIII d584a12
Add assertions to the reflector internal state in-between the invocat…
MOZGIII 36919fc
Fix the comment at optional tranform mod
MOZGIII 9636f3f
Add a to do comment to make transform utils part of core
MOZGIII 366b8ca
Fix typo at kustomization.yaml
MOZGIII cc4a1a8
More flexible interface at resource version
MOZGIII 234b1e3
Fix the mod comment at resource version
MOZGIII 7c8358d
Remove manual minikube init from scripts/skaffold.sh
MOZGIII ca0d979
Specify shell at scripts/minikube-docker-env.sh
MOZGIII 8d41c33
Switch scripts/copy-docker-image-to-minikube.sh to use scripts/miniku…
MOZGIII d21279a
Switch to using device inodes for file fingerprinting
MOZGIII 24d5604
Fix grammar at in-cluster config
MOZGIII 5ed884c
Add the variable that's missing to the error at in-cluster config
MOZGIII 1c95b30
Move in_cluster mod declaration to the top of the file
MOZGIII 363ef53
Cut some ununsed code from src/kubernetes/resource_version.rs
MOZGIII 3035739
Fix typo at src/kubernetes/reflector.rs
MOZGIII 9ae9034
Move the file key to the top of the file
MOZGIII 19e31e1
Fix comment at parsers test
MOZGIII f0a9bfe
Add a comment for Config::self_node_name
MOZGIII dc68cf2
Allow disabling automatic partial merge
MOZGIII 6dd5799
Allow customizing the fields names used by pod metadata annotator
MOZGIII be7adac
Abstract reflector around state
MOZGIII 685f0f6
Add support for delayed delete at reflector
MOZGIII 2b57f5e
Reimplement the tests to add delayed deletion testing capability
MOZGIII def5d4a
Improve the request preparation code at kubernetes::client::Client
MOZGIII 0d70b38
Add reexports at src/kubernetes/mod.rs
MOZGIII 242a243
Adjust and use watcher error constructors
MOZGIII c1ea628
Eliminate unused transform
MOZGIII 1be23b5
Add a test for stream error behavior
MOZGIII 3c16cfb
Add tests and derives at transform::util::pick
MOZGIII a8ad244
Require Watcher::Stream to be Send
MOZGIII 145f0b0
Add instrumentation
MOZGIII d868ac5
Add state maintenance and move delayed delete logic into to a state w…
MOZGIII 5be1a81
Ignore instrumenting state tests
MOZGIII 1cc6efc
Clean up reflector tests
MOZGIII 3b86b27
Add flush debouncing to the evmap state
MOZGIII bbe3fc9
Proper delay control at main test flow
MOZGIII f61c2ec
Add evmap tests with and without debounce
MOZGIII bab7767
Fix a typo
MOZGIII 38da9ce
Document the controversial join_host_port
MOZGIII b4b5495
Improve instrumenting watcher events
MOZGIII 473bb12
Improve api watcher events
MOZGIII 484e4ee
Rename init to new
MOZGIII 851dad6
Use Strings at parser tests
MOZGIII e2d7542
Corrected partial message detection hueristics at docker parser
MOZGIII 8409d38
Hint for where's what at parser test case
MOZGIII 3111ac4
Bump base image at skaffold/docker/Dockerfile to debian:bullseye-slim
MOZGIII 22839e4
Better script layout at skaffold/docker/Dockerfile
MOZGIII dfaed5e
Convert an annotation failure warn log to internal event
MOZGIII 0cdae0a
Correct the shutdown logic
MOZGIII 1115c0d
Specify STOPSIGNAL at skaffold/docker/Dockerfile
MOZGIII ca03bb4
Set terminationGracePeriodSeconds at distribution/kubernetes/vector-n…
MOZGIII 741d0bb
Fix paths generation on Windows
MOZGIII d11ef18
Add a to do to unignore instrumenting state tests
MOZGIII 53d6958
Add Kubernetes section to the CONTRIBUTING.md
MOZGIII 8170521
Solve the issue with the config generation
MOZGIII a6a515a
Better document the intent for the kubernetes_logs source
MOZGIII a18720c
Print vector version upon docker build at skaffold/docker/Dockerfile
MOZGIII c0327c3
Add more build-time output at skaffold/docker/Dockerfile
MOZGIII 1e44894
Add patchelf at skaffold/docker/Dockerfile
MOZGIII bed7aa4
Optimize commands order at skaffold/docker/Dockerfile for layer caching
MOZGIII fe4b2c5
Add kubectl at CONTRIBUTING.md
MOZGIII f5dc48f
Add additional details at CONTRIBUTING.md
MOZGIII 7c7fbbb
Fix the data dir description
MOZGIII 2032d99
Move transform utils to the source mod to avoid introducing global items
MOZGIII 8d12cf2
Fix the typo at CONTRIBUTING.md
MOZGIII a74d976
Eliminate the ApiWatcher::invoke_boxed_stream
MOZGIII 9b80bb9
Add code docs for join_host_port
MOZGIII 4052c8e
Add a lifecycle system to manage futures sanely and reliably
MOZGIII 6840d39
Reorganized the mod and use clauses at src/sources/kubernetes_logs/mo…
MOZGIII 43a0735
Switch fingerprinter to checksum
MOZGIII d01dd88
Revert "Switch fingerprinter to checksum"
MOZGIII 343193e
Invert the condition at Debounce::signal
MOZGIII 3c6046f
Fix typo at src/internal_events/kubernetes/instrumenting_state.rs
MOZGIII 182469b
Remove the rate limit from KubernetesLogsEventReceived
MOZGIII 17d3f8f
Adjust the log style at KubernetesLogsEventReceived
MOZGIII 36679b0
Move pod metadata annotation to access file path directly
MOZGIII 4809994
Add test to ensure MultiResponseDecoder doesn't leak memory
MOZGIII f0f2e36
Simplified the picker logic and added tests
MOZGIII a839e3c
Add a special case for `\n` at the MultiResponseDecoder::finish
MOZGIII 91b7757
Workaround for watch API failures
MOZGIII 7d2559e
Add a long line test case for the CRI format parser
MOZGIII 70471dc
Log the buffer state at response decoding error
MOZGIII 487b66d
Handle data parsing errors as stream ends
MOZGIII 295f488
Ensure we only read logs under container name subdirectory
MOZGIII c651606
Promote trace to an error at src/kubernetes/multi_response_decoder.rs
MOZGIII 8b7b221
Add a test case for bookmark parsing error
MOZGIII 968e311
Remove meaningless leading \n from the boorkmark test
MOZGIII a64eae3
Update k8s-openapi to a branch with a fix for the bookmark parsing issue
MOZGIII 670e46c
Switch kubernetes_logs source to Fingerprinter::FirstLineChecksum
MOZGIII 3fd9d5b
Revert "Handle data parsing errors as stream ends"
MOZGIII f5b961a
Switch k8s-openapi git repo to our fork
MOZGIII 8fd1fb3
Use cargo patch instead of per-crate git spec for k8s-openapi
MOZGIII 2e4a7e1
Switch to the upstream of k8s-openapi
MOZGIII 4a05afc
Fix clippy offences
MOZGIII 86233a7
Bump k8s-openapi and switch to crates.io version
MOZGIII File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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,10 @@ | ||
| # This is a part of our skaffold setup for development. | ||
| # Do not use in production. | ||
|
|
||
| namespace: vector | ||
|
|
||
| resources: | ||
| - distribution/kubernetes/vector-global.yaml | ||
| - skaffold/manifests/namespace.yaml | ||
| - skaffold/manifests/config.yaml | ||
| - distribution/kubernetes/vector-namespaced.yaml |
This file contains hidden or 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 hidden or 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,9 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| if ! COMMANDS="$(minikube --shell bash docker-env)"; then | ||
| echo "Unable to obtain docker env from minikube; is minikube started?" >&2 | ||
| exit 7 | ||
| fi | ||
|
|
||
| eval "$COMMANDS" |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.