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
/
values.go
328 lines (300 loc) · 17.5 KB
/
values.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
package helm
import (
"github.com/caos/orbos/internal/operator/boom/application/applications/prometheus/servicemonitor"
prometheusoperator "github.com/caos/orbos/internal/operator/boom/application/applications/prometheusoperator/helm"
)
type Service struct {
Annotations map[string]string `yaml:"annotations,omitempty"`
Labels map[string]string `yaml:"labels,omitempty"`
ClusterIP string `yaml:"clusterIP,omitempty"`
Port int `yaml:"port,omitempty"`
TargetPort int `yaml:"targetPort,omitempty"`
ExternalIPs []interface{} `yaml:"externalIPs,omitempty"`
NodePort int `yaml:"nodePort,omitempty"`
LoadBalancerIP string `yaml:"loadBalancerIP,omitempty"`
LoadBalancerSourceRanges []interface{} `yaml:"loadBalancerSourceRanges,omitempty"`
Type string `yaml:"type,omitempty"`
SessionAffinity string `yaml:"sessionAffinity,omitempty"`
}
type ServicePerReplica struct {
Enabled bool `yaml:"enabled,omitempty"`
Annotations map[string]string `yaml:"annotations,omitempty"`
Port int `yaml:"port,omitempty"`
TargetPort int `yaml:"targetPort,omitempty"`
NodePort int `yaml:"nodePort,omitempty"`
LoadBalancerSourceRanges []interface{} `yaml:"loadBalancerSourceRanges,omitempty"`
Type string `yaml:"type,omitempty"`
}
type PodDisruptionBudget struct {
Enabled bool `yaml:"enabled,omitempty"`
MinAvailable int `yaml:"minAvailable,omitempty"`
MaxUnavailable string `yaml:"maxUnavailable,omitempty"`
}
type Ingress struct {
Enabled bool `yaml:"enabled,omitempty"`
Annotations map[string]string `yaml:"annotations,omitempty"`
Labels map[string]string `yaml:"labels,omitempty"`
Hosts []interface{} `yaml:"hosts,omitempty"`
Paths []interface{} `yaml:"paths,omitempty"`
TLS []interface{} `yaml:"tls,omitempty"`
}
type IngressPerReplica struct {
Enabled bool `yaml:"enabled,omitempty"`
Annotations map[string]string `yaml:"annotations,omitempty"`
Labels map[string]string `yaml:"labels,omitempty"`
HostPrefix string `yaml:"hostPrefix,omitempty"`
HostDomain string `yaml:"hostDomain,omitempty"`
Paths []interface{} `yaml:"paths,omitempty"`
TLSSecretName string `yaml:"tlsSecretName,omitempty"`
}
type PodSecurityPolicy struct {
AllowedCapabilities []interface{} `yaml:"allowedCapabilities,omitempty"`
}
type ServiceMonitor struct {
Interval string `yaml:"interval,omitempty"`
SelfMonitor bool `yaml:"selfMonitor,omitempty"`
BearerTokenFile interface{} `yaml:"bearerTokenFile,omitempty"`
MetricRelabelings []interface{} `yaml:"metricRelabelings,omitempty"`
Relabelings []interface{} `yaml:"relabelings,omitempty"`
}
type Image struct {
Repository string `yaml:"repository,omitempty"`
Tag string `yaml:"tag,omitempty"`
}
type NamespaceSelector struct {
Any bool `yaml:"any,omitempty"`
MatchNames []string `yaml:"matchNames,omitempty"`
}
type MonitorSelector struct {
MatchLabels map[string]string `yaml:"matchLabels,omitempty"`
}
type Query struct {
LookbackDelta string `yaml:"lookbackDelta,omitempty"`
MaxConcurrency int32 `yaml:"maxConcurrency,omitempty"`
MaxSamples int32 `yaml:"maxSamples,omitempty"`
Timeout string `yaml:"timeout,omitempty"`
}
type PodMetadata struct {
Labels map[string]string `yaml:"labels,omitempty"`
}
type StorageSpec struct {
VolumeClaimTemplate *VolumeClaimTemplate `yaml:"volumeClaimTemplate,omitempty"`
}
type VolumeClaimTemplate struct {
Spec *VolumeClaimTemplateSpec `yaml:"spec,omitempty"`
selector struct{} `yaml:"selector,omitempty"`
}
type VolumeClaimTemplateSpec struct {
StorageClassName string `yaml:"storageClassName,omitempty"`
AccessModes []string `yaml:"accessModes,omitempty"`
Resources *Resources `yaml:"resources,omitempty"`
}
type Resources struct {
Requests *Request `yaml:"requests,omitempty"`
}
type Request struct {
Storage string `yaml:"storage,omitempty"`
}
type SecurityContext struct {
RunAsNonRoot bool `yaml:"runAsNonRoot,omitempty"`
RunAsUser int `yaml:"runAsUser,omitempty"`
FsGroup int `yaml:"fsGroup,omitempty"`
}
type KubernetesSdConfig struct {
Role string `yaml:"role,omitempty"`
}
type TLSConfig struct {
CaFile string `yaml:"ca_file,omitempty"`
CertFile string `yaml:"cert_file,omitempty"`
KeyFile string `yaml:"key_file,omitempty"`
}
type RelabelConfig struct {
Action string `yaml:"action,omitempty"`
Regex string `yaml:"regex,omitempty"`
SourceLabels []string `yaml:"source_labels,omitempty"`
TargetLabel string `yaml:"target_label,omitempty"`
Replacement string `yaml:"replacement,omitempty"`
}
type ValuesRelabelConfig struct {
Action string `yaml:"action,omitempty"`
Regex string `yaml:"regex,omitempty"`
SourceLabels []string `yaml:"sourceLabels,omitempty"`
TargetLabel string `yaml:"targetLabel,omitempty"`
Replacement string `yaml:"replacement,omitempty"`
}
type AdditionalScrapeConfig struct {
JobName string `yaml:"job_name,omitempty"`
KubernetesSdConfigs []*KubernetesSdConfig `yaml:"kubernetes_sd_configs,omitempty"`
Scheme string `yaml:"scheme,omitempty"`
TLSConfig *TLSConfig `yaml:"tls_config,omitempty"`
RelabelConfigs []*RelabelConfig `yaml:"relabel_configs,omitempty"`
MetricRelabelConfigs []*RelabelConfig `yaml:"metric_relabel_configs,omitempty"`
BearerTokenFile string `yaml:"bearer_token_file,omitempty"`
}
type PrometheusSpec struct {
ScrapeInterval string `yaml:"scrapeInterval,omitempty"`
EvaluationInterval string `yaml:"evaluationInterval,omitempty"`
ListenLocal bool `yaml:"listenLocal,omitempty"`
EnableAdminAPI bool `yaml:"enableAdminAPI,omitempty"`
Image *Image `yaml:"image,omitempty"`
Tolerations []interface{} `yaml:"tolerations,omitempty"`
AlertingEndpoints []interface{} `yaml:"alertingEndpoints,omitempty"`
ExternalLabels map[string]string `yaml:"externalLabels,omitempty"`
ReplicaExternalLabelName string `yaml:"replicaExternalLabelName,omitempty"`
ReplicaExternalLabelNameClear bool `yaml:"replicaExternalLabelNameClear,omitempty"`
PrometheusExternalLabelName string `yaml:"prometheusExternalLabelName,omitempty"`
PrometheusExternalLabelNameClear bool `yaml:"prometheusExternalLabelNameClear,omitempty"`
ExternalURL string `yaml:"externalUrl,omitempty"`
NodeSelector map[string]string `yaml:"nodeSelector,omitempty"`
Secrets []interface{} `yaml:"secrets,omitempty"`
ConfigMaps []interface{} `yaml:"configMaps,omitempty"`
Query *Query `yaml:"query,omitempty"`
RuleNamespaceSelector *NamespaceSelector `yaml:"ruleNamespaceSelector,omitempty"`
RuleSelectorNilUsesHelmValues bool `yaml:"ruleSelectorNilUsesHelmValues,omitempty"`
RuleSelector *RuleSelector `yaml:"ruleSelector,omitempty"`
ServiceMonitorSelectorNilUsesHelmValues bool `yaml:"serviceMonitorSelectorNilUsesHelmValues,omitempty"`
ServiceMonitorSelector *MonitorSelector `yaml:"serviceMonitorSelector,omitempty"`
ServiceMonitorNamespaceSelector *NamespaceSelector `yaml:"serviceMonitorNamespaceSelector,omitempty"`
PodMonitorSelectorNilUsesHelmValues bool `yaml:"podMonitorSelectorNilUsesHelmValues,omitempty"`
PodMonitorSelector *MonitorSelector `yaml:"podMonitorSelector,omitempty"`
PodMonitorNamespaceSelector *NamespaceSelector `yaml:"podMonitorNamespaceSelector,omitempty"`
Retention string `yaml:"retention,omitempty"`
RetentionSize string `yaml:"retentionSize,omitempty"`
WalCompression bool `yaml:"walCompression,omitempty"`
Paused bool `yaml:"paused,omitempty"`
Replicas int `yaml:"replicas,omitempty"`
LogLevel string `yaml:"logLevel,omitempty"`
LogFormat string `yaml:"logFormat,omitempty"`
RoutePrefix string `yaml:"routePrefix,omitempty"`
PodMetadata *PodMetadata `yaml:"podMetadata,omitempty"`
PodAntiAffinity string `yaml:"podAntiAffinity,omitempty"`
PodAntiAffinityTopologyKey string `yaml:"podAntiAffinityTopologyKey,omitempty"`
Affinity struct{} `yaml:"affinity,omitempty"`
RemoteRead []interface{} `yaml:"remoteRead,omitempty"`
RemoteWrite []*RemoteWrite `yaml:"remoteWrite,omitempty"`
RemoteWriteDashboards bool `yaml:"remoteWriteDashboards,omitempty"`
Resources struct{} `yaml:"resources,omitempty"`
StorageSpec *StorageSpec `yaml:"storageSpec,omitempty"`
AdditionalScrapeConfigs []*AdditionalScrapeConfig `yaml:"additionalScrapeConfigs,omitempty"`
AdditionalAlertManagerConfigs []interface{} `yaml:"additionalAlertManagerConfigs,omitempty"`
AdditionalAlertRelabelConfigs []interface{} `yaml:"additionalAlertRelabelConfigs,omitempty"`
SecurityContext *SecurityContext `yaml:"securityContext,omitempty"`
PriorityClassName string `yaml:"priorityClassName,omitempty"`
Thanos struct{} `yaml:"thanos,omitempty"`
Containers []interface{} `yaml:"containers,omitempty"`
AdditionalScrapeConfigsExternal bool `yaml:"additionalScrapeConfigsExternal,omitempty"`
}
type RemoteWrite struct {
URL string `yaml:"url,omitempty"`
BasicAuth *BasicAuth `yaml:"basicAuth,omitempty"`
WriteRelabelConfigs []*ValuesRelabelConfig `yaml:"writeRelabelConfigs,omitempty"`
}
type BasicAuth struct {
Username *SecretKeySelector `yaml:"username,omitempty"`
Password *SecretKeySelector `yaml:"password,omitempty"`
}
type SecretKeySelector struct {
Name string `yaml:"name,omitempty"`
Key string `yaml:"key,omitempty"`
}
type ServiceAccount struct {
Create bool `yaml:"create,omitempty"`
Name string `yaml:"name,omitempty"`
}
type RuleSelector struct {
MatchLabels map[string]string `yaml:"matchLabels"`
}
type PrometheusValues struct {
Enabled bool `yaml:"enabled,omitempty"`
Annotations map[string]string `yaml:"annotations,omitempty"`
ServiceAccount *ServiceAccount `yaml:"serviceAccount,omitempty"`
Service *Service `yaml:"service,omitempty"`
ServicePerReplica *ServicePerReplica `yaml:"servicePerReplica,omitempty"`
PodDisruptionBudget *PodDisruptionBudget `yaml:"podDisruptionBudget,omitempty"`
Ingress *Ingress `yaml:"ingress,omitempty"`
IngressPerReplica *IngressPerReplica `yaml:"ingressPerReplica,omitempty"`
PodSecurityPolicy *PodSecurityPolicy `yaml:"podSecurityPolicy,omitempty"`
ServiceMonitor *ServiceMonitor `yaml:"serviceMonitor,omitempty"`
PrometheusSpec *PrometheusSpec `yaml:"prometheusSpec,omitempty"`
AdditionalServiceMonitors []*servicemonitor.Values `yaml:"additionalServiceMonitors,omitempty"`
AdditionalPodMonitors []interface{} `yaml:"additionalPodMonitors,omitempty"`
}
type Rules struct {
Alertmanager bool `yaml:"alertmanager"`
Etcd bool `yaml:"etcd"`
General bool `yaml:"general"`
K8S bool `yaml:"k8s"`
KubeApiserver bool `yaml:"kubeApiserver"`
KubePrometheusNodeAlerting bool `yaml:"kubePrometheusNodeAlerting"`
KubePrometheusNodeRecording bool `yaml:"kubePrometheusNodeRecording"`
KubernetesAbsent bool `yaml:"kubernetesAbsent"`
KubernetesApps bool `yaml:"kubernetesApps"`
KubernetesResources bool `yaml:"kubernetesResources"`
KubernetesStorage bool `yaml:"kubernetesStorage"`
KubernetesSystem bool `yaml:"kubernetesSystem"`
KubeScheduler bool `yaml:"kubeScheduler"`
Network bool `yaml:"network"`
Node bool `yaml:"node"`
Prometheus bool `yaml:"prometheus"`
PrometheusOperator bool `yaml:"prometheusOperator"`
Time bool `yaml:"time"`
}
type DefaultRules struct {
Create bool `yaml:"create"`
Rules *Rules `yaml:"rules,omitempty"`
Labels map[string]string `yaml:"labels,omitempty"`
Annotations map[string]string `yaml:"annotations,omitempty"`
}
type Global struct {
Rbac *Rbac `yaml:"rbac,omitempty"`
ImagePullSecrets []interface{} `yaml:"imagePullSecrets,omitempty"`
}
type Rbac struct {
Create bool `yaml:"create,omitempty"`
PspEnabled bool `yaml:"pspEnabled,omitempty"`
}
type DisabledTool struct {
Enabled bool `yaml:"enabled"`
}
type AdditionalPrometheusRules struct {
Name string `yaml:"name,omitempty"`
Groups []*Group `yaml:"groups,omitempty"`
AdditionalLabels map[string]string `yaml:"additionalLabels,omitempty"`
}
type Group struct {
Name string `yaml:"name,omitempty"`
Rules []*Rule `yaml:"rules,omitempty"`
}
type Rule struct {
Expr string `yaml:"expr,omitempty"`
Labels map[string]string `yaml:"labels,omitempty"`
Annotations map[string]string `yaml:"annotations,omitempty"`
Record string `yaml:"record,omitempty"`
Alert string `yaml:"alert,omitempty"`
For string `yaml:"for,omitempty"`
}
type Values struct {
KubeTargetVersionOverride string `yaml:"kubeTargetVersionOverride,omitempty"`
NameOverride string `yaml:"nameOverride,omitempty"`
FullnameOverride string `yaml:"fullnameOverride,omitempty"`
CommonLabels map[string]string `yaml:"commonLabels,omitempty"`
DefaultRules *DefaultRules `yaml:"defaultRules,omitempty"`
AdditionalPrometheusRules []*AdditionalPrometheusRules `yaml:"additionalPrometheusRules,omitempty"`
Global *Global `yaml:"global,omitempty"`
Alertmanager *DisabledTool `yaml:"alertmanager,omitempty"`
Grafana *DisabledTool `yaml:"grafana,omitempty"`
KubeAPIServer *DisabledTool `yaml:"kubeApiServer,omitempty"`
Kubelet *DisabledTool `yaml:"kubelet,omitempty"`
KubeControllerManager *DisabledTool `yaml:"kubeControllerManager,omitempty"`
CoreDNS *DisabledTool `yaml:"coreDns,omitempty"`
KubeDNS *DisabledTool `yaml:"kubeDns,omitempty"`
KubeEtcd *DisabledTool `yaml:"kubeEtcd,omitempty"`
KubeScheduler *DisabledTool `yaml:"kubeScheduler,omitempty"`
KubeProxy *DisabledTool `yaml:"kubeProxy,omitempty"`
KubeStateMetricsScrap *DisabledTool `yaml:"kubeStateMetrics,omitempty"`
KubeStateMetrics *DisabledTool `yaml:"kube-state-metrics,omitempty"`
NodeExporter *DisabledTool `yaml:"nodeExporter,omitempty"`
PrometheusNodeExporter *DisabledTool `yaml:"prometheus-node-exporter,omitempty"`
PrometheusOperator *prometheusoperator.PrometheusOperatorValues `yaml:"prometheusOperator,omitempty"`
Prometheus *PrometheusValues `yaml:"prometheus,omitempty"`
}