v1alpha1

package
v0.0.0-...-56ac3d6 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the monitoring.qubership.org v1alpha1 API group +kubebuilder:object:generate=true +groupName=monitoring.qubership.org

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "monitoring.qubership.org", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Auth

type Auth struct {
	BasicAuth *apiv1.BasicAuth `json:"basicAuth,omitempty"`
}

func (*Auth) DeepCopy

func (in *Auth) DeepCopy() *Auth

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

func (*Auth) DeepCopyInto

func (in *Auth) DeepCopyInto(out *Auth)

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

type CustomMetricRuleConfig

type CustomMetricRuleConfig struct {
	// SeriesQuery specifies which metrics this rule should consider via a Prometheus query
	// series selector query.
	SeriesQuery string `json:"seriesQuery"`
	// SeriesFilters specifies additional regular expressions to be applied on
	// the series names returned from the query. This is useful for constraints
	// that can't be represented in the SeriesQuery (e.g. series matching `container_.+`
	// not matching `container_.+_total`. A filter will be automatically appended to
	// match the form specified in Name.
	SeriesFilters []RegexFilter `json:"seriesFilters,omitempty"`
	// Resources specifies how associated Kubernetes resources should be discovered for
	// the given metrics.
	Resources ResourceMapping `json:"resources"`
	// Name specifies how the metric name should be transformed between custom metric
	// API resources, and Prometheus metric names.
	Name NameMapping `json:"name"`
	// MetricsQuery specifies modifications to the metrics query, such as converting
	// cumulative metrics to rate metrics. It is a template where `.LabelMatchers` is
	// a the comma-separated base label matchers and `.Series` is the series name, and
	// `.GroupBy` is the comma-separated expected group-by label names. The delimeters
	// are `<<` and `>>`.
	MetricsQuery string `json:"metricsQuery,omitempty"`
}

CustomMetricRuleConfig defines the metric exposing rule from Prometheus. This structure is similar to the DiscoveryRule from github.com/directxman12/k8s-prometheus-adapter/pkg/config but we can not use the original structure because it is not compliant with kube-builder's CRD generator.

func (*CustomMetricRuleConfig) DeepCopy

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

func (*CustomMetricRuleConfig) DeepCopyInto

func (in *CustomMetricRuleConfig) DeepCopyInto(out *CustomMetricRuleConfig)

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

type CustomScaleMetricRule

type CustomScaleMetricRule struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CustomScaleMetricRuleSpec   `json:"spec,omitempty"`
	Status CustomScaleMetricRuleStatus `json:"status,omitempty"`
}

CustomScaleMetricRule is the Schema for the customscalemetricrules API

func (*CustomScaleMetricRule) DeepCopy

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

func (*CustomScaleMetricRule) DeepCopyInto

func (in *CustomScaleMetricRule) DeepCopyInto(out *CustomScaleMetricRule)

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

func (*CustomScaleMetricRule) DeepCopyObject

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

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

type CustomScaleMetricRuleList

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

CustomScaleMetricRuleList contains a list of CustomScaleMetricRule

func (*CustomScaleMetricRuleList) DeepCopy

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

func (*CustomScaleMetricRuleList) DeepCopyInto

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

func (*CustomScaleMetricRuleList) DeepCopyObject

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

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

func (*CustomScaleMetricRuleList) ItemsToString

func (in *CustomScaleMetricRuleList) ItemsToString() string

ItemsToString returns items as <namespace>/<name> comma-separated string.

type CustomScaleMetricRuleSpec

type CustomScaleMetricRuleSpec struct {
	Rules []CustomMetricRuleConfig `json:"rules,omitempty"`
}

CustomScaleMetricRuleSpec defines the desired state of CustomScaleMetricRule

func (*CustomScaleMetricRuleSpec) DeepCopy

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

func (*CustomScaleMetricRuleSpec) DeepCopyInto

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

type CustomScaleMetricRuleStatus

type CustomScaleMetricRuleStatus struct {
}

CustomScaleMetricRuleStatus defines the observed state of CustomScaleMetricRule

func (*CustomScaleMetricRuleStatus) DeepCopy

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

func (*CustomScaleMetricRuleStatus) DeepCopyInto

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

type GroupResource

type GroupResource struct {
	Group    string `json:"group,omitempty"`
	Resource string `json:"resource"`
}

GroupResource represents a Kubernetes group-resource.

func (*GroupResource) DeepCopy

func (in *GroupResource) DeepCopy() *GroupResource

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

func (*GroupResource) DeepCopyInto

func (in *GroupResource) DeepCopyInto(out *GroupResource)

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

type NameMapping

type NameMapping struct {
	// Matches is a regular expression that is used to match
	// Prometheus series names.  It may be left blank, in which
	// case it is equivalent to `.*`.
	Matches string `json:"matches"`
	// As is the name used in the API.  Captures from Matches
	// are available for use here.  If not specified, it defaults
	// to $0 if no capture groups are present in Matches, or $1
	// if only one is present, and will error if multiple are.
	As string `json:"as,omitempty"`
}

NameMapping specifies how to convert Prometheus metrics to/from custom metrics API resources.

func (*NameMapping) DeepCopy

func (in *NameMapping) DeepCopy() *NameMapping

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

func (*NameMapping) DeepCopyInto

func (in *NameMapping) DeepCopyInto(out *NameMapping)

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

type PrometheusAdapter

type PrometheusAdapter struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PrometheusAdapterSpec   `json:"spec,omitempty"`
	Status PrometheusAdapterStatus `json:"status,omitempty"`
}

PrometheusAdapter is the Schema for the prometheusadapters API

func (*PrometheusAdapter) DeepCopy

func (in *PrometheusAdapter) DeepCopy() *PrometheusAdapter

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

func (*PrometheusAdapter) DeepCopyInto

func (in *PrometheusAdapter) DeepCopyInto(out *PrometheusAdapter)

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

func (*PrometheusAdapter) DeepCopyObject

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

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

type PrometheusAdapterList

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

PrometheusAdapterList contains a list of PrometheusAdapter

func (*PrometheusAdapterList) DeepCopy

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

func (*PrometheusAdapterList) DeepCopyInto

func (in *PrometheusAdapterList) DeepCopyInto(out *PrometheusAdapterList)

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

func (*PrometheusAdapterList) DeepCopyObject

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

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

type PrometheusAdapterSpec

type PrometheusAdapterSpec struct {

	// Image to use for a `prometheus-adapter` deployment.
	Image string `json:"image"`

	// Replicas set the expected replicas of the prometheus-adapter. The controller will eventually make the size
	// of the running replicas equal to the expected size.
	Replicas *int32 `json:"replicas,omitempty"`

	// PrometheusURL used to connect to Prometheus. It will eventually contain query parameters
	// to configure the connection.
	PrometheusURL string `json:"prometheusUrl,omitempty"`

	// MetricsRelistInterval is the interval at which to update the cache of available metrics from Prometheus
	MetricsRelistInterval string `json:"metricsRelistInterval,omitempty"`

	//EnableResourceMetrics allows enabling/disabling adapter for `metrics.k8s.io`
	EnableResourceMetrics bool `json:"enableResourceMetrics,omitempty"`

	//EnableCustomMetrics allows enabling/disabling adapter for `custom.metrics.k8s.io`
	EnableCustomMetrics bool `json:"enableCustomMetrics,omitempty"`

	// CustomScaleMetricRulesSelector defines label selectors to select
	// CustomScaleMetricRule resources across the cluster.
	CustomScaleMetricRulesSelector []*metav1.LabelSelector `json:"customScaleMetricRulesSelector,omitempty"`

	// Resources defines resources requests and limits for single Pods.
	Resources v1.ResourceRequirements `json:"resources,omitempty"`

	// SecurityContext holds pod-level security attributes.
	SecurityContext *SecurityContext `json:"securityContext,omitempty"`

	TLSConfig *TlsConfig `json:"tlsConfig,omitempty"`

	Auth *Auth `json:"auth,omitempty"`

	// Define which Nodes the Pods are scheduled on.
	// Specified just as map[string]string. For example: "type: compute"
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Map of string keys and values that can be used to organize and categorize
	// (scope and select) objects. May match selectors of replication controllers
	// and services.
	// More info: https://kubernetes.io/docs/user-guide/labels
	// +optional
	Labels map[string]string `json:"labels,omitempty"`

	// Annotations is an unstructured key value map stored with a resource that may be
	// set by external tools to store and retrieve arbitrary metadata. They are not
	// queryable and should be preserved when modifying objects.
	// More info: https://kubernetes.io/docs/user-guide/annotations
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// Affinity is a group of affinity scheduling rules.
	// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node
	// +optional
	Affinity *v1.Affinity `json:"affinity,omitempty"`

	// Tolerations allow the pods to schedule onto nodes with matching taints.
	// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
	// +optional
	Tolerations []v1.Toleration `json:"tolerations,omitempty"`

	// PriorityClassName assigned to the Pods
	// +optional
	PriorityClassName string `json:"priorityClassName,omitempty"`
}

PrometheusAdapterSpec defines the desired state of PrometheusAdapter

func (*PrometheusAdapterSpec) DeepCopy

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

func (*PrometheusAdapterSpec) DeepCopyInto

func (in *PrometheusAdapterSpec) DeepCopyInto(out *PrometheusAdapterSpec)

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

type PrometheusAdapterStatus

type PrometheusAdapterStatus struct {
}

PrometheusAdapterStatus defines the observed state of PrometheusAdapter

func (*PrometheusAdapterStatus) DeepCopy

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

func (*PrometheusAdapterStatus) DeepCopyInto

func (in *PrometheusAdapterStatus) DeepCopyInto(out *PrometheusAdapterStatus)

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

type RegexFilter

type RegexFilter struct {
	Is    string `json:"is,omitempty"`
	IsNot string `json:"isNot,omitempty"`
}

RegexFilter is a filter that matches positively or negatively against a regex. Only one field may be set at a time.

func (*RegexFilter) DeepCopy

func (in *RegexFilter) DeepCopy() *RegexFilter

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

func (*RegexFilter) DeepCopyInto

func (in *RegexFilter) DeepCopyInto(out *RegexFilter)

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

type ResourceMapping

type ResourceMapping struct {
	// Template specifies a golang string template for converting a Kubernetes
	// group-resource to a Prometheus label.  The template object contains
	// the `.Group` and `.Resource` fields.  The `.Group` field will have
	// dots replaced with underscores, and the `.Resource` field will be
	// singularized.  The delimiters are `<<` and `>>`.
	Template string `json:"template,omitempty"`
	// Overrides specifies exceptions to the above template, mapping label names
	// to group-resources
	Overrides map[string]GroupResource `json:"overrides,omitempty"`
}

ResourceMapping specifies how to map Kubernetes resources to Prometheus labels

func (*ResourceMapping) DeepCopy

func (in *ResourceMapping) DeepCopy() *ResourceMapping

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

func (*ResourceMapping) DeepCopyInto

func (in *ResourceMapping) DeepCopyInto(out *ResourceMapping)

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

type SecurityContext

type SecurityContext struct {
	// The UID to run the entrypoint of the container process.
	// Defaults to user specified in image metadata if unspecified.
	RunAsUser *int64 `json:"runAsUser,omitempty"`
	// A special supplemental group that applies to all containers in a pod.
	// Some volume types allow the Kubelet to change the ownership of that volume
	// to be owned by the pod:
	//
	// 1. The owning GID will be the FSGroup
	// 2. The setgid bit is set (new files created in the volume will be owned by FSGroup)
	// 3. The permission bits are OR'd with rw-rw----
	//
	// If unset, the Kubelet will not modify the ownership and permissions of any volume.
	FSGroup *int64 `json:"fsGroup,omitempty"`
}

SecurityContext holds pod-level security attributes. The parameters are required if a Pod Security Policy is enabled for Kubernetes cluster and required if a Security Context Constraints is enabled for Openshift cluster.

func (*SecurityContext) DeepCopy

func (in *SecurityContext) DeepCopy() *SecurityContext

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

func (*SecurityContext) DeepCopyInto

func (in *SecurityContext) DeepCopyInto(out *SecurityContext)

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

type TlsConfig

type TlsConfig struct {
	// Certificate authority used when verifying server certificates.
	CA *v1.SecretKeySelector `json:"caSecret,omitempty"`
	// Client certificate to present when doing client-authentication.
	Cert *v1.SecretKeySelector `json:"certSecret,omitempty"`
	// Secret containing the client key file for the target.
	KeySecret *v1.SecretKeySelector `json:"keySecret,omitempty"`
}

func (*TlsConfig) DeepCopy

func (in *TlsConfig) DeepCopy() *TlsConfig

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

func (*TlsConfig) DeepCopyInto

func (in *TlsConfig) DeepCopyInto(out *TlsConfig)

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