Documentation
¶
Overview ¶
Package operator contains the Prometheus operator.
Package operator contains the Prometheus
Index ¶
Constants ¶
View Source
const ( // DefaultOperatorNamespace is the namespace in which all resources owned by the operator are installed. DefaultOperatorNamespace = "gmp-system" // DefaultPublicNamespace is the namespace where the operator will check for user-specified // configuration data. DefaultPublicNamespace = "gmp-public" // NameOperator is a fixed name used in various resources managed by the operator. NameOperator = "gmp-operator" // LabelAppName is the well-known app name label. LabelAppName = "app.kubernetes.io/name" // LabelInstanceName is the well-known instance name label. LabelInstanceName = "app.kubernetes.io/instance" // AnnotationMetricName is the component name, will be exposed as metric name. AnnotationMetricName = "components.gke.io/component-name" // ClusterAutoscalerSafeEvictionLabel is the annotation label that determines // whether the cluster autoscaler can safely evict a Pod when the Pod doesn't // satisfy certain eviction criteria. ClusterAutoscalerSafeEvictionLabel = "cluster-autoscaler.kubernetes.io/safe-to-evict" // KubernetesAppName is the k8s Application, will be exposed as component name. KubernetesAppName = "app" // RuleEvaluatorAppName is the name of the rule-evaluator application. RuleEvaluatorAppName = "managed-prometheus-rule-evaluator" // AlertmanagerAppName is the name of the alert manager application. AlertmanagerAppName = "managed-prometheus-alertmanager" )
View Source
const ( NameOperatorConfig = "config" NameRuleEvaluator = "rule-evaluator" NameCollector = "collector" NameAlertmanager = "alertmanager" )
Base resource names which may be used for multiple different resource kinds related to the given component.
View Source
const ( RulesSecretName = "rules" CollectionSecretName = "collection" AlertmanagerSecretName = "alertmanager" AlertmanagerPublicSecretName = "alertmanager" AlertmanagerPublicSecretKey = "alertmanager.yaml" AlertmanagerConfigKey = "config.yaml" )
Secret paths.
View Source
const ( CollectorPrometheusContainerName = "prometheus" CollectorPrometheusContainerPortName = "prom-metrics" CollectorConfigReloaderContainerPortName = "cfg-rel-metrics" RuleEvaluatorContainerName = "evaluator" AlertmanagerContainerName = "alertmanager" )
Collector Kubernetes Deployment extraction/detection.
Variables ¶
View Source
var AlertmanagerNoOpConfig = `
receivers:
- name: "noop"
route:
receiver: "noop"
`
Functions ¶
Types ¶
type Operator ¶
type Operator struct {
// contains filtered or unexported fields
}
Operator to implement managed collection for Google Prometheus Engine.
func (*Operator) Run ¶
func (o *Operator) Run(ctx context.Context, registry prometheus.Registerer) error
Run the reconciliation loop of the operator. The passed owner references are set on cluster-wide resources created by the operator.
type Options ¶
type Options struct {
// ID of the project of the cluster.
ProjectID string
// Location of the cluster.
Location string
// Name of the cluster the operator acts on.
Cluster string
// Namespace to which the operator deploys any associated resources.
OperatorNamespace string
// Namespace to which the operator looks for user-specified configuration
// data, like Secrets and ConfigMaps.
PublicNamespace string
// Health and readiness serving address.
ProbeAddr string
// Certificate of the server in base 64.
TLSCert string
// Key of the server in base 64.
TLSKey string
// Certificate authority in base 64.
CACert string
// CertDir is the path to a directory containing TLS certificates for the webhook server
CertDir string
// Webhook serving address.
ListenAddr string
// Cleanup resources without this annotation.
CleanupAnnotKey string
// The number of upper bound threads to use for target polling otherwise
// use the default.
TargetPollConcurrency uint16
// The HTTP client to use when targeting collector endpoints.
CollectorHTTPClient *http.Client
}
Options for the Operator.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
apis
|
|
|
monitoring/v1
Package v1 is the v1 version of the API.
|
Package v1 is the v1 version of the API. |
|
monitoring/v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
|
Package v1alpha1 is the v1alpha1 version of the API. |
Click to show internal directories.
Click to hide internal directories.