This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
toolset_types.go
76 lines (70 loc) · 3.83 KB
/
toolset_types.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package v1beta2
import (
"github.com/caos/orbos/internal/operator/boom/api/v1beta2/k8s"
"github.com/caos/orbos/internal/operator/boom/api/v1beta2/monitoring"
"github.com/caos/orbos/internal/operator/boom/api/v1beta2/reconciling"
)
type Metadata struct {
//Name of the overlay
Name string `json:"name,omitempty" yaml:"name,omitempty"`
//Namespace as information, has currently no influence for the applied resources
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
}
// ToolsetSpec: BOOM reconciles itself if a boomVersion is defined, if no boomVersion is defined there is no reconciling.
type ToolsetSpec struct {
//Boom self reconciling specs
Boom *Boom `json:"boom,omitempty" yaml:"boom,omitempty"`
//Relative folder path where the currentstate is written to
ForceApply bool `json:"forceApply,omitempty" yaml:"forceApply,omitempty"`
//Flag if --force should be used by apply of resources
CurrentStateFolder string `json:"currentStatePath,omitempty" yaml:"currentStatePath,omitempty"`
//Spec for the yaml-files applied before the applications, for example used secrets
PreApply *Apply `json:"preApply,omitempty" yaml:"preApply,omitempty"`
//Spec for the yaml-files applied after the applications, for example additional crds for the applications
PostApply *Apply `json:"postApply,omitempty" yaml:"postApply,omitempty"`
//Spec for the Prometheus-Operator
MetricCollection *MetricCollection `json:"metricCollection,omitempty" yaml:"metricCollection,omitempty"`
//Spec for the Banzaicloud Logging-Operator
LogCollection *LogCollection `json:"logCollection,omitempty" yaml:"logCollection,omitempty"`
//Spec for the Prometheus-Node-Exporter
NodeMetricsExporter *NodeMetricsExporter `json:"nodeMetricsExporter,omitempty" yaml:"nodeMetricsExporter,omitempty"`
//Spec for the Prometheus-Systemd-Exporter
SystemdMetricsExporter *SystemdMetricsExporter `json:"systemdMetricsExporter,omitempty" yaml:"systemdMetricsExporter,omitempty"`
//Spec for the Grafana
Monitoring *monitoring.Monitoring `json:"monitoring,omitempty" yaml:"monitoring,omitempty"`
//Spec for the Ambassador
APIGateway *APIGateway `json:"apiGateway,omitempty" yaml:"apiGateway,omitempty"`
//Spec for the Kube-State-Metrics
KubeMetricsExporter *KubeMetricsExporter `json:"kubeMetricsExporter,omitempty" yaml:"kubeMetricsExporter,omitempty"`
//Spec for the Argo-CD
Reconciling *reconciling.Reconciling `json:"reconciling,omitempty" yaml:"reconciling,omitempty"`
//Spec for the Prometheus instance
MetricsPersisting *MetricsPersisting `json:"metricsPersisting,omitempty" yaml:"metricsPersisting,omitempty"`
//Spec for the Loki instance
LogsPersisting *LogsPersisting `json:"logsPersisting,omitempty" yaml:"logsPersisting,omitempty"`
}
type Boom struct {
//Version of BOOM which should be reconciled
Version string `json:"version,omitempty" yaml:"version,omitempty"`
//NodeSelector for boom deployment
NodeSelector map[string]string `json:"nodeSelector,omitempty" yaml:"nodeSelector,omitempty"`
//Tolerations to run boom on nodes
Tolerations k8s.Tolerations `json:"tolerations,omitempty" yaml:"tolerations,omitempty"`
//Resource requirements
Resources *k8s.Resources `json:"resources,omitempty" yaml:"resources,omitempty"`
}
type Toolset struct {
//Version of the used API
APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"`
//Kind for the standard CRD
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
//Metadata for the CRD
Metadata *Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty"`
//Specification for the Toolset
Spec *ToolsetSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
}
type ToolsetMetadata struct {
APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"`
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
Metadata *Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty"`
}