k8s v0.2.5 K8s.Discovery

Auto discovery of Kubenetes API Versions and Groups.

Link to this section Summary

Functions

Get a map of API type to groups

List all resource definitions by group

Link to this section Functions

Link to this function

api_paths(cluster_name, opts \\ [])

Get a map of API type to groups

Examples

iex> K8s.Discovery.api_paths(:test)
%{"/api" => ["v1"], "/apis" => ["apps/v1", "batch/v1"]}
Link to this function

resource_definitions_by_group(cluster_name, opts \\ [])

List all resource definitions by group

Examples

iex> K8s.Discovery.resource_definitions_by_group(:test)
[%{"apiVersion" => "v1", "groupVersion" => "apps/v1", "kind" => "APIResourceList", "resources" => [%{"kind" => "DaemonSet", "name" => "daemonsets", "namespaced" => true, "verbs" => ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]}, %{"kind" => "Deployment", "name" => "deployments", "namespaced" => true, "verbs" => ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]}]}, %{"apiVersion" => "v1", "groupVersion" => "batch/v1", "kind" => "APIResourceList", "resources" => [%{"kind" => "Job", "name" => "jobs", "namespaced" => true, "verbs" => ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"]}]}, %{"groupVersion" => "v1", "kind" => "APIResourceList", "resources" => [%{"kind" => "Namespace", "name" => "namespaces", "namespaced" => false, "verbs" => ["create", "delete", "get", "list", "patch", "update", "watch"]}]}]