@@ -37,7 +37,7 @@ type WMSWFS interface {
3737 metav1.Object
3838
3939 GroupKind () schema.GroupKind
40- Inspire () * Inspire
40+ Inspire () * WFSInspire
4141 Mapfile () * Mapfile
4242 PodSpecPatch () corev1.PodSpec
4343 HorizontalPodAutoscalerPatch () * HorizontalPodAutoscalerPatch
@@ -66,9 +66,8 @@ type Mapfile struct {
6666 ConfigMapKeyRef corev1.ConfigMapKeySelector `json:"configMapKeyRef"`
6767}
6868
69- // Options configures optional behaviors of the operator, like ingress, casing, and data prefetching.
70- // +kubebuilder:validation:Type=object
71- type Options struct {
69+ // BaseOptions for all apis
70+ type BaseOptions struct {
7271 // IncludeIngress dictates whether to deploy an Ingress or ensure none exists.
7372 // +kubebuilder:default:=true
7473 IncludeIngress bool `json:"includeIngress"`
@@ -77,51 +76,80 @@ type Options struct {
7776 // +kubebuilder:default:=true
7877 AutomaticCasing bool `json:"automaticCasing"`
7978
80- // ValidateRequests enables request validation against the service schema.
81- // +kubebuilder:default:=true
82- ValidateRequests bool `json:"validateRequests"`
83-
84- // RewriteGroupToDataLayers merges group layers into individual data layers.
85- // +kubebuilder:default:=false
86- RewriteGroupToDataLayers bool `json:"rewriteGroupToDataLayers"`
87-
88- // DisableWebserviceProxy disables the built-in proxy for external web services.
89- // +kubebuilder:default:=false
90- DisableWebserviceProxy bool `json:"disableWebserviceProxy"`
91-
9279 // Whether to prefetch data from blob storage, and store it on the local filesystem.
9380 // If `false`, the data will be served directly out of blob storage
9481 // +kubebuilder:default:=true
9582 PrefetchData bool `json:"prefetchData"`
83+ }
9684
97- // ValidateChildStyleNameEqual ensures child style names match the parent style.
98- // +kubebuilder:default=false
99- ValidateChildStyleNameEqual bool `json:"validateChildStyleNameEqual"`
85+ // Options configures optional behaviors of the operator, like ingress, casing, and data prefetching.
86+ // +kubebuilder:validation:Type=object
87+ type Options struct {
88+ BaseOptions `json:",inline"`
89+ WMSOptions `json:",inline"`
10090}
10191
10292func GetDefaultOptions () * Options {
10393 return & Options {
104- IncludeIngress : true ,
105- AutomaticCasing : true ,
106- ValidateRequests : true ,
107- RewriteGroupToDataLayers : false ,
108- DisableWebserviceProxy : false ,
109- PrefetchData : true ,
110- ValidateChildStyleNameEqual : false ,
94+ BaseOptions : BaseOptions {
95+ IncludeIngress : true ,
96+ AutomaticCasing : true ,
97+ PrefetchData : true ,
98+ },
99+ WMSOptions : WMSOptions {
100+ ValidateRequests : true ,
101+ RewriteGroupToDataLayers : false ,
102+ DisableWebserviceProxy : false ,
103+ ValidateChildStyleNameEqual : false ,
104+ },
111105 }
112106}
113107
108+ // BaseService holds all shared Services field for all apis
109+ type BaseService struct {
110+ // Geonovum subdomein
111+ // +kubebuilder:validation:MinLength:=1
112+ Prefix string `json:"prefix"`
113+
114+ // URL of the service
115+ URL smoothoperatormodel.URL `json:"url"`
116+
117+ // External Mapfile reference
118+ Mapfile * Mapfile `json:"mapfile,omitempty"`
119+
120+ // Reference to OwnerInfo CR
121+ // +kubebuilder:validation:MinLength:=1
122+ OwnerInfoRef string `json:"ownerInfoRef"`
123+
124+ // Service title
125+ // +kubebuilder:validation:MinLength:=1
126+ Title string `json:"title"`
127+
128+ // Service abstract
129+ // +kubebuilder:validation:MinLength:=1
130+ Abstract string `json:"abstract"`
131+
132+ // Keywords for capabilities
133+ // +kubebuilder:validation:MinItems:=1
134+ // +kubebuilder:validation:items:MinLength:=1
135+ Keywords []string `json:"keywords"`
136+
137+ // Optional Fees
138+ // +kubebuilder:validation:MinLength:=1
139+ Fees * string `json:"fees,omitempty"`
140+
141+ // AccessConstraints URL
142+ // +kubebuilder:default="https://creativecommons.org/publicdomain/zero/1.0/deed.nl"
143+ AccessConstraints smoothoperatormodel.URL `json:"accessConstraints,omitempty"`
144+ }
145+
114146// Inspire holds INSPIRE-specific metadata for the service.
115147// +kubebuilder:validation:Type=object
116148type Inspire struct {
117149 // ServiceMetadataURL references the CSW or custom metadata record.
118150 // +kubebuilder:validation:Type=object
119151 ServiceMetadataURL MetadataURL `json:"serviceMetadataUrl"`
120152
121- // SpatialDatasetIdentifier is the ID uniquely identifying the dataset.
122- // +kubebuilder:validation:Pattern:=`^[0-9a-zA-Z]{8}\-[0-9a-zA-Z]{4}\-[0-9a-zA-Z]{4}\-[0-9a-zA-Z]{4}\-[0-9a-zA-Z]{12}$`
123- SpatialDatasetIdentifier string `json:"spatialDatasetIdentifier"`
124-
125153 // Language of the INSPIRE metadata record
126154 // +kubebuilder:validation:Pattern:=`bul|cze|dan|dut|eng|est|fin|fre|ger|gre|hun|gle|ita|lav|lit|mlt|pol|por|rum|slo|slv|spa|swe`
127155 Language string `json:"language"`
0 commit comments