-
Notifications
You must be signed in to change notification settings - Fork 53
/
dataprepper_types.go
61 lines (52 loc) · 2.01 KB
/
dataprepper_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
package v1beta2
import (
opnimeta "github.com/rancher/opni/pkg/util/meta"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type DataPrepperState string
const (
DataPrepperStatePending DataPrepperState = "pending"
DataPrepperStateReady DataPrepperState = "ready"
DataprepperStateError DataPrepperState = "error"
)
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
type DataPrepper struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DataPrepperSpec `json:"spec,omitempty"`
Status DataPrepperStatus `json:"status,omitempty"`
}
type DataPrepperStatus struct {
Conditions []string `json:"conditions,omitempty"`
State DataPrepperState `json:"state,omitempty"`
}
type DataPrepperSpec struct {
*opnimeta.ImageSpec `json:",inline,omitempty"`
// +kubebuilder:default:=latest
Version string `json:"version"`
// +optional
DefaultRepo *string `json:"defaultRepo,omitempty"`
Opensearch *OpensearchSpec `json:"opensearch,omitempty"`
Username string `json:"username"`
PasswordFrom *corev1.SecretKeySelector `json:"passwordFrom,omitempty"`
ClusterID string `json:"cluster,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
EnableTracing bool `json:"enableTracing,omitempty"`
}
type OpensearchSpec struct {
Endpoint string `json:"endpoint,omitempty"`
InsecureDisableSSLVerify bool `json:"insecureDisableSSLVerify,omitempty"`
}
// +kubebuilder:object:root=true
type DataPrepperList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []DataPrepper `json:"items"`
}
func init() {
SchemeBuilder.Register(&DataPrepper{}, &DataPrepperList{})
}