v1alpha1

package
v0.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Index

Constants

View Source
const (
	Version = "v1alpha1"
)

Variables

View Source
var (
	// SchemeBuilder initializes a scheme builder.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a global function that registers this API group & version to a scheme.
	AddToScheme = SchemeBuilder.AddToScheme
	// SchemeGroupVersion is group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: monitoring.GroupName, Version: Version}
)

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind.

func PodMonitoringResource

func PodMonitoringResource() metav1.GroupVersionResource

PodMonitoringResource returns a PodMonitoring GroupVersionResource. This can be used to enforce API types.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource.

Types

type LabelMapping

type LabelMapping struct {
	// Kubenetes resource label to remap.
	From string `json:"from"`
	// Remapped Prometheus target label.
	// Defaults to the same name as `From`.
	To string `json:"to,omitempty"`
}

LabelMapping specifies how to transfer a label from a Kubernetes resource onto a Prometheus target.

func (*LabelMapping) DeepCopy

func (in *LabelMapping) DeepCopy() *LabelMapping

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelMapping.

func (*LabelMapping) DeepCopyInto

func (in *LabelMapping) DeepCopyInto(out *LabelMapping)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MonitoringCondition

type MonitoringCondition struct {
	Type MonitoringConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	// +optional
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty"`
	// A human-readable message indicating details about the transition.
	// +optional
	Message string `json:"message,omitempty"`
}

func NewDefaultConditions

func NewDefaultConditions(now metav1.Time) []MonitoringCondition

NewDefaultConditions returns a list of default conditions for at the given time for a `PodMonitoringStatus` if never explicitly set.

func (*MonitoringCondition) DeepCopy

func (in *MonitoringCondition) DeepCopy() *MonitoringCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitoringCondition.

func (*MonitoringCondition) DeepCopyInto

func (in *MonitoringCondition) DeepCopyInto(out *MonitoringCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MonitoringConditionType

type MonitoringConditionType string

MonitoringConditionType is the type of MonitoringCondition.

const (
	// ConfigurationCreateSuccess indicates that the config generated from the
	// monitoring resource was created successfully.
	ConfigurationCreateSuccess MonitoringConditionType = "ConfigurationCreateSuccess"
)

type PodMonitoring

type PodMonitoring struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Specification of desired Pod selection for target discovery by
	// Prometheus.
	Spec PodMonitoringSpec `json:"spec"`
	// Most recently observed status of the resource.
	// +optional
	Status PodMonitoringStatus `json:"status"`
}

PodMonitoring defines monitoring for a set of pods. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*PodMonitoring) DeepCopy

func (in *PodMonitoring) DeepCopy() *PodMonitoring

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMonitoring.

func (*PodMonitoring) DeepCopyInto

func (in *PodMonitoring) DeepCopyInto(out *PodMonitoring)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodMonitoring) DeepCopyObject

func (in *PodMonitoring) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PodMonitoringList

type PodMonitoringList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PodMonitoring `json:"items"`
}

PodMonitoringList is a list of PodMonitorings. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*PodMonitoringList) DeepCopy

func (in *PodMonitoringList) DeepCopy() *PodMonitoringList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMonitoringList.

func (*PodMonitoringList) DeepCopyInto

func (in *PodMonitoringList) DeepCopyInto(out *PodMonitoringList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodMonitoringList) DeepCopyObject

func (in *PodMonitoringList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PodMonitoringSpec

type PodMonitoringSpec struct {
	Selector     metav1.LabelSelector `json:"selector"`
	Endpoints    []ScrapeEndpoint     `json:"endpoints"`
	TargetLabels TargetLabels         `json:"targetLabels,omitempty"`
}

PodMonitoringSpec contains specification parameters for PodMonitoring.

func (*PodMonitoringSpec) DeepCopy

func (in *PodMonitoringSpec) DeepCopy() *PodMonitoringSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMonitoringSpec.

func (*PodMonitoringSpec) DeepCopyInto

func (in *PodMonitoringSpec) DeepCopyInto(out *PodMonitoringSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodMonitoringStatus

type PodMonitoringStatus struct {
	// The generation observed by the controller.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration"`
	// Represents the latest available observations of a podmonitor's current state.
	Conditions []MonitoringCondition `json:"conditions,omitempty"`
}

func (*PodMonitoringStatus) DeepCopy

func (in *PodMonitoringStatus) DeepCopy() *PodMonitoringStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMonitoringStatus.

func (*PodMonitoringStatus) DeepCopyInto

func (in *PodMonitoringStatus) DeepCopyInto(out *PodMonitoringStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ScrapeEndpoint

type ScrapeEndpoint struct {
	// Name or number of the port to scrape.
	Port intstr.IntOrString `json:"port,omitempty"`
	// HTTP path to scrape metrics from. Defaults to "/metrics".
	Path string `json:"path,omitempty"`
	// Interval at which to scrape metrics. Must be a valid Prometheus duration.
	Interval string `json:"interval,omitempty"`
	// Timeout for metrics scrapes. Must be a valid Prometheus duration.
	Timeout string `json:"timeout,omitempty"`
}

ScrapeEndpoint specifies a Prometheus metrics endpoint to scrape.

func (*ScrapeEndpoint) DeepCopy

func (in *ScrapeEndpoint) DeepCopy() *ScrapeEndpoint

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScrapeEndpoint.

func (*ScrapeEndpoint) DeepCopyInto

func (in *ScrapeEndpoint) DeepCopyInto(out *ScrapeEndpoint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TargetLabels

type TargetLabels struct {
	// Labels to transfer from the Kubernetes Pod to Prometheus target labels.
	// In the case of a label mapping conflict:
	// - Mappings at the end of the array take precedence.
	FromPod []LabelMapping `json:"fromPod,omitempty"`
}

TargetLabels groups label mappings by Kubernetes resource.

func (*TargetLabels) DeepCopy

func (in *TargetLabels) DeepCopy() *TargetLabels

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetLabels.

func (*TargetLabels) DeepCopyInto

func (in *TargetLabels) DeepCopyInto(out *TargetLabels)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL