Documentation ¶
Index ¶
- Constants
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func SetConfigDefaults(apiGroup string, config *rest.Config)
- func UnstructuredFromAlertmanager(a *Alertmanager) (*unstructured.Unstructured, error)
- func UnstructuredFromPrometheus(p *Prometheus) (*unstructured.Unstructured, error)
- func UnstructuredFromServiceMonitor(s *ServiceMonitor) (*unstructured.Unstructured, error)
- type AlertingSpec
- type Alertmanager
- type AlertmanagerEndpoints
- type AlertmanagerInterface
- type AlertmanagerList
- type AlertmanagerSpec
- type AlertmanagerStatus
- type AlertmanagersGetter
- type BasicAuth
- type CrdKind
- type CrdKinds
- type Endpoint
- type MonitoringV1Client
- func (c *MonitoringV1Client) Alertmanagers(namespace string) AlertmanagerInterface
- func (c *MonitoringV1Client) Prometheuses(namespace string) PrometheusInterface
- func (c *MonitoringV1Client) RESTClient() rest.Interface
- func (c *MonitoringV1Client) ServiceMonitors(namespace string) ServiceMonitorInterface
- type MonitoringV1Interface
- type NamespaceSelector
- type Prometheus
- type PrometheusInterface
- type PrometheusList
- type PrometheusSpec
- type PrometheusStatus
- type PrometheusesGetter
- type RelabelConfig
- type RemoteReadSpec
- type RemoteWriteSpec
- type ServiceMonitor
- type ServiceMonitorInterface
- type ServiceMonitorList
- type ServiceMonitorSpec
- type ServiceMonitorsGetter
- type StorageSpec
- type TLSConfig
Constants ¶
const ( AlertmanagersKind = "Alertmanager" AlertmanagerName = "alertmanagers" )
const ( Group = "monitoring.coreos.com" PrometheusKindKey = "prometheus" AlertManagerKindKey = "alertmanager" ServiceMonitorKindKey = "servicemonitor" )
const ( PrometheusesKind = "Prometheus" PrometheusName = "prometheuses" )
const ( ServiceMonitorsKind = "ServiceMonitor" ServiceMonitorName = "servicemonitors" )
Variables ¶
var Version = "v1"
Functions ¶
func GetOpenAPIDefinitions ¶ added in v0.17.0
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
func SetConfigDefaults ¶
func UnstructuredFromAlertmanager ¶
func UnstructuredFromAlertmanager(a *Alertmanager) (*unstructured.Unstructured, error)
UnstructuredFromAlertmanager marshals an Alertmanager object into dynamic client's unstructured
func UnstructuredFromPrometheus ¶
func UnstructuredFromPrometheus(p *Prometheus) (*unstructured.Unstructured, error)
UnstructuredFromPrometheus marshals a Prometheus object into dynamic client's unstructured
func UnstructuredFromServiceMonitor ¶
func UnstructuredFromServiceMonitor(s *ServiceMonitor) (*unstructured.Unstructured, error)
UnstructuredFromServiceMonitor marshals a ServiceMonitor object into dynamic client's unstructured
Types ¶
type AlertingSpec ¶
type AlertingSpec struct { // AlertmanagerEndpoints Prometheus should fire alerts against. Alertmanagers []AlertmanagerEndpoints `json:"alertmanagers"` }
AlertingSpec defines parameters for alerting configuration of Prometheus servers. +k8s:openapi-gen=true
func (*AlertingSpec) DeepCopy ¶ added in v0.16.0
func (in *AlertingSpec) DeepCopy() *AlertingSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertingSpec.
func (*AlertingSpec) DeepCopyInto ¶ added in v0.16.0
func (in *AlertingSpec) DeepCopyInto(out *AlertingSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Alertmanager ¶
type Alertmanager struct { metav1.TypeMeta `json:",inline"` // Standard object’s metadata. More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata // +k8s:openapi-gen=false metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of the desired behavior of the Alertmanager cluster. More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status Spec AlertmanagerSpec `json:"spec"` // Most recent observed status of the Alertmanager cluster. Read-only. Not // included when requesting from the apiserver, only from the Prometheus // Operator API itself. More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status Status *AlertmanagerStatus `json:"status,omitempty"` }
Describes an Alertmanager cluster. +k8s:openapi-gen=true
func AlertmanagerFromUnstructured ¶
func AlertmanagerFromUnstructured(r *unstructured.Unstructured) (*Alertmanager, error)
AlertmanagerFromUnstructured unmarshals an Alertmanager object from dynamic client's unstructured
func (*Alertmanager) DeepCopy ¶ added in v0.16.0
func (in *Alertmanager) DeepCopy() *Alertmanager
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Alertmanager.
func (*Alertmanager) DeepCopyInto ¶ added in v0.16.0
func (in *Alertmanager) DeepCopyInto(out *Alertmanager)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Alertmanager) DeepCopyObject ¶ added in v0.16.0
func (l *Alertmanager) DeepCopyObject() runtime.Object
type AlertmanagerEndpoints ¶
type AlertmanagerEndpoints struct { // Namespace of Endpoints object. Namespace string `json:"namespace"` // Name of Endpoints object in Namespace. Name string `json:"name"` // Port the Alertmanager API is exposed on. Port intstr.IntOrString `json:"port"` // Scheme to use when firing alerts. Scheme string `json:"scheme,omitempty"` // Prefix for the HTTP path alerts are pushed to. PathPrefix string `json:"pathPrefix,omitempty"` // TLS Config to use for alertmanager connection. TLSConfig *TLSConfig `json:"tlsConfig,omitempty"` // BearerTokenFile to read from filesystem to use when authenticating to // Alertmanager. BearerTokenFile string `json:"bearerTokenFile,omitempty"` }
AlertmanagerEndpoints defines a selection of a single Endpoints object containing alertmanager IPs to fire alerts against. +k8s:openapi-gen=true
func (*AlertmanagerEndpoints) DeepCopy ¶ added in v0.16.0
func (in *AlertmanagerEndpoints) DeepCopy() *AlertmanagerEndpoints
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerEndpoints.
func (*AlertmanagerEndpoints) DeepCopyInto ¶ added in v0.16.0
func (in *AlertmanagerEndpoints) DeepCopyInto(out *AlertmanagerEndpoints)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AlertmanagerInterface ¶
type AlertmanagerInterface interface { Create(*Alertmanager) (*Alertmanager, error) Get(name string, opts metav1.GetOptions) (*Alertmanager, error) Update(*Alertmanager) (*Alertmanager, error) Delete(name string, options *metav1.DeleteOptions) error List(opts metav1.ListOptions) (runtime.Object, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(dopts *metav1.DeleteOptions, lopts metav1.ListOptions) error }
type AlertmanagerList ¶
type AlertmanagerList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty"` // List of Alertmanagers Items []Alertmanager `json:"items"` }
A list of Alertmanagers. +k8s:openapi-gen=true
func (*AlertmanagerList) DeepCopy ¶ added in v0.16.0
func (in *AlertmanagerList) DeepCopy() *AlertmanagerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerList.
func (*AlertmanagerList) DeepCopyInto ¶ added in v0.16.0
func (in *AlertmanagerList) DeepCopyInto(out *AlertmanagerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AlertmanagerList) DeepCopyObject ¶ added in v0.16.0
func (l *AlertmanagerList) DeepCopyObject() runtime.Object
type AlertmanagerSpec ¶
type AlertmanagerSpec struct { // Standard object’s metadata. More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata // Metadata Labels and Annotations gets propagated to the prometheus pods. PodMetadata *metav1.ObjectMeta `json:"podMetadata,omitempty"` // Version the cluster should be on. Version string `json:"version,omitempty"` // Base image that is used to deploy pods, without tag. BaseImage string `json:"baseImage,omitempty"` // An optional list of references to secrets in the same namespace // to use for pulling prometheus and alertmanager images from registries // see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"` // Secrets is a list of Secrets in the same namespace as the Alertmanager // object, which shall be mounted into the Alertmanager Pods. // The Secrets are mounted into /etc/alertmanager/secrets/<secret-name>. Secrets []string `json:"secrets,omitempty"` // Size is the expected size of the alertmanager cluster. The controller will // eventually make the size of the running cluster equal to the expected // size. Replicas *int32 `json:"replicas,omitempty"` // Storage is the definition of how storage will be used by the Alertmanager // instances. Storage *StorageSpec `json:"storage,omitempty"` // The external URL the Alertmanager instances will be available under. This is // necessary to generate correct URLs. This is necessary if Alertmanager is not // served from root of a DNS name. ExternalURL string `json:"externalUrl,omitempty"` // The route prefix Alertmanager registers HTTP handlers for. This is useful, // if using ExternalURL and a proxy is rewriting HTTP routes of a request, // and the actual ExternalURL is still true, but the server serves requests // under a different route prefix. For example for use with `kubectl proxy`. RoutePrefix string `json:"routePrefix,omitempty"` // If set to true all actions on the underlaying managed objects are not // goint to be performed, except for delete actions. Paused bool `json:"paused,omitempty"` // Define which Nodes the Pods are scheduled on. NodeSelector map[string]string `json:"nodeSelector,omitempty"` // Define resources requests and limits for single Pods. Resources v1.ResourceRequirements `json:"resources,omitempty"` // If specified, the pod's scheduling constraints. Affinity *v1.Affinity `json:"affinity,omitempty"` // If specified, the pod's tolerations. Tolerations []v1.Toleration `json:"tolerations,omitempty"` // SecurityContext holds pod-level security attributes and common container settings. // This defaults to non root user with uid 1000 and gid 2000. SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` // ServiceAccountName is the name of the ServiceAccount to use to run the // Prometheus Pods. ServiceAccountName string `json:"serviceAccountName,omitempty"` // ListenLocal makes the Alertmanager server listen on loopback, so that it // does not bind against the Pod IP. Note this is only for the Alertmanager // UI, not the gossip communication. ListenLocal bool `json:"listenLocal,omitempty"` // Containers allows injecting additional containers. This is meant to // allow adding an authentication proxy to an Alertmanager pod. Containers []v1.Container `json:"containers,omitempty"` }
Specification of the desired behavior of the Alertmanager cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status +k8s:openapi-gen=true
func (*AlertmanagerSpec) DeepCopy ¶ added in v0.16.0
func (in *AlertmanagerSpec) DeepCopy() *AlertmanagerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerSpec.
func (*AlertmanagerSpec) DeepCopyInto ¶ added in v0.16.0
func (in *AlertmanagerSpec) DeepCopyInto(out *AlertmanagerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AlertmanagerStatus ¶
type AlertmanagerStatus struct { // Represents whether any actions on the underlaying managed objects are // being performed. Only delete actions will be performed. Paused bool `json:"paused"` // Total number of non-terminated pods targeted by this Alertmanager // cluster (their labels match the selector). Replicas int32 `json:"replicas"` // Total number of non-terminated pods targeted by this Alertmanager // cluster that have the desired version spec. UpdatedReplicas int32 `json:"updatedReplicas"` // Total number of available pods (ready for at least minReadySeconds) // targeted by this Alertmanager cluster. AvailableReplicas int32 `json:"availableReplicas"` UnavailableReplicas int32 `json:"unavailableReplicas"` }
Most recent observed status of the Alertmanager cluster. Read-only. Not included when requesting from the apiserver, only from the Prometheus Operator API itself. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status +k8s:openapi-gen=true
func (*AlertmanagerStatus) DeepCopy ¶ added in v0.16.0
func (in *AlertmanagerStatus) DeepCopy() *AlertmanagerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerStatus.
func (*AlertmanagerStatus) DeepCopyInto ¶ added in v0.16.0
func (in *AlertmanagerStatus) DeepCopyInto(out *AlertmanagerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AlertmanagersGetter ¶
type AlertmanagersGetter interface {
Alertmanagers(namespace string) AlertmanagerInterface
}
type BasicAuth ¶
type BasicAuth struct { // The secret that contains the username for authenticate Username v1.SecretKeySelector `json:"username,omitempty"` // The secret that contains the password for authenticate Password v1.SecretKeySelector `json:"password,omitempty"` }
BasicAuth allow an endpoint to authenticate over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints +k8s:openapi-gen=true
func (*BasicAuth) DeepCopy ¶ added in v0.16.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuth.
func (*BasicAuth) DeepCopyInto ¶ added in v0.16.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CrdKind ¶ added in v0.15.0
func (*CrdKind) DeepCopy ¶ added in v0.16.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrdKind.
func (*CrdKind) DeepCopyInto ¶ added in v0.16.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CrdKinds ¶ added in v0.15.0
type CrdKinds struct { KindsString string Prometheus CrdKind Alertmanager CrdKind ServiceMonitor CrdKind }
var DefaultCrdKinds CrdKinds = CrdKinds{ KindsString: "", Prometheus: CrdKind{Plural: PrometheusName, Kind: PrometheusesKind, SpecName: "github.com/coreos/prometheus-operator/pkg/client/monitoring/v1.Prometheus"}, ServiceMonitor: CrdKind{Plural: ServiceMonitorName, Kind: ServiceMonitorsKind, SpecName: "github.com/coreos/prometheus-operator/pkg/client/monitoring/v1.ServiceMonitor"}, Alertmanager: CrdKind{Plural: AlertmanagerName, Kind: AlertmanagersKind, SpecName: "github.com/coreos/prometheus-operator/pkg/client/monitoring/v1.Alertmanager"}, }
func (*CrdKinds) DeepCopy ¶ added in v0.16.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrdKinds.
func (*CrdKinds) DeepCopyInto ¶ added in v0.16.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Endpoint ¶
type Endpoint struct { // Name of the service port this endpoint refers to. Mutually exclusive with targetPort. Port string `json:"port,omitempty"` // Name or number of the target port of the endpoint. Mutually exclusive with port. TargetPort intstr.IntOrString `json:"targetPort,omitempty"` // HTTP path to scrape for metrics. Path string `json:"path,omitempty"` // HTTP scheme to use for scraping. Scheme string `json:"scheme,omitempty"` // Optional HTTP URL parameters Params map[string][]string `json:"params,omitempty"` // Interval at which metrics should be scraped Interval string `json:"interval,omitempty"` // Timeout after which the scrape is ended ScrapeTimeout string `json:"scrapeTimeout,omitempty"` // TLS configuration to use when scraping the endpoint TLSConfig *TLSConfig `json:"tlsConfig,omitempty"` // File to read bearer token for scraping targets. BearerTokenFile string `json:"bearerTokenFile,omitempty"` // HonorLabels chooses the metric's labels on collisions with target labels. HonorLabels bool `json:"honorLabels,omitempty"` // BasicAuth allow an endpoint to authenticate over basic authentication // More info: https://prometheus.io/docs/operating/configuration/#endpoints BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // MetricRelabelConfigs to apply to samples before ingestion. MetricRelabelConfigs []*RelabelConfig `json:"metricRelabelings,omitempty"` }
Endpoint defines a scrapeable endpoint serving Prometheus metrics. +k8s:openapi-gen=true
func (*Endpoint) DeepCopy ¶ added in v0.16.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint.
func (*Endpoint) DeepCopyInto ¶ added in v0.16.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MonitoringV1Client ¶
type MonitoringV1Client struct {
// contains filtered or unexported fields
}
+k8s:deepcopy-gen=false
func NewForConfig ¶
func (*MonitoringV1Client) Alertmanagers ¶
func (c *MonitoringV1Client) Alertmanagers(namespace string) AlertmanagerInterface
func (*MonitoringV1Client) Prometheuses ¶
func (c *MonitoringV1Client) Prometheuses(namespace string) PrometheusInterface
func (*MonitoringV1Client) RESTClient ¶
func (c *MonitoringV1Client) RESTClient() rest.Interface
func (*MonitoringV1Client) ServiceMonitors ¶
func (c *MonitoringV1Client) ServiceMonitors(namespace string) ServiceMonitorInterface
type MonitoringV1Interface ¶
type MonitoringV1Interface interface { RESTClient() rest.Interface PrometheusesGetter AlertmanagersGetter ServiceMonitorsGetter }
type NamespaceSelector ¶
type NamespaceSelector struct { // Boolean describing whether all namespaces are selected in contrast to a // list restricting them. Any bool `json:"any,omitempty"` // List of namespace names. MatchNames []string `json:"matchNames,omitempty"` }
A selector for selecting namespaces either selecting all namespaces or a list of namespaces. +k8s:openapi-gen=true
func (*NamespaceSelector) DeepCopy ¶ added in v0.16.0
func (in *NamespaceSelector) DeepCopy() *NamespaceSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceSelector.
func (*NamespaceSelector) DeepCopyInto ¶ added in v0.16.0
func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Prometheus ¶
type Prometheus struct { metav1.TypeMeta `json:",inline"` // Standard object’s metadata. More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata // +k8s:openapi-gen=false metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of the desired behavior of the Prometheus cluster. More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status Spec PrometheusSpec `json:"spec"` // Most recent observed status of the Prometheus cluster. Read-only. Not // included when requesting from the apiserver, only from the Prometheus // Operator API itself. More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status Status *PrometheusStatus `json:"status,omitempty"` }
Prometheus defines a Prometheus deployment. +k8s:openapi-gen=true
func PrometheusFromUnstructured ¶
func PrometheusFromUnstructured(r *unstructured.Unstructured) (*Prometheus, error)
PrometheusFromUnstructured unmarshals a Prometheus object from dynamic client's unstructured
func (*Prometheus) DeepCopy ¶ added in v0.16.0
func (in *Prometheus) DeepCopy() *Prometheus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Prometheus.
func (*Prometheus) DeepCopyInto ¶ added in v0.16.0
func (in *Prometheus) DeepCopyInto(out *Prometheus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Prometheus) DeepCopyObject ¶ added in v0.16.0
func (l *Prometheus) DeepCopyObject() runtime.Object
type PrometheusInterface ¶
type PrometheusInterface interface { Create(*Prometheus) (*Prometheus, error) Get(name string, opts metav1.GetOptions) (*Prometheus, error) Update(*Prometheus) (*Prometheus, error) Delete(name string, options *metav1.DeleteOptions) error List(opts metav1.ListOptions) (runtime.Object, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(dopts *metav1.DeleteOptions, lopts metav1.ListOptions) error }
type PrometheusList ¶
type PrometheusList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty"` // List of Prometheuses Items []*Prometheus `json:"items"` }
PrometheusList is a list of Prometheuses. +k8s:openapi-gen=true
func (*PrometheusList) DeepCopy ¶ added in v0.16.0
func (in *PrometheusList) DeepCopy() *PrometheusList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusList.
func (*PrometheusList) DeepCopyInto ¶ added in v0.16.0
func (in *PrometheusList) DeepCopyInto(out *PrometheusList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PrometheusList) DeepCopyObject ¶ added in v0.16.0
func (l *PrometheusList) DeepCopyObject() runtime.Object
type PrometheusSpec ¶
type PrometheusSpec struct { // Standard object’s metadata. More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata // Metadata Labels and Annotations gets propagated to the prometheus pods. PodMetadata *metav1.ObjectMeta `json:"podMetadata,omitempty"` // ServiceMonitors to be selected for target discovery. ServiceMonitorSelector *metav1.LabelSelector `json:"serviceMonitorSelector,omitempty"` // Version of Prometheus to be deployed. Version string `json:"version,omitempty"` // When a Prometheus deployment is paused, no actions except for deletion // will be performed on the underlying objects. Paused bool `json:"paused,omitempty"` // Base image to use for a Prometheus deployment. BaseImage string `json:"baseImage,omitempty"` // An optional list of references to secrets in the same namespace // to use for pulling prometheus and alertmanager images from registries // see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"` // Number of instances to deploy for a Prometheus deployment. Replicas *int32 `json:"replicas,omitempty"` // Time duration Prometheus shall retain data for. Retention string `json:"retention,omitempty"` // Log level for Prometheus be configured in. LogLevel string `json:"logLevel,omitempty"` // Interval between consecutive scrapes. ScrapeInterval string `json:"scrapeInterval,omitempty"` // Interval between consecutive evaluations. EvaluationInterval string `json:"evaluationInterval,omitempty"` // The labels to add to any time series or alerts when communicating with // external systems (federation, remote storage, Alertmanager). ExternalLabels map[string]string `json:"externalLabels,omitempty"` // The external URL the Prometheus instances will be available under. This is // necessary to generate correct URLs. This is necessary if Prometheus is not // served from root of a DNS name. ExternalURL string `json:"externalUrl,omitempty"` // The route prefix Prometheus registers HTTP handlers for. This is useful, // if using ExternalURL and a proxy is rewriting HTTP routes of a request, // and the actual ExternalURL is still true, but the server serves requests // under a different route prefix. For example for use with `kubectl proxy`. RoutePrefix string `json:"routePrefix,omitempty"` // Storage spec to specify how storage shall be used. Storage *StorageSpec `json:"storage,omitempty"` // A selector to select which ConfigMaps to mount for loading rule files from. RuleSelector *metav1.LabelSelector `json:"ruleSelector,omitempty"` // Define details regarding alerting. Alerting *AlertingSpec `json:"alerting,omitempty"` // Define resources requests and limits for single Pods. Resources v1.ResourceRequirements `json:"resources,omitempty"` // Define which Nodes the Pods are scheduled on. NodeSelector map[string]string `json:"nodeSelector,omitempty"` // ServiceAccountName is the name of the ServiceAccount to use to run the // Prometheus Pods. ServiceAccountName string `json:"serviceAccountName,omitempty"` // Secrets is a list of Secrets in the same namespace as the Prometheus // object, which shall be mounted into the Prometheus Pods. // The Secrets are mounted into /etc/prometheus/secrets/<secret-name>. // Secrets changes after initial creation of a Prometheus object are not // reflected in the running Pods. To change the secrets mounted into the // Prometheus Pods, the object must be deleted and recreated with the new list // of secrets. Secrets []string `json:"secrets,omitempty"` // If specified, the pod's scheduling constraints. Affinity *v1.Affinity `json:"affinity,omitempty"` // If specified, the pod's tolerations. Tolerations []v1.Toleration `json:"tolerations,omitempty"` // If specified, the remote_write spec. This is an experimental feature, it may change in any upcoming release in a breaking way. RemoteWrite []RemoteWriteSpec `json:"remoteWrite,omitempty"` // If specified, the remote_read spec. This is an experimental feature, it may change in any upcoming release in a breaking way. RemoteRead []RemoteReadSpec `json:"remoteRead,omitempty"` // SecurityContext holds pod-level security attributes and common container settings. // This defaults to non root user with uid 1000 and gid 2000 for Prometheus >v2.0 and // default PodSecurityContext for other versions. SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` // ListenLocal makes the Prometheus server listen on loopback, so that it // does not bind against the Pod IP. ListenLocal bool `json:"listenLocal,omitempty"` // Containers allows injecting additional containers. This is meant to // allow adding an authentication proxy to a Prometheus pod. Containers []v1.Container `json:"containers,omitempty"` }
Specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status +k8s:openapi-gen=true
func (*PrometheusSpec) DeepCopy ¶ added in v0.16.0
func (in *PrometheusSpec) DeepCopy() *PrometheusSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusSpec.
func (*PrometheusSpec) DeepCopyInto ¶ added in v0.16.0
func (in *PrometheusSpec) DeepCopyInto(out *PrometheusSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrometheusStatus ¶
type PrometheusStatus struct { // Represents whether any actions on the underlaying managed objects are // being performed. Only delete actions will be performed. Paused bool `json:"paused"` // Total number of non-terminated pods targeted by this Prometheus deployment // (their labels match the selector). Replicas int32 `json:"replicas"` // Total number of non-terminated pods targeted by this Prometheus deployment // that have the desired version spec. UpdatedReplicas int32 `json:"updatedReplicas"` // Total number of available pods (ready for at least minReadySeconds) // targeted by this Prometheus deployment. AvailableReplicas int32 `json:"availableReplicas"` UnavailableReplicas int32 `json:"unavailableReplicas"` }
Most recent observed status of the Prometheus cluster. Read-only. Not included when requesting from the apiserver, only from the Prometheus Operator API itself. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status +k8s:openapi-gen=true
func (*PrometheusStatus) DeepCopy ¶ added in v0.16.0
func (in *PrometheusStatus) DeepCopy() *PrometheusStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusStatus.
func (*PrometheusStatus) DeepCopyInto ¶ added in v0.16.0
func (in *PrometheusStatus) DeepCopyInto(out *PrometheusStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrometheusesGetter ¶
type PrometheusesGetter interface {
Prometheuses(namespace string) PrometheusInterface
}
type RelabelConfig ¶ added in v0.16.0
type RelabelConfig struct { //The source labels select values from existing labels. Their content is concatenated //using the configured separator and matched against the configured regular expression //for the replace, keep, and drop actions. SourceLabels []string `json:"sourceLabels,omitempty"` //Separator placed between concatenated source label values. default is ';'. Separator string `json:"separator,omitempty"` //Label to which the resulting value is written in a replace action. //It is mandatory for replace actions. Regex capture groups are available. TargetLabel string `json:"targetLabel,omitempty"` //Regular expression against which the extracted value is matched. defailt is '(.*)' Regex string `json:"regex,omitempty"` // Modulus to take of the hash of the source label values. Modulus uint64 `json:"modulus,omitempty"` //Replacement value against which a regex replace is performed if the //regular expression matches. Regex capture groups are available. Default is '$1' Replacement string `json:"replacement,omitempty"` // Action to perform based on regex matching. Default is 'replace' Action string `json:"action,omitempty"` }
RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines `<metric_relabel_configs>`-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs +k8s:openapi-gen=true
func (*RelabelConfig) DeepCopy ¶ added in v0.16.0
func (in *RelabelConfig) DeepCopy() *RelabelConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RelabelConfig.
func (*RelabelConfig) DeepCopyInto ¶ added in v0.16.0
func (in *RelabelConfig) DeepCopyInto(out *RelabelConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RemoteReadSpec ¶ added in v0.16.0
type RemoteReadSpec struct { //The URL of the endpoint to send samples to. URL string `json:"url"` //An optional list of equality matchers which have to be present // in a selector to query the remote read endpoint. RequiredMatchers map[string]string `json:"requiredMatchers,omitempty"` //Timeout for requests to the remote write endpoint. RemoteTimeout string `json:"remoteTimeout,omitempty"` //Whether reads should be made for queries for time ranges that // the local storage should have complete data for. ReadRecent bool `json:"readRecent,omitempty"` //BasicAuth for the URL. BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // bearer token for remote write. BearerToken string `json:"bearerToken,omitempty"` // File to read bearer token for remote write. BearerTokenFile string `json:"bearerTokenFile,omitempty"` // TLS Config to use for remote write. TLSConfig *TLSConfig `json:"tlsConfig,omitempty"` //Optional ProxyURL ProxyURL string `json:"proxyUrl,omitempty"` }
RemoteReadSpec defines the remote_read configuration for prometheus. +k8s:openapi-gen=true
func (*RemoteReadSpec) DeepCopy ¶ added in v0.16.0
func (in *RemoteReadSpec) DeepCopy() *RemoteReadSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteReadSpec.
func (*RemoteReadSpec) DeepCopyInto ¶ added in v0.16.0
func (in *RemoteReadSpec) DeepCopyInto(out *RemoteReadSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RemoteWriteSpec ¶ added in v0.16.0
type RemoteWriteSpec struct { //The URL of the endpoint to send samples to. URL string `json:"url"` //Timeout for requests to the remote write endpoint. RemoteTimeout string `json:"remoteTimeout,omitempty"` //The list of remote write relabel configurations. WriteRelabelConfigs []RelabelConfig `json:"writeRelabelConfigs,omitempty"` //BasicAuth for the URL. BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // File to read bearer token for remote write. BearerToken string `json:"bearerToken,omitempty"` // File to read bearer token for remote write. BearerTokenFile string `json:"bearerTokenFile,omitempty"` // TLS Config to use for remote write. TLSConfig *TLSConfig `json:"tlsConfig,omitempty"` //Optional ProxyURL ProxyURL string `json:"proxyUrl,omitempty"` }
RemoteWriteSpec defines the remote_write configuration for prometheus. +k8s:openapi-gen=true
func (*RemoteWriteSpec) DeepCopy ¶ added in v0.16.0
func (in *RemoteWriteSpec) DeepCopy() *RemoteWriteSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteWriteSpec.
func (*RemoteWriteSpec) DeepCopyInto ¶ added in v0.16.0
func (in *RemoteWriteSpec) DeepCopyInto(out *RemoteWriteSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceMonitor ¶
type ServiceMonitor struct { metav1.TypeMeta `json:",inline"` // Standard object’s metadata. More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata // +k8s:openapi-gen=false metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of desired Service selection for target discrovery by // Prometheus. Spec ServiceMonitorSpec `json:"spec"` }
ServiceMonitor defines monitoring for a set of services. +k8s:openapi-gen=true
func ServiceMonitorFromUnstructured ¶
func ServiceMonitorFromUnstructured(r *unstructured.Unstructured) (*ServiceMonitor, error)
ServiceMonitorFromUnstructured unmarshals a ServiceMonitor object from dynamic client's unstructured
func (*ServiceMonitor) DeepCopy ¶ added in v0.16.0
func (in *ServiceMonitor) DeepCopy() *ServiceMonitor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceMonitor.
func (*ServiceMonitor) DeepCopyInto ¶ added in v0.16.0
func (in *ServiceMonitor) DeepCopyInto(out *ServiceMonitor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceMonitor) DeepCopyObject ¶ added in v0.16.0
func (l *ServiceMonitor) DeepCopyObject() runtime.Object
type ServiceMonitorInterface ¶
type ServiceMonitorInterface interface { Create(*ServiceMonitor) (*ServiceMonitor, error) Get(name string, opts metav1.GetOptions) (*ServiceMonitor, error) Update(*ServiceMonitor) (*ServiceMonitor, error) Delete(name string, options *metav1.DeleteOptions) error List(opts metav1.ListOptions) (runtime.Object, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(dopts *metav1.DeleteOptions, lopts metav1.ListOptions) error }
type ServiceMonitorList ¶
type ServiceMonitorList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty"` // List of ServiceMonitors Items []*ServiceMonitor `json:"items"` }
A list of ServiceMonitors. +k8s:openapi-gen=true
func (*ServiceMonitorList) DeepCopy ¶ added in v0.16.0
func (in *ServiceMonitorList) DeepCopy() *ServiceMonitorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceMonitorList.
func (*ServiceMonitorList) DeepCopyInto ¶ added in v0.16.0
func (in *ServiceMonitorList) DeepCopyInto(out *ServiceMonitorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceMonitorList) DeepCopyObject ¶ added in v0.16.0
func (l *ServiceMonitorList) DeepCopyObject() runtime.Object
type ServiceMonitorSpec ¶
type ServiceMonitorSpec struct { // The label to use to retrieve the job name from. JobLabel string `json:"jobLabel,omitempty"` // TargetLabels transfers labels on the Kubernetes Service onto the target. TargetLabels []string `json:"targetLabels,omitempty"` // A list of endpoints allowed as part of this ServiceMonitor. Endpoints []Endpoint `json:"endpoints"` // Selector to select Endpoints objects. Selector metav1.LabelSelector `json:"selector"` // Selector to select which namespaces the Endpoints objects are discovered from. NamespaceSelector NamespaceSelector `json:"namespaceSelector,omitempty"` }
ServiceMonitorSpec contains specification parameters for a ServiceMonitor. +k8s:openapi-gen=true
func (*ServiceMonitorSpec) DeepCopy ¶ added in v0.16.0
func (in *ServiceMonitorSpec) DeepCopy() *ServiceMonitorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceMonitorSpec.
func (*ServiceMonitorSpec) DeepCopyInto ¶ added in v0.16.0
func (in *ServiceMonitorSpec) DeepCopyInto(out *ServiceMonitorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceMonitorsGetter ¶
type ServiceMonitorsGetter interface {
ServiceMonitors(namespace string) ServiceMonitorInterface
}
type StorageSpec ¶
type StorageSpec struct { // Name of the StorageClass to use when requesting storage provisioning. More // info: https://kubernetes.io/docs/user-guide/persistent-volumes/#storageclasses // DEPRECATED Class string `json:"class,omitempty"` // EmptyDirVolumeSource to be used by the Prometheus StatefulSets. If specified, used in place of any volumeClaimTemplate. More // info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir EmptyDir *v1.EmptyDirVolumeSource `json:"emptyDir,omitempty"` // A label query over volumes to consider for binding. // DEPRECATED Selector *metav1.LabelSelector `json:"selector,omitempty"` // Resources represents the minimum resources the volume should have. More // info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources // DEPRECATED Resources v1.ResourceRequirements `json:"resources,omitempty"` // A PVC spec to be used by the Prometheus StatefulSets. VolumeClaimTemplate v1.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"` }
StorageSpec defines the configured storage for a group Prometheus servers. +k8s:openapi-gen=true
func (*StorageSpec) DeepCopy ¶ added in v0.16.0
func (in *StorageSpec) DeepCopy() *StorageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageSpec.
func (*StorageSpec) DeepCopyInto ¶ added in v0.16.0
func (in *StorageSpec) DeepCopyInto(out *StorageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLSConfig ¶
type TLSConfig struct { // The CA cert to use for the targets. CAFile string `json:"caFile,omitempty"` // The client cert file for the targets. CertFile string `json:"certFile,omitempty"` // The client key file for the targets. KeyFile string `json:"keyFile,omitempty"` // Used to verify the hostname for the targets. ServerName string `json:"serverName,omitempty"` // Disable target certificate validation. InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"` }
TLSConfig specifies TLS configuration parameters. +k8s:openapi-gen=true
func (*TLSConfig) DeepCopy ¶ added in v0.16.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfig.
func (*TLSConfig) DeepCopyInto ¶ added in v0.16.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.