-
Notifications
You must be signed in to change notification settings - Fork 323
/
fluentd_types.go
93 lines (81 loc) · 4.08 KB
/
fluentd_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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// Copyright © 2019 Banzai Cloud
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package v1beta1
import (
"github.com/banzaicloud/operator-tools/pkg/volume"
corev1 "k8s.io/api/core/v1"
)
// +name:"FluentdSpec"
// +weight:"200"
type _hugoFluentdSpec interface{}
// +name:"FluentdSpec"
// +version:"v1beta1"
// +description:"FluentdSpec defines the desired state of Fluentd"
type _metaFluentdSpec interface{}
// +kubebuilder:object:generate=true
// FluentdSpec defines the desired state of Fluentd
type FluentdSpec struct {
Annotations map[string]string `json:"annotations,omitempty"`
ConfigCheckAnnotations map[string]string `json:"configCheckAnnotations,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
TLS FluentdTLS `json:"tls,omitempty"`
Image ImageSpec `json:"image,omitempty"`
DisablePvc bool `json:"disablePvc,omitempty"`
// BufferStorageVolume is by default configured as PVC using FluentdPvcSpec
// +docLink:"volume.KubernetesVolume,https://github.com/banzaicloud/operator-tools/tree/master/docs/types"
BufferStorageVolume volume.KubernetesVolume `json:"bufferStorageVolume,omitempty"`
// Deprecated, use bufferStorageVolume
FluentdPvcSpec *volume.KubernetesVolume `json:"fluentdPvcSpec,omitempty"`
VolumeMountChmod bool `json:"volumeMountChmod,omitempty"`
VolumeModImage ImageSpec `json:"volumeModImage,omitempty"`
ConfigReloaderImage ImageSpec `json:"configReloaderImage,omitempty"`
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
LivenessDefaultCheck bool `json:"livenessDefaultCheck,omitempty"`
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
Port int32 `json:"port,omitempty"`
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
Metrics *Metrics `json:"metrics,omitempty"`
Security *Security `json:"security,omitempty"`
Scaling *FluentdScaling `json:"scaling,omitempty"`
Workers int32 `json:"workers,omitempty"`
// +kubebuilder:validation:enum=fatal,error,warn,info,debug,trace
LogLevel string `json:"logLevel,omitempty"`
PodPriorityClassName string `json:"podPriorityClassName,omitempty"`
// +kubebuilder:validation:enum=stdout,null
FluentLogDestination string `json:"fluentLogDestination,omitempty"`
// FluentOutLogrotate sends fluent's stdout to file and rotates it
FluentOutLogrotate *FluentOutLogrotate `json:"fluentOutLogrotate,omitempty"`
}
// +kubebuilder:object:generate=true
type FluentOutLogrotate struct {
Enabled bool `json:"enabled"`
Path string `json:"path,omitempty"`
Age string `json:"age,omitempty"`
Size string `json:"size,omitempty"`
}
// +kubebuilder:object:generate=true
// FluentdScaling enables configuring the scaling behaviour of the fluentd statefulset
type FluentdScaling struct {
Replicas int `json:"replicas"`
}
// +kubebuilder:object:generate=true
// FluentdTLS defines the TLS configs
type FluentdTLS struct {
Enabled bool `json:"enabled"`
SecretName string `json:"secretName"`
SharedKey string `json:"sharedKey,omitempty"`
}