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