Skip to content

Commit 0a95e1a

Browse files
committed
feat : add service annotations to DWR CRD
Signed-off-by: Rohan Kumar <[email protected]>
1 parent efb5ad6 commit 0a95e1a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

apis/controller/v1alpha1/devworkspacerouting_types.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ type DevWorkspaceRoutingSpec struct {
3131
Endpoints map[string]EndpointList `json:"endpoints"`
3232
// Selector that should be used by created services to point to the devworkspace Pod
3333
PodSelector map[string]string `json:"podSelector"`
34+
// Machines to services map
35+
// +optional
36+
// +kubebuilder:validation:Optional
37+
Service map[string]Service `json:"services"`
3438
}
3539

3640
type DevWorkspaceRoutingClass string
@@ -108,6 +112,14 @@ type EndpointProtocol string
108112
// +kubebuilder:validation:XPreserveUnknownFields
109113
type Attributes map[string]apiext.JSON
110114

115+
type Service struct {
116+
// Map of annotations to be added to the Kubernetes Service.
117+
// +optional
118+
// +patchMergeKey=name
119+
// +patchStrategy=merge
120+
Annotations map[string]string `json:"annotations,omitempty"`
121+
}
122+
111123
type Endpoint struct {
112124
// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
113125
// +kubebuilder:validation:MaxLength=63

0 commit comments

Comments
 (0)