Skip to content

Commit

Permalink
fix(libsinsp/k8s): set api url path to "apps/v1"
Browse files Browse the repository at this point in the history
The k8s client used "extensions/v1beta1" as api url path in order to
get metadata for daemonsets, deployments and replicasets. Starting with the
v1.16 release of k8s the above mentioned k8s resources are no more served in
"extensions/v1beta1" and are now served in "apps/v1" api version. The
"apps/v1" api version is available since v1.9 of k8s.

Signed-off-by: Aldo Lacuku <[email protected]>
  • Loading branch information
alacuku authored and poiana committed Jun 30, 2022
1 parent 4bd1dfc commit 592b9db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion userspace/libsinsp/sinsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2367,7 +2367,7 @@ void sinsp::k8s_discover_ext()
}
if(uri(*m_k8s_api_server).is_secure()) { init_k8s_ssl(m_k8s_api_cert); }
m_k8s_ext_handler.reset(new k8s_api_handler(m_k8s_collector, *m_k8s_api_server,
"/apis/extensions/v1beta1", "[.resources[].name]",
"/apis/apps/v1", "[.resources[].name]",
"1.1", m_k8s_ssl, m_k8s_bt, true));
g_logger.log("K8s API extensions handler: collector created.", sinsp_logger::SEV_TRACE);
}
Expand Down

0 comments on commit 592b9db

Please sign in to comment.