Skip to content

Commit 91b5712

Browse files
authored
Add OffshoreDataGateway component (#567)
* First commit * Rename the component * Fixes * Add the generated doc * PR fixes + canonize the config * Add a warning * Move the warning; add the controllers test
1 parent 07040a0 commit 91b5712

25 files changed

+5108
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
Copyright 2023.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1
18+
19+
import (
20+
corev1 "k8s.io/api/core/v1"
21+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
22+
)
23+
24+
// OffshoreDataGatewaysSpec defines the desired state of OffshoreDataGateways
25+
type OffshoreDataGatewaysSpec struct {
26+
RemoteClusterSpec *corev1.LocalObjectReference `json:"remoteClusterSpec"`
27+
CommonSpec `json:",inline"`
28+
OffshoreDataGatewaySpec `json:",inline"`
29+
}
30+
31+
// OffshoreDataGatewaysStatus defines the observed state of OffshoreDataGateways
32+
type OffshoreDataGatewaysStatus struct {
33+
CommonRemoteNodeStatus `json:",inline"`
34+
}
35+
36+
//+kubebuilder:object:root=true
37+
//+kubebuilder:printcolumn:name="ReleaseStatus",type="string",JSONPath=".status.releaseStatus",description="Release status"
38+
//+kubebuilder:resource:categories=ytsaurus-all;yt-all
39+
//+kubebuilder:subresource:status
40+
41+
// OffshoreDataGateways is the Schema for the OffshoreDataGateways API
42+
// Be careful: this component is experimental and is not part of the public
43+
// API yet, so there are no guarantees it will work even when configured
44+
// TODO(pavel-bash): remove this warning when the component is released to open-source
45+
type OffshoreDataGateways struct {
46+
metav1.TypeMeta `json:",inline"`
47+
metav1.ObjectMeta `json:"metadata,omitempty"`
48+
49+
Spec OffshoreDataGatewaysSpec `json:"spec,omitempty"`
50+
Status OffshoreDataGatewaysStatus `json:"status,omitempty"`
51+
}
52+
53+
//+kubebuilder:object:root=true
54+
55+
// OffshoreDataGatewaysList contains a list of OffshoreDataGateways
56+
type OffshoreDataGatewaysList struct {
57+
metav1.TypeMeta `json:",inline"`
58+
metav1.ListMeta `json:"metadata,omitempty"`
59+
Items []OffshoreDataGateways `json:"items"`
60+
}
61+
62+
func init() {
63+
SchemeBuilder.Register(&OffshoreDataGateways{}, &OffshoreDataGatewaysList{})
64+
}

api/v1/ytsaurus_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,11 @@ type TabletNodesSpec struct {
653653
Name string `json:"name,omitempty"`
654654
}
655655

656+
type OffshoreDataGatewaySpec struct {
657+
// label filter (for daemonset)
658+
InstanceSpec `json:",inline"`
659+
}
660+
656661
type SchedulersSpec struct {
657662
// label filter (for daemonset)
658663
InstanceSpec `json:",inline"`

api/v1/zz_generated.deepcopy.go

Lines changed: 113 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)