Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/grafana-agent
Path: blob/main/pkg/operator/apis/monitoring/v1alpha1/deployment.go
4096 views
1
package v1alpha1
2
3
import (
4
"github.com/grafana/agent/pkg/operator/assets"
5
promv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
6
)
7
8
// +genclient
9
10
// Deployment is a set of discovered resources relative to a GrafanaAgent. The
11
// tree of resources contained in a Deployment form the resource hierarchy used
12
// for reconciling a GrafanaAgent.
13
type Deployment struct {
14
// Root resource in the deployment.
15
Agent *GrafanaAgent
16
// Metrics resources discovered by Agent.
17
Metrics []MetricsDeployment
18
// Logs resources discovered by Agent.
19
Logs []LogsDeployment
20
// Integrations resources discovered by Agent.
21
Integrations []IntegrationsDeployment
22
// The full list of Secrets referenced by resources in the Deployment.
23
Secrets assets.SecretStore
24
}
25
26
// +genclient
27
28
// MetricsDeployment is a set of discovered resources relative to a
29
// MetricsInstance.
30
type MetricsDeployment struct {
31
Instance *MetricsInstance
32
ServiceMonitors []*promv1.ServiceMonitor
33
PodMonitors []*promv1.PodMonitor
34
Probes []*promv1.Probe
35
}
36
37
// +genclient
38
39
// LogsDeployment is a set of discovered resources relative to a LogsInstance.
40
type LogsDeployment struct {
41
Instance *LogsInstance
42
PodLogs []*PodLogs
43
}
44
45
// +genclient
46
47
// IntegrationsDeployment is a set of discovered resources relative to an
48
// IntegrationsDeployment.
49
type IntegrationsDeployment struct {
50
Instance *Integration
51
52
// NOTE(rfratto): Integration doesn't have any children resources, but we
53
// define a *Deployment type for consistency with Metrics and Logs.
54
}
55
56