Documentation ¶
Index ¶
- func GetEndpointsLabels(cfg *APIConfig) ([]map[string]string, error)
- func GetIngressesLabels(cfg *APIConfig) ([]map[string]string, error)
- func GetNodesLabels(cfg *APIConfig) ([]map[string]string, error)
- func GetPodsLabels(cfg *APIConfig) ([]map[string]string, error)
- func GetServicesLabels(cfg *APIConfig) ([]map[string]string, error)
- type APIConfig
- type Container
- type ContainerPort
- type DaemonEndpoint
- type EndpointAddress
- type EndpointPort
- type EndpointSubset
- type Endpoints
- type EndpointsList
- type HTTPIngressPath
- type HTTPIngressRuleValue
- type Ingress
- type IngressList
- type IngressRule
- type IngressSpec
- type IngressTLS
- type Node
- type NodeAddress
- type NodeDaemonEndpoints
- type NodeList
- type NodeStatus
- type ObjectMeta
- type ObjectReference
- type OwnerReference
- type Pod
- type PodCondition
- type PodList
- type PodSpec
- type PodStatus
- type Selector
- type Service
- type ServiceList
- type ServicePort
- type ServiceSpec
- type SortedLabels
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEndpointsLabels ¶
GetEndpointsLabels returns labels for k8s endpoints obtained from the given apiServer
func GetIngressesLabels ¶
GetIngressesLabels returns labels for k8s ingresses obtained from the given apiServer
func GetNodesLabels ¶
GetNodesLabels returns labels for k8s nodes obtained from the given apiServer.
func GetPodsLabels ¶
GetPodsLabels returns labels for k8s pods obtained from the given apiServer
Types ¶
type APIConfig ¶
type APIConfig struct { Server string AuthConfig *promauth.Config Namespaces []string Selectors []Selector }
APIConfig contains config for API server
type Container ¶
type Container struct { Name string Ports []ContainerPort }
Container implements k8s container.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#container-v1-core
type ContainerPort ¶
ContainerPort implements k8s container port.
type DaemonEndpoint ¶
type DaemonEndpoint struct {
Port int
}
DaemonEndpoint represents DaemonEndpoint from k8s API.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#daemonendpoint-v1-core
type EndpointAddress ¶
type EndpointAddress struct { Hostname string IP string NodeName string TargetRef ObjectReference }
EndpointAddress implements k8s endpoint address.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#endpointaddress-v1-core
type EndpointPort ¶
EndpointPort implements k8s endpoint port.
type EndpointSubset ¶
type EndpointSubset struct { Addresses []EndpointAddress NotReadyAddresses []EndpointAddress Ports []EndpointPort }
EndpointSubset implements k8s endpoint subset.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#endpointsubset-v1-core
type Endpoints ¶
type Endpoints struct { Metadata ObjectMeta Subsets []EndpointSubset }
Endpoints implements k8s endpoints.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#endpoints-v1-core
type EndpointsList ¶
type EndpointsList struct {
Items []Endpoints
}
EndpointsList implements k8s endpoints list.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#endpointslist-v1-core
type HTTPIngressPath ¶
type HTTPIngressPath struct {
Path string
}
HTTPIngressPath represents HTTP ingress path in k8s.
type HTTPIngressRuleValue ¶
type HTTPIngressRuleValue struct {
Paths []HTTPIngressPath
}
HTTPIngressRuleValue represents HTTP ingress rule value in k8s.
type Ingress ¶
type Ingress struct { Metadata ObjectMeta Spec IngressSpec }
Ingress represents ingress in k8s.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#ingress-v1beta1-extensions
type IngressList ¶
type IngressList struct {
Items []Ingress
}
IngressList represents ingress list in k8s.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#ingresslist-v1beta1-extensions
type IngressRule ¶
type IngressRule struct { Host string HTTP HTTPIngressRuleValue `json:"http"` }
IngressRule represents ingress rule in k8s.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#ingressrule-v1beta1-extensions
type IngressSpec ¶
type IngressSpec struct { TLS []IngressTLS `json:"tls"` Rules []IngressRule }
IngressSpec represents ingress spec in k8s.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#ingressspec-v1beta1-extensions
type IngressTLS ¶
type IngressTLS struct {
Hosts []string
}
IngressTLS represents ingress TLS spec in k8s.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#ingresstls-v1beta1-extensions
type Node ¶
type Node struct { Metadata ObjectMeta Status NodeStatus }
Node represents Node from k8s API.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#node-v1-core
type NodeAddress ¶
NodeAddress represents NodeAddress from k8s API.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#nodeaddress-v1-core
type NodeDaemonEndpoints ¶
type NodeDaemonEndpoints struct {
KubeletEndpoint DaemonEndpoint
}
NodeDaemonEndpoints represents NodeDaemonEndpoints from k8s API.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#nodedaemonendpoints-v1-core
type NodeList ¶
type NodeList struct {
Items []Node
}
NodeList represents NodeList from k8s API.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#nodelist-v1-core
type NodeStatus ¶
type NodeStatus struct { Addresses []NodeAddress DaemonEndpoints NodeDaemonEndpoints }
NodeStatus represents NodeStatus from k8s API.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#nodestatus-v1-core
type ObjectMeta ¶
type ObjectMeta struct { Name string Namespace string UID string Labels SortedLabels Annotations SortedLabels OwnerReferences []OwnerReference }
ObjectMeta represents ObjectMeta from k8s API.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#objectmeta-v1-meta
type ObjectReference ¶
ObjectReference implements k8s object reference.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#objectreference-v1-core
type OwnerReference ¶
OwnerReference represents OwnerReferense from k8s API.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#ownerreference-v1-meta
type Pod ¶
type Pod struct { Metadata ObjectMeta Spec PodSpec Status PodStatus }
Pod implements k8s pod.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#pod-v1-core
type PodCondition ¶
PodCondition implements k8s pod condition.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#podcondition-v1-core
type PodList ¶
type PodList struct {
Items []Pod
}
PodList implements k8s pod list.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#podlist-v1-core
type PodSpec ¶
PodSpec implements k8s pod spec.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#podspec-v1-core
type PodStatus ¶
type PodStatus struct { Phase string PodIP string HostIP string Conditions []PodCondition }
PodStatus implements k8s pod status.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#podstatus-v1-core
type Selector ¶
type Selector struct { Role string `yaml:"role"` Label string `yaml:"label"` Field string `yaml:"field"` }
Selector represents kubernetes selector.
See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/ and https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
type Service ¶
type Service struct { Metadata ObjectMeta Spec ServiceSpec }
Service is k8s service.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#service-v1-core
type ServiceList ¶
type ServiceList struct {
Items []Service
}
ServiceList is k8s service list.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#servicelist-v1-core
type ServicePort ¶
ServicePort is k8s service port.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#serviceport-v1-core
type ServiceSpec ¶
type ServiceSpec struct { ClusterIP string ExternalName string Type string Ports []ServicePort }
ServiceSpec is k8s service spec.
See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#servicespec-v1-core
type SortedLabels ¶
type SortedLabels []prompbmarshal.Label
SortedLabels represents sorted labels.
func (*SortedLabels) UnmarshalJSON ¶
func (sls *SortedLabels) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals JSON from data.