-
Notifications
You must be signed in to change notification settings - Fork 53
/
multiclusterrolebinding_types.go
55 lines (43 loc) · 1.83 KB
/
multiclusterrolebinding_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
package v1beta2
import (
opnimeta "github.com/rancher/opni/pkg/util/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type MulticlusterRoleBindingState string
const (
MulticlusterRoleBindingStateError MulticlusterRoleBindingState = "Error"
MulticlusterRoleBindingStateWorking MulticlusterRoleBindingState = "Working"
MulticlusterRoleBindingStateReady MulticlusterRoleBindingState = "Ready"
)
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +kubebuilder:printcolumn:name="State",type=boolean,JSONPath=`.status.state`
type MulticlusterRoleBinding struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MulticlusterRoleBindingSpec `json:"spec,omitempty"`
Status MulticlusterRoleBindingStatus `json:"status,omitempty"`
}
type MulticlusterRoleBindingStatus struct {
Conditions []string `json:"conditions,omitempty"`
State MulticlusterRoleBindingState `json:"state,omitempty"`
}
type MulticlusterRoleBindingSpec struct {
OpensearchCluster *opnimeta.OpensearchClusterRef `json:"opensearch,omitempty"`
OpensearchConfig *ClusterConfigSpec `json:"opensearchConfig,omitempty"`
OpensearchExternalURL string `json:"opensearchExternalURL,omitempty"`
}
type ClusterConfigSpec struct {
IndexRetention string `json:"indexRetention,omitempty"`
}
// +kubebuilder:object:root=true
// MulticlusterRoleBindingList contains a list of MulticlusterRoleBinding
type MulticlusterRoleBindingList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MulticlusterRoleBinding `json:"items"`
}
func init() {
SchemeBuilder.Register(&MulticlusterRoleBinding{}, &MulticlusterRoleBindingList{})
}