-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Vector 0.22.0 breaks with kubernetes_source #12989
Comments
Hi - are you attempting to use a custom certificate with the source? |
hi there @spencergilbert not really, I used the one that the helm chart renders data_dir: /vector-data-dir
api:
enabled: true
address: 127.0.0.1:8686
playground: false
sources:
kubernetes_logs:
type: kubernetes_logs
host_metrics:
filesystem:
devices:
excludes: [binfmt_misc]
filesystems:
excludes: [binfmt_misc]
mountPoints:
excludes: ["*/proc/sys/fs/binfmt_misc"]
type: host_metrics
internal_metrics:
type: internal_metrics
sinks:
prom_exporter:
type: prometheus_exporter
inputs: [host_metrics, internal_metrics]
address: 0.0.0.0:9090
stdout:
type: console
inputs: [kubernetes_logs]
encoding:
codec: json |
@jaysonsantos - I suspect this may be related to: kube-rs/kube#805 though my understanding was that was limited to You are running on a |
@spencergilbert that is right, it runs on k3s. |
With the following it seems to work to call k8s's api: cargo new kube-test
cd kube-test
cat >> Cargo.toml <<EOF
futures = "0.3.21"
k8s-openapi = { version = "0.15.0", features = ["v1_23"] }
kube = { version = "0.73.1" }
tokio = { version = "1.19.2", features = ["full"] }
EOF
cat > src/main.rs <<-EOF
use futures::{StreamExt, TryStreamExt};
use kube::{Client, api::{Api, ResourceExt, ListParams, PostParams}};
use k8s_openapi::api::core::v1::Pod;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Infer the runtime environment and try to create a Kubernetes Client
let client = Client::try_default().await?;
// Read pods in the configured namespace into the typed interface from k8s-openapi
let pods: Api<Pod> = Api::default_namespaced(client);
for p in pods.list(&ListParams::default()).await? {
println!("found pod {}", p.name());
}
Ok(())
}
EOF
cargo build
gzip -c target/debug/kube-test | kubectl exec -it -n vector ds-vector-lcpdk -- bash -exc 'cat > /tmp/kube-test.gz'
kubectl exec -it -n vector ds-vector-lcpdk -- bash -exc 'cd /tmp && gunzip kube-test.gz && chmod +x kube-test && ./kube-test' and the output for the last one is this
I will try vector's main branch to see how it goes |
vector is using rust-tls, compiling vector with the following patch works: diff --git a/Cargo.toml b/Cargo.toml
index f089726b0..48c197c31 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -254,7 +254,7 @@ infer = { version = "0.8.0", default-features = false, optional = true}
indoc = { version = "1.0.6", default-features = false }
inventory = { version = "0.1.10", default-features = false }
k8s-openapi = { version = "0.14.0", default-features = false, features = ["api", "v1_16"], optional = true }
-kube = { version = "0.71.0", default-features = false, features = ["client", "rustls-tls", "runtime"], optional = true }
+kube = { version = "0.71.0", default-features = false, features = ["client", "native-tls", "runtime"], optional = true }
listenfd = { version = "1.0.0", default-features = false, optional = true }
logfmt = { version = "0.0.2", default-features = false, optional = true }
lru = { version = "0.7.6", default-features = false, optional = true }
|
🤦 whoops - that's definitely a mistake, would you like to submit that patch? |
@spencergilbert sure, i will send it soon |
A note for the community
Problem
vector 0.22.0 breaks when it uses kubernetes_source with:
kubernetes version: v1.23.6+k3s1
Configuration
Version
vector 0.22.0 (x86_64-unknown-linux-gnu 5e937e3 2022-06-01)
Debug Output
Example Data
No response
Additional Context
vanilla helm rendering as agent
References
No response
The text was updated successfully, but these errors were encountered: