You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to create a kube client using your library with socks integration and not sure about the error message.
This is my code:
let config = Config::infer().await?;
let client = if std::env::var("SOCKS5").is_ok() {
let rustls_config = std::sync::Arc::new(config.rustls_client_config()?);
let mut http_connector = hyper::client::HttpConnector::new();
http_connector.enforce_http(false);
let socks_http_connector = SocksConnector {
proxy_addr: std::env::var("SOCKS5").unwrap().parse::<Uri>().unwrap(), // scheme is required by HttpConnector
auth: None,
connector: http_connector.clone(),
};
let https_socks_http_connector = hyper_rustls::HttpsConnector::from((socks_http_connector.clone(), rustls_config.clone()));
let service = tower::ServiceBuilder::new()
.layer(config.base_uri_layer())
.service(hyper::Client::builder().build(https_socks_http_connector));
kube::Client::new(service, config.default_namespace)
} else {
let https = config.openssl_https_connector()?;
let service = tower::ServiceBuilder::new()
.layer(config.base_uri_layer())
.service(hyper::Client::builder().build(https));
kube::Client::new(service, config.default_namespace)
};
let api_pods: Api<Pod> = Api::namespaced(client, "cicd");
let lp = ListParams::default().limit(1);
println!("Pods:\n{:#?}", api_pods.list(&lp).await);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Deal kube rs community,
I am attempting to create a kube client using your library with socks integration and not sure about the error message.
This is my code:
And this is the error I am getting:
I don't understand what this
UnsupportedNameType
error means? any hint?thank you very much
Beta Was this translation helpful? Give feedback.
All reactions