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